aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-05-05 10:34:37 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 16:27:02 -0500
commitfebb30141356df83a56026bbb14099e3cb2c82fc (patch)
treef1d2abcdc3872e375ffe8e4138a8043c20b3b1a8 /test
parentb739848b6ea4c038610ceb7c0b00984a86d99fa9 (diff)
downloadserd-febb30141356df83a56026bbb14099e3cb2c82fc.tar.gz
serd-febb30141356df83a56026bbb14099e3cb2c82fc.tar.bz2
serd-febb30141356df83a56026bbb14099e3cb2c82fc.zip
Use more human-readable status codes
Diffstat (limited to 'test')
-rw-r--r--test/test_reader_writer.c2
-rw-r--r--test/test_string.c2
-rw-r--r--test/test_writer.c6
3 files changed, 5 insertions, 5 deletions
diff --git a/test/test_reader_writer.c b/test/test_reader_writer.c
index 0fcc5ba3..f6dfe512 100644
--- a/test/test_reader_writer.c
+++ b/test/test_reader_writer.c
@@ -435,7 +435,7 @@ test_write_errors(void)
serd_writer_set_error_sink(writer, quiet_error_sink, NULL);
const SerdStatus st = serd_reader_read_string(reader, doc_string);
- assert(st == SERD_ERR_BAD_WRITE);
+ assert(st == SERD_BAD_WRITE);
serd_reader_free(reader);
serd_writer_free(writer);
diff --git a/test/test_string.c b/test/test_string.c
index 3e6e77e5..49106f0a 100644
--- a/test/test_string.c
+++ b/test/test_string.c
@@ -29,7 +29,7 @@ test_strerror(void)
{
const char* msg = serd_strerror(SERD_SUCCESS);
assert(!strcmp(msg, "Success"));
- for (int i = SERD_FAILURE; i <= SERD_ERR_BAD_TEXT; ++i) {
+ for (int i = SERD_FAILURE; i <= SERD_BAD_LITERAL; ++i) {
msg = serd_strerror((SerdStatus)i);
assert(strcmp(msg, "Success"));
}
diff --git a/test/test_writer.c b/test/test_writer.c
index 0a823d2b..6a7a35b5 100644
--- a/test/test_writer.c
+++ b/test/test_writer.c
@@ -118,10 +118,10 @@ test_strict_write(void)
SerdNode bad_uri = serd_node_from_string(SERD_URI, (const char*)bad_str);
assert(serd_writer_write_statement(
- writer, 0, NULL, &s, &p, &bad_lit, NULL, NULL) == SERD_ERR_BAD_TEXT);
+ writer, 0, NULL, &s, &p, &bad_lit, NULL, NULL) == SERD_BAD_TEXT);
assert(serd_writer_write_statement(
- writer, 0, NULL, &s, &p, &bad_uri, NULL, NULL) == SERD_ERR_BAD_TEXT);
+ writer, 0, NULL, &s, &p, &bad_uri, NULL, NULL) == SERD_BAD_TEXT);
serd_writer_free(writer);
serd_env_free(env);
@@ -152,7 +152,7 @@ test_write_error(void)
SERD_TURTLE, (SerdWriterFlags)0, env, NULL, error_sink, NULL);
assert(writer);
st = serd_writer_write_statement(writer, 0U, NULL, &u, &u, &u, NULL, NULL);
- assert(st == SERD_ERR_BAD_WRITE);
+ assert(st == SERD_BAD_WRITE);
serd_writer_free(writer);
serd_env_free(env);