generated from wessel/boilerplate
fix(formatting): Fix simple formatting errors
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
#include "Simulator.hpp"
|
||||
#include <algorithm>
|
||||
|
||||
namespace assignments::three
|
||||
{
|
||||
namespace assignments::three {
|
||||
|
||||
Simulator::Simulator(rclcpp::Node* node, const std::vector<std::string>& objects) {
|
||||
load_intervals(node, objects);
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
|
||||
namespace assignments::three
|
||||
{
|
||||
namespace assignments::three {
|
||||
|
||||
enum class SimType {
|
||||
CONSTANT,
|
||||
@@ -32,11 +32,10 @@ public:
|
||||
|
||||
private:
|
||||
int max_intervals_;
|
||||
std::map<std::string, std::vector<IntervalConfig>> object_intervals_;
|
||||
|
||||
void load_intervals(rclcpp::Node* node, const std::vector<std::string>& objects);
|
||||
double compute_value(double t, const IntervalConfig& interval);
|
||||
|
||||
std::map<std::string, std::vector<IntervalConfig>> object_intervals_;
|
||||
};
|
||||
|
||||
} // namespace assignments::three
|
||||
|
||||
@@ -248,7 +248,7 @@ TEST_F(SimulatorTest, MaxIntervalsLimit) {
|
||||
// Only first 2 intervals should be loaded
|
||||
EXPECT_DOUBLE_EQ(sim.get_object_value("test_channel", 5.0), 1.0); // First interval
|
||||
EXPECT_DOUBLE_EQ(sim.get_object_value("test_channel", 15.0), 2.0); // Second interval
|
||||
EXPECT_DOUBLE_EQ(sim.get_object_value("test_channel", 25.0), 2.0); // Third interval should not exist, holds second
|
||||
EXPECT_DOUBLE_EQ(sim.get_object_value("test_channel", 25.0), 2.0); // Third interval should not exist
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
Reference in New Issue
Block a user