aboutsummaryrefslogtreecommitdiff
path: root/test/common/StringUtilTest.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-20 22:25:16 +0800
committercrupest <crupest@outlook.com>2022-01-20 22:25:16 +0800
commitb68d2027fe7505c14899db9fa1496b5ace09e25f (patch)
tree8361112fdf5a245794070ae8d58279c4b91cc54b /test/common/StringUtilTest.cpp
parent3c3a08a02a0f8fc56dc2da3374f025d4fdaf62c5 (diff)
downloadcru-b68d2027fe7505c14899db9fa1496b5ace09e25f.tar.gz
cru-b68d2027fe7505c14899db9fa1496b5ace09e25f.tar.bz2
cru-b68d2027fe7505c14899db9fa1496b5ace09e25f.zip
...
Diffstat (limited to 'test/common/StringUtilTest.cpp')
-rw-r--r--test/common/StringUtilTest.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/test/common/StringUtilTest.cpp b/test/common/StringUtilTest.cpp
index 5e1753b8..0fc63685 100644
--- a/test/common/StringUtilTest.cpp
+++ b/test/common/StringUtilTest.cpp
@@ -1,3 +1,4 @@
+#include "cru/common/String.hpp"
#include "cru/common/StringUtil.hpp"
#include <gtest/gtest.h>
@@ -91,22 +92,6 @@ TEST(StringUtil, Utf16CodePointIterator) {
ASSERT_EQ(code_points, expected_code_points);
}
-TEST(StringUtil, ToUtf8) {
- using cru::ToUtf8;
- std::u16string_view utf16_text = u"aπ你🤣!";
- std::string_view utf8_text = "aπ你🤣!";
-
- ASSERT_EQ(ToUtf8(utf16_text.data(), utf16_text.size()), utf8_text);
-}
-
-TEST(StringUtil, ToUtf16) {
- using cru::ToUtf16;
- std::u16string_view utf16_text = u"aπ你🤣!";
- std::string_view utf8_text = "aπ你🤣!";
-
- ASSERT_EQ(ToUtf16(utf8_text.data(), utf8_text.size()), utf16_text);
-}
-
// TEST(WinString, IndexUtf8ToUtf16) {
// using cru::platform::win::IndexUtf8ToUtf16;
// std::string_view utf8_string = "aπ你🤣!";