diff options
author | crupest <crupest@outlook.com> | 2021-09-14 22:10:02 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-09-14 22:10:02 +0800 |
commit | 46d4838ac8ff1bd8658b57cf4ebb4438e396fce8 (patch) | |
tree | f1e04c19630c7f42ad57618e9a2d7cf5ea4d31c1 /test | |
parent | 9bc202a2e1664df3e3c148abfe90a90501bc1650 (diff) | |
download | cru-46d4838ac8ff1bd8658b57cf4ebb4438e396fce8.tar.gz cru-46d4838ac8ff1bd8658b57cf4ebb4438e396fce8.tar.bz2 cru-46d4838ac8ff1bd8658b57cf4ebb4438e396fce8.zip |
...
Diffstat (limited to 'test')
-rw-r--r-- | test/common/CMakeLists.txt | 2 | ||||
-rw-r--r-- | test/common/StringTest.cpp | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/common/CMakeLists.txt b/test/common/CMakeLists.txt index c1fd078d..730607d2 100644 --- a/test/common/CMakeLists.txt +++ b/test/common/CMakeLists.txt @@ -1,4 +1,6 @@ add_executable(cru_base_test + HandlerRegistryTest.cpp + StringTest.cpp StringUtilTest.cpp ) target_link_libraries(cru_base_test PRIVATE cru_base cru_test_base) diff --git a/test/common/StringTest.cpp b/test/common/StringTest.cpp new file mode 100644 index 00000000..1200a60b --- /dev/null +++ b/test/common/StringTest.cpp @@ -0,0 +1,9 @@ +#include "cru/common/String.hpp" + +#include <gtest/gtest.h> + +TEST(String, Format) { + using cru::Format; + + ASSERT_EQ(Format(u"{} + {} = {}", 123, 321, 444), u"123 + 321 = 444"); +} |