summaryrefslogtreecommitdiff
path: root/test/test_string.cpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-10-16 22:25:08 -0500
committerDominick Allen <djallen@librehumanitas.org>2024-10-16 22:25:08 -0500
commit53c4dcf374c66f1e9190f5a62a52d02fe11a69e6 (patch)
treeee40277c36fdba58fb06aca87b8ffa67ab5f8558 /test/test_string.cpp
parentf3ac764684c64fbdd2094853a80b23e570cd5d9c (diff)
First crack at allocators.
Diffstat (limited to 'test/test_string.cpp')
-rw-r--r--test/test_string.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_string.cpp b/test/test_string.cpp
index 6d963c4..61052ef 100644
--- a/test/test_string.cpp
+++ b/test/test_string.cpp
@@ -38,10 +38,10 @@ TEST(FudString, BasicStringOps)
ASSERT_FALSE(Ascii::valid(invalid[0]));
const Array<utf8, 2> invalid2{0xFF, 0x00};
- auto stringResult = String::makeFromCString(invalid2.data());
+ auto stringResult = String::makeFromCString(reinterpret_cast<const char*>(invalid2.data()));
ASSERT_TRUE(stringResult.isOkay());
- String fudString{stringResult.getOkay()};
+ String fudString{stringResult.takeOkay()};
ASSERT_EQ(fudString.length(), 1);
ASSERT_EQ(fudString.data()[0], invalid[0]);
ASSERT_FALSE(Ascii::valid(fudString.data()[0]));
@@ -49,7 +49,7 @@ TEST(FudString, BasicStringOps)
stringResult = String::makeFromCString("TEST");
ASSERT_TRUE(stringResult.isOkay());
- fudString = stringResult.getOkay();
+ fudString = stringResult.takeOkay();
ASSERT_TRUE(fudString.utf8Valid());
@@ -65,7 +65,7 @@ TEST(FudString, HeapAlloc)
constexpr const char filenameLiteral[] = "Amazing Saga Volume 01/000.jpg";
auto filenameResult{String::makeFromCString(filenameLiteral)};
ASSERT_TRUE(filenameResult.isOkay());
- auto filename{filenameResult.getOkay()};
+ auto filename{filenameResult.takeOkay()};
ASSERT_EQ(filename.length(), sizeof(filenameLiteral) - 1);
}