diff options
Diffstat (limited to 'test/common/StringTest.cpp')
-rw-r--r-- | test/common/StringTest.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/common/StringTest.cpp b/test/common/StringTest.cpp index 1200a60b..a0895af9 100644 --- a/test/common/StringTest.cpp +++ b/test/common/StringTest.cpp @@ -2,8 +2,18 @@ #include <gtest/gtest.h> +TEST(String, Append) { + using cru::String; + + String s; + s.append(u"ha"); + s.append(s); + ASSERT_EQ(s, String(u"haha")); +} + TEST(String, Format) { using cru::Format; + using cru::String; - ASSERT_EQ(Format(u"{} + {} = {}", 123, 321, 444), u"123 + 321 = 444"); + ASSERT_EQ(Format(u"{} + {} = {}", 123, 321, 444), String(u"123 + 321 = 444")); } |