Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Remove unused IsViolating() function from TestOpti #194

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion test/include/TestOpti.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class TestOpti {

double GetMaximizeObjective() { return maximizeObjective; }
double GetMinimizeObjective() { return minimizeObjective; }
bool IsViolating() { return isViolating; }
void AddIntermediateCallback(std::function<void()> callback);
};

Expand Down
4 changes: 0 additions & 4 deletions test/src/SwerveTrajoptUtilTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ TEST_CASE("SwerveTrajoptUtil - ApplyKinematicsConstraints()",
std::vector<size_t> N{2, 4};

trajopt::ApplyKinematicsConstraints(opti, x, x, x, v, v, v, a, a, a, dt, N);

CHECK_FALSE(opti.IsViolating());
}

TEST_CASE("SwerveTrajoptUtil - ApplyDynamicsConstraints()",
Expand All @@ -83,6 +81,4 @@ TEST_CASE("SwerveTrajoptUtil - ApplyDynamicsConstraints()",

trajopt::ApplyDynamicsConstraints(opti, ax, ay, alpha, Fx_net, Fy_net,
tau_net, mass, moi);

CHECK_FALSE(opti.IsViolating());
}
2 changes: 0 additions & 2 deletions test/src/TrajoptUtilTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ TEST_CASE("TrajoptUtil - ApplyDiscreteTimeObjective()", "[TrajoptUtil]") {
std::vector<size_t> N = {20, 15};
trajopt::ApplyDiscreteTimeObjective(opti, dt, N);
CHECK(opti.GetMinimizeObjective() == 25);
CHECK(opti.IsViolating());
}

TEST_CASE("TrajoptUtil - ApplyIntervalSet1d()", "[TrajoptUtil]") {
Expand Down Expand Up @@ -60,7 +59,6 @@ TEST_CASE("TrajoptUtil - ApplyIntervalSet1d()", "[TrajoptUtil]") {
{case4, 5.0, true}}) {
TestOpti opti;
trajopt::ApplyIntervalSet1dConstraint(opti, test.val, test.set);
CHECK(opti.IsViolating() == test.isViolating);
}
}

Expand Down
Loading