diff options
author | Elliott Hughes <enh@google.com> | 2021-02-18 17:16:09 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2021-02-18 17:16:09 -0800 |
commit | 15122842ae78b0f46b14a51f1b98f966595a7f97 (patch) | |
tree | 6296636f21c3ded4ab84aeb9f0aaaff3c863601b /tests/assert_test.cpp | |
parent | 332065d57e734b65f56474d136d22d767e36cbcd (diff) | |
download | bionic-15122842ae78b0f46b14a51f1b98f966595a7f97.tar.gz |
Use BionicDeathTest for an assert(3) test.
Bug: http://b/180605583
Test: check logs
Change-Id: I5eebef156ea1185c605060fb7e9457ccaaadaf5d
Diffstat (limited to 'tests/assert_test.cpp')
-rw-r--r-- | tests/assert_test.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/assert_test.cpp b/tests/assert_test.cpp index 94361513d..714e22a59 100644 --- a/tests/assert_test.cpp +++ b/tests/assert_test.cpp @@ -19,14 +19,18 @@ #undef NDEBUG #include <assert.h> +#include "BionicDeathTest.h" + +using assert_DeathTest = BionicDeathTest; + TEST(assert, assert_true) { assert(true); } -TEST(assert, assert_false) { +TEST_F(assert_DeathTest, assert_false) { EXPECT_DEATH(assert(false), "bionic/tests/assert_test.cpp:.*: " - "virtual void assert_assert_false_Test::TestBody\\(\\): " + "virtual void assert_DeathTest_assert_false_Test::TestBody\\(\\): " "assertion \"false\" failed"); } |