diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 195aa699acf565f8edd2ef5a80a515ede3092348..042dca3f0d80e37f3753ca8566d70b4ef0e2f124 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -70,6 +70,7 @@ add_executable (unit_tests test_PCG.cpp test_PugsAssert.cpp test_RevisionInfo.cpp + test_RuntimeError.cpp test_SparseMatrixDescriptor.cpp test_SymbolTable.cpp test_TinyMatrix.cpp diff --git a/tests/test_RuntimeError.cpp b/tests/test_RuntimeError.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cd1216cca89ca87535d872ca4d79a5127ae4c956 --- /dev/null +++ b/tests/test_RuntimeError.cpp @@ -0,0 +1,11 @@ +#include <catch2/catch.hpp> + +#include <language/utils/RuntimeError.hpp> + +// clazy:excludeall=non-pod-global-static + +TEST_CASE("RuntimeError", "[language]") +{ + RuntimeError e{"error message"}; + REQUIRE(e.message() == "error message"); +}