diff options
author | David Robillard <d@drobilla.net> | 2017-12-16 11:56:33 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-12-16 14:00:28 +0100 |
commit | fe8520a97cc7cd03ac121cb3b9651578afe5456f (patch) | |
tree | 4c656fc0d673b6eaffb4aa73aa89348331af5a1c /src/sord_test.c | |
parent | 0aab4478058a006819549e40946dc23dce05bafa (diff) | |
download | sord-fe8520a97cc7cd03ac121cb3b9651578afe5456f.tar.gz sord-fe8520a97cc7cd03ac121cb3b9651578afe5456f.tar.bz2 sord-fe8520a97cc7cd03ac121cb3b9651578afe5456f.zip |
Check contents in string tests
Diffstat (limited to 'src/sord_test.c')
-rw-r--r-- | src/sord_test.c | 4 |
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 |