diff options
author | crupest <crupest@outlook.com> | 2021-09-14 22:44:23 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-09-14 22:44:23 +0800 |
commit | 7ad71df1cc81074747024620f421bfcb2bc6dbb1 (patch) | |
tree | cb300101cd6cd4da533a61b4d32271889bd7f283 /test | |
parent | 46d4838ac8ff1bd8658b57cf4ebb4438e396fce8 (diff) | |
download | cru-7ad71df1cc81074747024620f421bfcb2bc6dbb1.tar.gz cru-7ad71df1cc81074747024620f421bfcb2bc6dbb1.tar.bz2 cru-7ad71df1cc81074747024620f421bfcb2bc6dbb1.zip |
...
Diffstat (limited to 'test')
-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")); } |