17GTEST_TEST(testErrorHandling, errorPrintsMessageToStandardError)
19 testing::internal::CaptureStderr();
21 DryChem::printErrorMessage<DryChem::ErrorSeverity::Warning>(
22 DryChem::ErrorMessage {
"Common-Utilities",
"Testing the output of the non-fatal error message command."});
24 std::string output = testing::internal::GetCapturedStderr();
25 ASSERT_EQ(output,
"Common-Utilities Warning:\n Testing the output of the non-fatal error message command.\n");
38GTEST_TEST(testErrorHandling, defaultTemplateParameterIsAWarning)
40 testing::internal::CaptureStderr();
42 DryChem::printErrorMessage(
43 DryChem::ErrorMessage {
"Common-Utilities",
"Testing the output of the non-fatal error message command."});
45 std::string output = testing::internal::GetCapturedStderr();
46 ASSERT_EQ(output,
"Common-Utilities Warning:\n Testing the output of the non-fatal error message command.\n");