From c2776f660e00dd9c0ec4cc50369b2a9cf2ed3e70 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Wed, 2 Oct 2024 12:19:53 -0500 Subject: Fix error in string reserve. --- test/test_string.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_string.cpp b/test/test_string.cpp index d48112b..15646bd 100644 --- a/test/test_string.cpp +++ b/test/test_string.cpp @@ -56,10 +56,18 @@ TEST(FudString, BasicStringOps) TEST(FudString, HeapAlloc) { constexpr const char filenameLiteral[] = "Amazing Saga Volume 01/000.jpg"; - fud::String filename{filenameLiteral}; + String filename{filenameLiteral}; ASSERT_EQ(filename.length(), sizeof(filenameLiteral) - 1); } +TEST(FudString, Reserve) +{ + String testString{}; + ASSERT_TRUE(testString.valid()); + ASSERT_EQ(testString.reserve(256), FudStatus::Success); + ASSERT_TRUE(testString.valid()); +} + #if 0 TEST(FudString, FindSubstringCxx) { -- cgit v1.2.3