diff options
Diffstat (limited to 'test/test_string.cpp')
-rw-r--r-- | test/test_string.cpp | 8 |
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); } |