summaryrefslogtreecommitdiff
path: root/test/test_string.cpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-10-02 12:19:53 -0500
committerDominick Allen <djallen@librehumanitas.org>2024-10-02 12:19:53 -0500
commitc2776f660e00dd9c0ec4cc50369b2a9cf2ed3e70 (patch)
tree0b15f8bc3c57ab5e65692d542d2709008066c582 /test/test_string.cpp
parent7eea7cd5e5b451de9db5bd289f8b5d152d5803f5 (diff)
Fix error in string reserve.
Diffstat (limited to 'test/test_string.cpp')
-rw-r--r--test/test_string.cpp10
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)
{