mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:37:35 +00:00
LibTest: Add EXPECT_NO_CRASH
This commit is contained in:
parent
4c6e826c05
commit
7a44c11378
5 changed files with 31 additions and 0 deletions
|
@ -14,6 +14,7 @@ add_subdirectory(LibMarkdown)
|
|||
add_subdirectory(LibPthread)
|
||||
add_subdirectory(LibRegex)
|
||||
add_subdirectory(LibSQL)
|
||||
add_subdirectory(LibTest)
|
||||
add_subdirectory(LibThreading)
|
||||
add_subdirectory(LibUnicode)
|
||||
add_subdirectory(LibWasm)
|
||||
|
|
7
Tests/LibTest/CMakeLists.txt
Normal file
7
Tests/LibTest/CMakeLists.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
set(TEST_SOURCES
|
||||
TestNoCrash.cpp
|
||||
)
|
||||
|
||||
foreach(source IN LISTS TEST_SOURCES)
|
||||
serenity_test("${source}" LibSQL LIBS LibSQL LibIPC)
|
||||
endforeach()
|
14
Tests/LibTest/TestNoCrash.cpp
Normal file
14
Tests/LibTest/TestNoCrash.cpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* Copyright (c) 2021, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibTest/TestCase.h>
|
||||
|
||||
TEST_CASE(raise)
|
||||
{
|
||||
EXPECT_NO_CRASH("This should never crash", [] {
|
||||
return Test::Crash::Failure::DidNotCrash;
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue