From 028de51d93185e31775ddeaf1de84299cafe16d3 Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Wed, 10 Jun 2020 17:27:18 +0200
Subject: [PATCH] Add tests for RuntimeError

---
 tests/CMakeLists.txt        |  1 +
 tests/test_RuntimeError.cpp | 11 +++++++++++
 2 files changed, 12 insertions(+)
 create mode 100644 tests/test_RuntimeError.cpp

diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 195aa699a..042dca3f0 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 000000000..cd1216cca
--- /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");
+}
-- 
GitLab