From 7ad71df1cc81074747024620f421bfcb2bc6dbb1 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 14 Sep 2021 22:44:23 +0800 Subject: ... --- test/common/StringTest.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'test/common/StringTest.cpp') 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 +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")); } -- cgit v1.2.3