Skip to content

Commit

Permalink
Bugfix for smoke test on gtest's death test feature in release config…
Browse files Browse the repository at this point in the history
…urations.

Was previously triggered on ``asert(false)``, which gets compiled out on Release builds.
Updated to ``exit(1)``.
  • Loading branch information
kennyweiss committed Aug 22, 2017
1 parent 2a1169d commit aa40fb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/blt_gtest_smoke.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ TEST(blt_gtest_smoke,basic_assert_example)
//------------------------------------------------------------------------------
// Tests the gtest death test feature, which are disabled by default.
//
// The call 'assert(false)' should exit the program, passing the test.
// Exits program with non-zero exit code, passing the test.
// Note: To enable death tests, configure BLT with ENABLE_GTEST_DEATH_TESTS.
//------------------------------------------------------------------------------
TEST(blt_gtest_smoke,death_test)
Expand All @@ -67,6 +67,6 @@ TEST(blt_gtest_smoke,death_test)

// Invoke death test function whether death tests enabled or disabled.
::testing::FLAGS_gtest_death_test_style = "threadsafe";
EXPECT_DEATH_IF_SUPPORTED( assert(false), "");
EXPECT_DEATH_IF_SUPPORTED( exit(1), "");
}

0 comments on commit aa40fb6

Please sign in to comment.