summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-02-10 08:56:33 +0000
committerDavid Robillard <d@drobilla.net>2013-02-10 08:56:33 +0000
commit36c22be51af07fc96a9168684949b82b8f6e325c (patch)
tree0cbdde26bbcd2d94727dd87ba61e2e7975eb9bc2 /test
parent1ad20b172af88a909991289e6a11c8cc7934a875 (diff)
downloadlilv-36c22be51af07fc96a9168684949b82b8f6e325c.tar.gz
lilv-36c22be51af07fc96a9168684949b82b8f6e325c.tar.bz2
lilv-36c22be51af07fc96a9168684949b82b8f6e325c.zip
Add lilv_world_ask() for easily checking if a statement exists.
Add lilv_world_get() and lilv_port_get() for easily getting one value. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5053 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'test')
-rw-r--r--test/lilv_test.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lilv_test.c b/test/lilv_test.c
index 0033885..0a505b0 100644
--- a/test/lilv_test.c
+++ b/test/lilv_test.c
@@ -711,6 +711,8 @@ test_plugin(void)
TEST_ASSERT(thing_name);
TEST_ASSERT(lilv_node_is_string(thing_name));
TEST_ASSERT(!strcmp(lilv_node_as_string(thing_name), "Something else"));
+ LilvNode* thing_name2 = lilv_world_get(world, thing_uri, name_p, NULL);
+ TEST_ASSERT(lilv_node_equals(thing_name, thing_name2));
LilvUIs* uis = lilv_plugin_get_uis(plug);
TEST_ASSERT(lilv_uis_size(uis) == 0);
@@ -729,6 +731,7 @@ test_plugin(void)
lilv_nodes_free(thing_names);
lilv_node_free(thing_uri);
+ lilv_node_free(thing_name2);
lilv_node_free(name_p);
lilv_node_free(control_class);
lilv_node_free(audio_class);
@@ -849,6 +852,9 @@ test_port(void)
LilvNodes* comments = lilv_port_get_value(plug, p, rdfs_comment);
TEST_ASSERT(!strcmp(lilv_node_as_string(lilv_nodes_get_first(comments)),
"comment"));
+ LilvNode* comment = lilv_port_get(plug, p, rdfs_comment);
+ TEST_ASSERT(!strcmp(lilv_node_as_string(comment), "comment"));
+ lilv_node_free(comment);
lilv_nodes_free(comments);
setenv("LANG", "fr", 1);