Skip to content

Commit

Permalink
Making messages consistent in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-parent committed Oct 17, 2024
1 parent 6c4c6d4 commit 31d73e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions test/custom_lightweight_configuration_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ TEST(CustomLightweightConfiguration, FailedChecksThrow)
EXPECT_THROW(ADOBE_PRECONDITION(false), std::logic_error);
EXPECT_THROW(ADOBE_INVARIANT(false), std::logic_error);

EXPECT_THROW(ADOBE_PRECONDITION(false, "##########"), std::logic_error);
EXPECT_THROW(ADOBE_INVARIANT(false, "#########"), std::logic_error);
EXPECT_THROW(ADOBE_PRECONDITION(false, "% Message %"), std::logic_error);
EXPECT_THROW(ADOBE_INVARIANT(false, "% Message %"), std::logic_error);
}

TEST(CustomLightweightConfiguration, ContractNonViolationsDoNotThrow)
{
ADOBE_PRECONDITION(true);
ADOBE_INVARIANT(true);

ADOBE_PRECONDITION(true, "##########");
ADOBE_INVARIANT(true, "#########");
ADOBE_PRECONDITION(true, "% Message %");
ADOBE_INVARIANT(true, "% Message %");
}
4 changes: 2 additions & 2 deletions test/lightweight_configuration_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ TEST(LightweightConfiguration, ContractNonViolationsDoNotCauseAbort)
ADOBE_PRECONDITION(true);
ADOBE_INVARIANT(true);

ADOBE_PRECONDITION(true, "##########");
ADOBE_INVARIANT(true, "#########");
ADOBE_PRECONDITION(true, "% Message %"");

Check warning on line 34 in test/lightweight_configuration_tests.cpp

View workflow job for this annotation

GitHub Actions / Analyze (cpp, gcc-11, Ninja Multi-Config, Debug, ON)

missing terminating " character

Check failure on line 34 in test/lightweight_configuration_tests.cpp

View workflow job for this annotation

GitHub Actions / Analyze (cpp, gcc-11, Ninja Multi-Config, Debug, ON)

‘ADOBE_PRECONDITION’ was not declared in this scope

Check failure on line 34 in test/lightweight_configuration_tests.cpp

View workflow job for this annotation

GitHub Actions / Analyze (cpp, gcc-11, Ninja Multi-Config, Debug, ON)

expected ‘}’ at end of input
ADOBE_INVARIANT(true, "% Message %");
}
#if defined(__EMSCRIPTEN__) && 0

Check warning on line 38 in test/lightweight_configuration_tests.cpp

View workflow job for this annotation

GitHub Actions / Analyze (cpp, gcc-11, Ninja Multi-Config, Debug, ON)

embedding a directive within macro arguments is not portable
Expand Down

0 comments on commit 31d73e4

Please sign in to comment.