Skip to content

Commit

Permalink
Cleaned up code
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhjp01 committed Nov 16, 2024
1 parent 00ced51 commit 212f007
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion tests/last_value_observer_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ int main()

observer->get_real(sim, gsl::make_span(&realInRef, 1), gsl::make_span(&realInValue, 1));
observer->get_real(sim, gsl::make_span(&realOutRef, 1), gsl::make_span(&realOutValue, 1));
std::cout << realInValue << std::endl;
REQUIRE(std::fabs(realInValue - 2.0) < 1.0e-9);
REQUIRE(std::fabs(realOutValue - 3.234) < 1.0e-9);

Expand Down
4 changes: 2 additions & 2 deletions tests/state_init_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ int main()
execution.simulate_until(cosim::to_time_point(0.1));

auto sim = entityMaps.simulators.at("example");
const auto inRef = config.system_structure.get_variable_description({"example", "Parameters.Integrator1_x0"}).reference;
const auto paramRef = config.system_structure.get_variable_description({"example", "Parameters.Integrator1_x0"}).reference;
const auto outRef = config.system_structure.get_variable_description({"example", "Integrator_out1"}).reference;

double initialValue = 0.0;
double outputValue = 0.0;
lvObserver->get_real(sim, gsl::make_span(&inRef, 1), gsl::make_span(&initialValue, 1));
lvObserver->get_real(sim, gsl::make_span(&paramRef, 1), gsl::make_span(&initialValue, 1));
lvObserver->get_real(sim, gsl::make_span(&outRef, 1), gsl::make_span(&outputValue, 1));

REQUIRE(std::fabs(initialValue - 10.0) < 1.0e-9);
Expand Down

0 comments on commit 212f007

Please sign in to comment.