aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-10-17 09:46:56 +0800
committerYuqian Yang <crupest@crupest.life>2025-10-17 09:46:56 +0800
commit9e4419826b3e23c63567591701a2834a837da98e (patch)
tree763838a83850f5cb07cff43915aa6be3a689bef0 /test
parenta6b5b8b879a9a587ec0ad605722d5d6428d5e68c (diff)
downloadcru-9e4419826b3e23c63567591701a2834a837da98e.tar.gz
cru-9e4419826b3e23c63567591701a2834a837da98e.tar.bz2
cru-9e4419826b3e23c63567591701a2834a837da98e.zip
Toml remove String.
Diffstat (limited to 'test')
-rw-r--r--test/base/StringUtilTest.cpp2
-rw-r--r--test/toml/ParserTest.cpp14
2 files changed, 8 insertions, 8 deletions
diff --git a/test/base/StringUtilTest.cpp b/test/base/StringUtilTest.cpp
index 6b826d74..3ce4cff1 100644
--- a/test/base/StringUtilTest.cpp
+++ b/test/base/StringUtilTest.cpp
@@ -7,7 +7,7 @@ using cru::Index;
using cru::k_invalid_code_point;
TEST_CASE("StringUtil Split", "[string]") {
- using cru::Split;
+ using cru::string::Split;
REQUIRE(Split("abc", "b") == std::vector<std::string>{"a", "c"});
REQUIRE(Split("abcd", "bc") == std::vector<std::string>{"a", "d"});
REQUIRE(Split("abcdbcd", "bc") == std::vector<std::string>{"a", "d", "d"});
diff --git a/test/toml/ParserTest.cpp b/test/toml/ParserTest.cpp
index b35b932a..4a4ba212 100644
--- a/test/toml/ParserTest.cpp
+++ b/test/toml/ParserTest.cpp
@@ -7,7 +7,7 @@ using namespace cru::toml;
TEST_CASE("CruTomlParserTest Simple", "[toml]") {
TomlParser parser(
- uR"(
+ R"(
a1 = v1
a2 = v2
# comment
@@ -22,10 +22,10 @@ a5 = v5
a6 = v6
)");
auto document = parser.Parse();
- REQUIRE(document.GetSection(u"")->GetValue(u"a1") == u"v1");
- REQUIRE(document.GetSection(u"")->GetValue(u"a2") == u"v2");
- REQUIRE(document.GetSection(u"s1")->GetValue(u"a3") == u"v3");
- REQUIRE(document.GetSection(u"s1")->GetValue(u"a4") == u"v4");
- REQUIRE(document.GetSection(u"s2")->GetValue(u"a5") == u"v5");
- REQUIRE(document.GetSection(u"s2")->GetValue(u"a6") == u"v6");
+ REQUIRE(document.GetSection("")->GetValue("a1") == "v1");
+ REQUIRE(document.GetSection("")->GetValue("a2") == "v2");
+ REQUIRE(document.GetSection("s1")->GetValue("a3") == "v3");
+ REQUIRE(document.GetSection("s1")->GetValue("a4") == "v4");
+ REQUIRE(document.GetSection("s2")->GetValue("a5") == "v5");
+ REQUIRE(document.GetSection("s2")->GetValue("a6") == "v6");
}