mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-27 03:39:04 +00:00
LibTest: Add EXPECT_CRASH_WITH_SIGNAL
This commit is contained in:
parent
b1b94692e6
commit
4c6e826c05
Notes:
sideshowbarker
2024-07-17 22:34:51 +09:00
Author: https://github.com/mhermier
Commit: 4c6e826c05
Pull-request: https://github.com/SerenityOS/serenity/pull/11291
6 changed files with 52 additions and 8 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <LibTest/TestCase.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <signal.h>
|
||||
|
||||
TEST_CASE(assert)
|
||||
{
|
||||
|
@ -14,4 +15,8 @@ TEST_CASE(assert)
|
|||
assert(!"This should assert");
|
||||
return Test::Crash::Failure::DidNotCrash;
|
||||
});
|
||||
EXPECT_CRASH_WITH_SIGNAL("This should assert with SIGABRT signal", SIGABRT, [] {
|
||||
assert(!"This should assert");
|
||||
return Test::Crash::Failure::DidNotCrash;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue