summaryrefslogtreecommitdiffstats
path: root/test/slv2_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/slv2_test.c')
-rw-r--r--test/slv2_test.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/slv2_test.c b/test/slv2_test.c
index 65eba90..24f26a0 100644
--- a/test/slv2_test.c
+++ b/test/slv2_test.c
@@ -697,12 +697,14 @@ test_plugin()
"SELECT ?name WHERE { <> doap:maintainer [ foaf:name ?name ] }");
TEST_ASSERT(!slv2_results_finished(results));
TEST_ASSERT(!strcmp(slv2_results_get_binding_name(results, 0), "name"));
- TEST_ASSERT(!strcmp(
- slv2_value_as_string(slv2_results_get_binding_value(results, 0)),
- "David Robillard"));
- TEST_ASSERT(!strcmp(
- slv2_value_as_string(slv2_results_get_binding_value_by_name(results, "name")),
- "David Robillard"));
+ SLV2Value val = slv2_results_get_binding_value(results, 0);
+ TEST_ASSERT(!strcmp(slv2_value_as_string(val), "David Robillard"));
+ slv2_value_free(val);
+ val = slv2_results_get_binding_value_by_name(results, "name");
+ TEST_ASSERT(!strcmp(slv2_value_as_string(val), "David Robillard"));
+ slv2_value_free(val);
+
+ slv2_results_free(results);
slv2_uis_free(uis);
slv2_values_free(thing_names);