mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
Tests: Add test for raise
This commit is contained in:
parent
0ec35d6d81
commit
c22c1900c0
2 changed files with 18 additions and 0 deletions
|
@ -11,6 +11,7 @@ set(TEST_SOURCES
|
||||||
TestLibCTime.cpp
|
TestLibCTime.cpp
|
||||||
TestMemmem.cpp
|
TestMemmem.cpp
|
||||||
TestQsort.cpp
|
TestQsort.cpp
|
||||||
|
TestRaise.cpp
|
||||||
TestRealpath.cpp
|
TestRealpath.cpp
|
||||||
TestScanf.cpp
|
TestScanf.cpp
|
||||||
TestSearch.cpp
|
TestSearch.cpp
|
||||||
|
|
17
Tests/LibC/TestRaise.cpp
Normal file
17
Tests/LibC/TestRaise.cpp
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021, the SerenityOS developers.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <LibTest/TestCase.h>
|
||||||
|
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
|
TEST_CASE(raise)
|
||||||
|
{
|
||||||
|
EXPECT_CRASH("This should raise a SIGUSR1 signal", [] {
|
||||||
|
raise(SIGUSR1);
|
||||||
|
return Test::Crash::Failure::DidNotCrash;
|
||||||
|
});
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue