From 0c991ef1d567cf87d7be6ab219b70767809b6397 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Fri, 1 Dec 2023 18:52:05 +0100 Subject: core: Fixed constexpr string_literal sum --- tests/core.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/core.cpp') diff --git a/tests/core.cpp b/tests/core.cpp index 5b6c116..281cca6 100644 --- a/tests/core.cpp +++ b/tests/core.cpp @@ -1,6 +1,7 @@ #include #include #include +#include namespace { SAW_TEST("ID functionality") { @@ -28,6 +29,16 @@ SAW_TEST("ID functionality") { SAW_EXPECT(a.get_value() == 1, "Lost original value"); } +SAW_TEST("String Literal Append"){ + using namespace saw; + + constexpr string_literal a = "foo"; + constexpr string_literal b = "bar"; + constexpr string_literal c = a+b; + + SAW_EXPECT(c == "foobar", "CT String sum is not \"foobar\""); +} + SAW_TEST("ID Map Insert"){ using namespace saw; -- cgit v1.2.3