Skip to content

Commit

Permalink
10299 Correction of Unit Test Errors
Browse files Browse the repository at this point in the history
A couple of issues were seen in ci results.  This commit is an attempt to fix them.
  • Loading branch information
RKStrand committed Jul 22, 2024
1 parent c688048 commit e5809d3
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions tst/EnergyPlus/unit/SolarShading.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3900,18 +3900,18 @@ TEST_F(EnergyPlusFixture, SolarShadingTest_Warn_Pixel_Count_and_TM_Schedule)
SolarShading::processShadowingInput(*state);

#ifdef EP_NO_OPENGL
EXPECT_EQ(state->dataErrTracking->TotalWarningErrors, 2);
EXPECT_EQ(state->dataErrTracking->TotalSevereErrors, 0);
EXPECT_EQ(state->dataErrTracking->TotalWarningErrors, 1);
EXPECT_EQ(state->dataErrTracking->TotalSevereErrors, 0;
EXPECT_EQ(state->dataErrTracking->LastSevereError, "");
#else
if (!Penumbra::Penumbra::is_valid_context()) {
EXPECT_EQ(state->dataErrTracking->TotalWarningErrors, 2);
EXPECT_EQ(state->dataErrTracking->TotalSevereErrors, 0);
EXPECT_EQ(state->dataErrTracking->LastSevereError, "");
EXPECT_EQ(state->dataErrTracking->TotalSevereErrors, 1);
EXPECT_EQ(state->dataErrTracking->LastSevereError, "The Shading Calculation Method of choice is \"PixelCounting\"; ");
} else {
EXPECT_EQ(state->dataErrTracking->TotalWarningErrors, 1);
EXPECT_EQ(state->dataErrTracking->TotalSevereErrors, 0);
EXPECT_EQ(state->dataErrTracking->LastSevereError, "");
EXPECT_EQ(state->dataErrTracking->TotalSevereErrors, 1);
EXPECT_EQ(state->dataErrTracking->LastSevereError, "The Shading Calculation Method of choice is \"PixelCounting\"; ");
}
#endif
}
Expand Down Expand Up @@ -6151,7 +6151,22 @@ TEST_F(EnergyPlusFixture, SolarShadingTest_GetShadowingInputTest6)
EXPECT_TRUE(state->dataSysVars->SutherlandHodgman);
EXPECT_TRUE(state->dataSysVars->SlaterBarsky);
EXPECT_ENUM_EQ(state->dataSysVars->shadingMethod, ShadingMethod::PixelCounting);

#ifdef EP_NO_OPENGL
std::string const error_string = delimited_string({" ** Warning ** ShadowCalculation: suspect Shading Calculation Update Frequency",
" ** ~~~ ** Value entered=[56], Shadowing Calculations will be inaccurate."});
" ** ~~~ ** Value entered=[56], Shadowing Calculations will be inaccurate.",
" ** Warning ** No GPU found (required for PixelCounting)",
" ** ~~~ ** PolygonClipping will be used instead"});
EXPECT_TRUE(compare_err_stream(error_string, true));
#else
if (!Penumbra::Penumbra::is_valid_context()) {
std::string const error_string = delimited_string({" ** Warning ** ShadowCalculation: suspect Shading Calculation Update Frequency",
" ** ~~~ ** Value entered=[56], Shadowing Calculations will be inaccurate."});
EXPECT_TRUE(compare_err_stream(error_string, true));
} else {
std::string const error_string = delimited_string({" ** Warning ** ShadowCalculation: suspect Shading Calculation Update Frequency",
" ** ~~~ ** Value entered=[56], Shadowing Calculations will be inaccurate."});
EXPECT_TRUE(compare_err_stream(error_string, true));
}
#endif
}

5 comments on commit e5809d3

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10299CheckConvexityChangeCheckForShadowCalculations (RKStrand) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3691 of 3691 tests passed, 791 test warnings)

Messages:\n

  • 791 tests had: EIO diffs.

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10299CheckConvexityChangeCheckForShadowCalculations (RKStrand) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (2064 of 2066 tests passed, 0 test warnings)

Failures:\n

API Test Summary

  • Passed: 13
  • NUMERICAL: 2

Build Badge Test Badge Coverage Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10299CheckConvexityChangeCheckForShadowCalculations (RKStrand) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (795 of 795 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10299CheckConvexityChangeCheckForShadowCalculations (RKStrand) - Win64-Windows-10-VisualStudio-16: OK (2854 of 2858 tests passed, 0 test warnings)

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1567
  • Failed: 4

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10299CheckConvexityChangeCheckForShadowCalculations (RKStrand) - x86_64-MacOS-10.18-clang-15.0.0: OK (3650 of 3650 tests passed, 787 test warnings)

Messages:\n

  • 787 tests had: EIO diffs.

Build Badge Test Badge

Please sign in to comment.