diff options
Diffstat (limited to 'Userland/Libraries/LibTest/Macros.h')
-rw-r--r-- | Userland/Libraries/LibTest/Macros.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibTest/Macros.h b/Userland/Libraries/LibTest/Macros.h index d0dca516aa..6f32e0ae13 100644 --- a/Userland/Libraries/LibTest/Macros.h +++ b/Userland/Libraries/LibTest/Macros.h @@ -134,3 +134,10 @@ void current_test_case_did_fail(); if (!crash.run()) \ ::Test::current_test_case_did_fail(); \ } while (false) + +#define EXPECT_NO_CRASH(test_message, test_func) \ + do { \ + Test::Crash crash(test_message, test_func, 0); \ + if (!crash.run()) \ + ::Test::current_test_case_did_fail(); \ + } while (false) |