diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/LibTest/CMakeLists.txt | 7 | ||||
-rw-r--r-- | Tests/LibTest/TestNoCrash.cpp | 14 |
3 files changed, 22 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 0a2f7c9fd5..920f64749f 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -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) diff --git a/Tests/LibTest/CMakeLists.txt b/Tests/LibTest/CMakeLists.txt new file mode 100644 index 0000000000..1efe46d0c4 --- /dev/null +++ b/Tests/LibTest/CMakeLists.txt @@ -0,0 +1,7 @@ +set(TEST_SOURCES + TestNoCrash.cpp +) + +foreach(source IN LISTS TEST_SOURCES) + serenity_test("${source}" LibSQL LIBS LibSQL LibIPC) +endforeach() diff --git a/Tests/LibTest/TestNoCrash.cpp b/Tests/LibTest/TestNoCrash.cpp new file mode 100644 index 0000000000..d29fad6db7 --- /dev/null +++ b/Tests/LibTest/TestNoCrash.cpp @@ -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; + }); +} |