aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/serd_test.c5
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