aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-09-14 22:44:23 +0800
committercrupest <crupest@outlook.com>2021-09-14 22:44:23 +0800
commit7ad71df1cc81074747024620f421bfcb2bc6dbb1 (patch)
treecb300101cd6cd4da533a61b4d32271889bd7f283 /test
parent46d4838ac8ff1bd8658b57cf4ebb4438e396fce8 (diff)
downloadcru-7ad71df1cc81074747024620f421bfcb2bc6dbb1.tar.gz
cru-7ad71df1cc81074747024620f421bfcb2bc6dbb1.tar.bz2
cru-7ad71df1cc81074747024620f421bfcb2bc6dbb1.zip
...
Diffstat (limited to 'test')
-rw-r--r--test/common/StringTest.cpp12
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"));
}