diff options
author | David Robillard <d@drobilla.net> | 2019-02-24 19:19:11 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-04-13 19:48:23 +0200 |
commit | 16d4ccf422f8e470bf4bdc9458047831b0dc7116 (patch) | |
tree | 6510f04690492da87f5f1d399309a5756f784842 | |
parent | 65fbd3c8e9cbe78d1a342acd442019a010b058c2 (diff) | |
download | serd-16d4ccf422f8e470bf4bdc9458047831b0dc7116.tar.gz serd-16d4ccf422f8e470bf4bdc9458047831b0dc7116.tar.bz2 serd-16d4ccf422f8e470bf4bdc9458047831b0dc7116.zip |
Add test for serd_strerror with unknown errors
-rw-r--r-- | tests/serd_test.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c index d3a8f514..04dbeb01 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -299,13 +299,14 @@ main(void) // Test serd_strerror - const char* msg = NULL; - assert(!strcmp((msg = serd_strerror(SERD_SUCCESS)), "Success")); + const char* msg = serd_strerror(SERD_SUCCESS); + assert(!strcmp(msg, "Success")); for (int i = SERD_FAILURE; i <= SERD_ERR_NO_DATA; ++i) { msg = serd_strerror((SerdStatus)i); assert(strcmp(msg, "Success")); } msg = serd_strerror((SerdStatus)-1); + assert(!strcmp(msg, "Unknown error")); // Test file URI escaping and parsing |