Skip to content

Commit

Permalink
#2380: tests: Fix preprocessor clang if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrepebay committed Jan 29, 2025
1 parent b8fa81e commit 05d1f25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tests/unit/runtime/test_cli_arguments.extended.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ TEST_F(TestCliArguments, test_vt_assert) {
#if __clang_major__ == 9 || __clang_major__ == 10
GTEST_SKIP() << "Skipping test for Clang 9 or 10.";
#endif
#endif
#else
EXPECT_EQ(theConfig()->vt_no_assert_fail, false);

ASSERT_THROW(
vtAssert(false, "Should throw."),
std::runtime_error
);
#endif
}
#endif

Expand Down
3 changes: 1 addition & 2 deletions tests/unit/runtime/test_preconfig.nompi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,11 @@ struct TestPreconfig : TestHarness { };
TEST_F(TestPreconfig, test_vt_assert) {
#if vt_check_enabled(production_build) or defined(__INTEL_COMPILER)
GTEST_SKIP();
#else
#elif defined(__clang__)
#if __clang_major__ == 9 || __clang_major__ == 10
GTEST_SKIP() << "Skipping test for Clang 9 or 10.";
#endif
#endif
#else
EXPECT_EQ(vt::debug::preConfig()->vt_throw_on_abort, true)
<< "vt_throw_on_abort should be enabled by default";

Expand Down

0 comments on commit 05d1f25

Please sign in to comment.