summaryrefslogtreecommitdiffstats
path: root/src/sord_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sord_test.c')
-rw-r--r--src/sord_test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sord_test.c b/src/sord_test.c
index ab2b918..9bb39a5 100644
--- a/src/sord_test.c
+++ b/src/sord_test.c
@@ -554,6 +554,8 @@ main(int argc, char** argv)
str = sord_node_get_string_measured(lit_id2, &n_bytes, &n_chars);
if (n_bytes != strlen("hello") || n_chars != strlen("hello")) {
return test_fail("ASCII literal measured length incorrect\n");
+ } else if (strcmp((const char*)str, "hello")) {
+ return test_fail("ASCII literal string incorrect\n");
}
str = sord_node_get_string_measured(chello, &n_bytes, &n_chars);
@@ -561,6 +563,8 @@ main(int argc, char** argv)
return test_fail("Multi-byte literal byte count incorrect\n");
} else if (n_chars != 2) {
return test_fail("Multi-byte literal character count incorrect\n");
+ } else if (strcmp((const char*)str, (const char*)ni_hao)) {
+ return test_fail("Multi-byte literal string incorrect\n");
}
// Check interning doesn't clash non-equivalent values