diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/env_test.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/env_test.c b/tests/env_test.c index d80eb1f8..b636048b 100644 --- a/tests/env_test.c +++ b/tests/env_test.c @@ -85,9 +85,11 @@ test_env(void) assert(!serd_env_expand(env, blank)); serd_node_free(blank); - int n_prefixes = 0; + size_t n_prefixes = 0; + SerdSink* count_prefixes_sink = serd_sink_new(&n_prefixes); + serd_sink_set_prefix_func(count_prefixes_sink, count_prefixes); serd_env_set_prefix(env, pre, eg); - serd_env_foreach(env, count_prefixes, &n_prefixes); + serd_env_write_prefixes(env, count_prefixes_sink); assert(n_prefixes == 1); SerdNode* shorter_uri = serd_new_uri("urn:foo"); |