From 53c4dcf374c66f1e9190f5a62a52d02fe11a69e6 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Wed, 16 Oct 2024 22:25:08 -0500 Subject: First crack at allocators. --- test/test_string.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/test_string.cpp') 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 invalid2{0xFF, 0x00}; - auto stringResult = String::makeFromCString(invalid2.data()); + auto stringResult = String::makeFromCString(reinterpret_cast(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); } -- cgit v1.2.3