diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-10-02 12:19:53 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-10-02 12:19:53 -0500 |
commit | c2776f660e00dd9c0ec4cc50369b2a9cf2ed3e70 (patch) | |
tree | 0b15f8bc3c57ab5e65692d542d2709008066c582 /test | |
parent | 7eea7cd5e5b451de9db5bd289f8b5d152d5803f5 (diff) |
Fix error in string reserve.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_string.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
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) { |