Skip to content

Commit

Permalink
correct log with id
Browse files Browse the repository at this point in the history
  • Loading branch information
payetvin committed Dec 17, 2024
1 parent 6c14f79 commit efb0bbb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/tests/src/study/system-model/test_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ BOOST_AUTO_TEST_CASE(fail_on_no_params1)
.withScenarioGroupId("scenario_group");
BOOST_CHECK_EXCEPTION(component_builder.build(),
std::invalid_argument,
checkMessage("The component has 0 parameter(s), but its model has 2"));
checkMessage("The component \"component\" has 0 parameter(s), but its model has 2"));
}

BOOST_AUTO_TEST_CASE(fail_on_no_params2)
Expand All @@ -171,7 +171,7 @@ BOOST_AUTO_TEST_CASE(fail_on_no_params2)
.withScenarioGroupId("scenario_group");
BOOST_CHECK_EXCEPTION(component_builder.build(),
std::invalid_argument,
checkMessage("The component has 0 parameter(s), but its model has 2"));
checkMessage("The component \"component\" has 0 parameter(s), but its model has 2"));
}

BOOST_AUTO_TEST_CASE(fail_on_missing_param)
Expand All @@ -183,7 +183,7 @@ BOOST_AUTO_TEST_CASE(fail_on_missing_param)
.withScenarioGroupId("scenario_group");
BOOST_CHECK_EXCEPTION(component_builder.build(),
std::invalid_argument,
checkMessage("The component has 1 parameter(s), but its model has 2"));
checkMessage("The component \"component\" has 1 parameter(s), but its model has 2"));
}

BOOST_AUTO_TEST_CASE(fail_on_missing_wrong_param)
Expand All @@ -195,7 +195,7 @@ BOOST_AUTO_TEST_CASE(fail_on_missing_wrong_param)
.withScenarioGroupId("scenario_group");
BOOST_CHECK_EXCEPTION(component_builder.build(),
std::invalid_argument,
checkMessage("The component has no value for parameter 'param1'"));
checkMessage("The component \"component\" has no value for parameter 'param1'"));
}

BOOST_AUTO_TEST_CASE(fail_on_too_many_params1)
Expand All @@ -207,7 +207,7 @@ BOOST_AUTO_TEST_CASE(fail_on_too_many_params1)
.withScenarioGroupId("scenario_group");
BOOST_CHECK_EXCEPTION(component_builder.build(),
std::invalid_argument,
checkMessage("The component has 3 parameter(s), but its model has 2"));
checkMessage("The component \"component\" has 3 parameter(s), but its model has 2"));
}

BOOST_AUTO_TEST_CASE(fail_on_too_many_params2)
Expand All @@ -219,7 +219,7 @@ BOOST_AUTO_TEST_CASE(fail_on_too_many_params2)
.withScenarioGroupId("scenario_group");
BOOST_CHECK_EXCEPTION(component_builder.build(),
std::invalid_argument,
checkMessage("The component has 1 parameter(s), but its model has 0"));
checkMessage("The component \"component\" has 1 parameter(s), but its model has 0"));
}

BOOST_AUTO_TEST_SUITE_END()

0 comments on commit efb0bbb

Please sign in to comment.