summaryrefslogtreecommitdiff
path: root/test/test_string.cpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-10-29 23:16:46 -0500
committerDominick Allen <djallen@librehumanitas.org>2024-10-29 23:16:46 -0500
commit8dcb1de91e15ff7fc66279cd9cd9ad8a70f624e0 (patch)
treec73840b15a074cf37f59bc3b2eff56cde982d74f /test/test_string.cpp
parent8ce397e8c0a83e49e390de9deb73d588e4931ecf (diff)
u8 string literals
Diffstat (limited to 'test/test_string.cpp')
-rw-r--r--test/test_string.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test_string.cpp b/test/test_string.cpp
index 54e3802..9f5b24e 100644
--- a/test/test_string.cpp
+++ b/test/test_string.cpp
@@ -25,7 +25,8 @@ namespace fud {
TEST(FudString, CStringLength)
{
- ASSERT_EQ(cStringLength(nullptr), -1);
+ const char* nullPointer = nullPointer;
+ ASSERT_EQ(cStringLength(nullPointer), -1);
ASSERT_EQ(cStringLength(""), 0);
ASSERT_EQ(cStringLength("a"), 1);
ASSERT_EQ(cStringLength(MULTI_BYTE_LITERAL), sizeof(MULTI_BYTE_LITERAL) - 1);