aboutsummaryrefslogtreecommitdiffstats
path: root/tests/model_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/model_test.c')
-rw-r--r--tests/model_test.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/model_test.c b/tests/model_test.c
index 395da7c3..fb242adf 100644
--- a/tests/model_test.c
+++ b/tests/model_test.c
@@ -325,18 +325,18 @@ test_read(SerdWorld* world, SerdModel* model, SerdNode* g, const size_t n_quads)
}
static SerdStatus
-unexpected_error(void* handle, const SerdError* error)
+unexpected_error(void* handle, const SerdMessage* msg)
{
fprintf(stderr, "error: ");
- vfprintf(stderr, error->fmt, *error->args);
+ vfprintf(stderr, msg->fmt, *msg->args);
return SERD_SUCCESS;
}
static SerdStatus
-expected_error(void* handle, const SerdError* error)
+expected_error(void* handle, const SerdMessage* msg)
{
fprintf(stderr, "expected: ");
- vfprintf(stderr, error->fmt, *error->args);
+ vfprintf(stderr, msg->fmt, *msg->args);
return SERD_SUCCESS;
}
@@ -380,7 +380,7 @@ test_add_null(SerdWorld* world, const size_t n_quads)
{
SerdModel* model = serd_model_new(world, SERD_SPO, false);
- serd_world_set_error_sink(world, expected_error, NULL);
+ serd_world_set_message_sink(world, expected_error, NULL);
if (!serd_model_add(model, 0, 0, 0, 0)) {
FAIL("Added NULL tuple\n");
} else if (!serd_model_add(model, uri(world, 1), 0, 0, 0)) {
@@ -400,7 +400,7 @@ test_add_with_iterator(SerdWorld* world, const size_t n_quads)
{
SerdModel* model = serd_model_new(world, SERD_SPO, false);
- serd_world_set_error_sink(world, expected_error, NULL);
+ serd_world_set_message_sink(world, expected_error, NULL);
if (serd_model_add(model, uri(world, 1), uri(world, 2), uri(world, 3), 0)) {
FAIL("Failed to add statement\n");
}
@@ -428,7 +428,7 @@ test_erase_with_iterator(SerdWorld* world, const size_t n_quads)
{
SerdModel* model = serd_model_new(world, SERD_SPO, false);
- serd_world_set_error_sink(world, expected_error, NULL);
+ serd_world_set_message_sink(world, expected_error, NULL);
if (serd_model_add(model, uri(world, 1), uri(world, 2), uri(world, 3), 0) ||
serd_model_add(model, uri(world, 4), uri(world, 5), uri(world, 6), 0)) {
FAIL("Failed to add statements\n");
@@ -604,7 +604,7 @@ test_iter_comparison(SerdWorld* world, const size_t n_quads)
{
SerdModel* model = serd_model_new(world, SERD_SPO, false);
- serd_world_set_error_sink(world, expected_error, NULL);
+ serd_world_set_message_sink(world, expected_error, NULL);
if (serd_model_add(model, uri(world, 1), uri(world, 2), uri(world, 3), 0)) {
FAIL("Failed to add statement\n");
}
@@ -826,7 +826,7 @@ main(int argc, char** argv)
SerdWorld* world = serd_world_new();
for (const TestFunc* t = tests; *t; ++t) {
- serd_world_set_error_sink(world, unexpected_error, NULL);
+ serd_world_set_message_sink(world, unexpected_error, NULL);
if ((*t)(world, n_quads)) {
return EXIT_FAILURE;
}