Skip to content

Commit

Permalink
remove negative 0 allowance in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
hellkite500 authored and mattw-nws committed Mar 11, 2022
1 parent 7c7a747 commit 05ec60f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/realizations/catchments/Bmi_C_Formulation_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ TEST_F(Bmi_C_Formulation_Test, GetOutputLineForTimestep_0_a) {

formulation.get_response(0, 3600);
std::string output = formulation.get_output_line_for_timestep(0, ",");
EXPECT_THAT(output, MatchesRegex("-?0.000000,-?0.000000"));
EXPECT_THAT(output, MatchesRegex("0.000000,0.000000"));
}

/** Simple test of output with modified variables. */
Expand All @@ -323,7 +323,7 @@ TEST_F(Bmi_C_Formulation_Test, GetOutputLineForTimestep_1_a) {
// OUTPUT_VAR_1 first.
formulation.get_response(0, 3600);
std::string output = formulation.get_output_line_for_timestep(0, ",");
EXPECT_THAT(output, MatchesRegex("-?0.000000,-?0.000000"));
EXPECT_THAT(output, MatchesRegex("0.000000,0.000000"));
}

/** Simple test of output with modified variables, picking time step when there was non-zero rain rate. */
Expand All @@ -338,7 +338,7 @@ TEST_F(Bmi_C_Formulation_Test, GetOutputLineForTimestep_1_b) {
formulation.get_response(i++, 3600);
formulation.get_response(i, 3600);
std::string output = formulation.get_output_line_for_timestep(i, ",");
EXPECT_THAT(output, MatchesRegex("-?0.000000,0.000001"));
EXPECT_THAT(output, MatchesRegex("0.000000,0.000001"));
}

TEST_F(Bmi_C_Formulation_Test, determine_model_time_offset_0_a) {
Expand Down

0 comments on commit 05ec60f

Please sign in to comment.