summaryrefslogtreecommitdiffstats
path: root/test/lilv_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-07-15 19:48:59 +0000
committerDavid Robillard <d@drobilla.net>2014-07-15 19:48:59 +0000
commit45f02a1390bbea3f7acbef5fdb4807a9f9331f3d (patch)
treec0a04698cdc1d392b5671ebe3c20d302acae61bf /test/lilv_test.c
parentc067725cf5c187bca3c7b9a41c8b90a8ce50d95d (diff)
downloadlilv-45f02a1390bbea3f7acbef5fdb4807a9f9331f3d.tar.gz
lilv-45f02a1390bbea3f7acbef5fdb4807a9f9331f3d.tar.bz2
lilv-45f02a1390bbea3f7acbef5fdb4807a9f9331f3d.zip
Add lilv_world_unload_bundle() and lilv_world_unload_resource().
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5413 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'test/lilv_test.c')
-rw-r--r--test/lilv_test.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/lilv_test.c b/test/lilv_test.c
index ea12013..52d4113 100644
--- a/test/lilv_test.c
+++ b/test/lilv_test.c
@@ -969,10 +969,9 @@ test_prototype(void)
{
if (!start_bundle(MANIFEST_PREFIXES
":prot a lv2:PluginBase ; rdfs:seeAlso <plugin.ttl> .\n"
- ":plug a lv2:Plugin ; lv2:binary <foo" SHLIB_EXT "> ; lv2:prototype :prot .\n",
+ ":plug a lv2:Plugin ; lv2:binary <inst" SHLIB_EXT "> ; lv2:prototype :prot .\n",
BUNDLE_PREFIXES
":prot a lv2:Plugin ; a lv2:CompressorPlugin ; "
- PLUGIN_NAME("Test plugin with project") " ; "
LICENSE_GPL " ; "
"lv2:project [ "
" doap:name \"Fake project\" ;"
@@ -999,10 +998,15 @@ test_prototype(void)
const LilvPlugin* plug = lilv_plugins_get_by_uri(plugins, plugin_uri_value);
TEST_ASSERT(plug);
+ // Test non-inherited property
LilvNode* name = lilv_plugin_get_name(plug);
TEST_ASSERT(!strcmp(lilv_node_as_string(name), "Instance"));
lilv_node_free(name);
+ // Test inherited property
+ const LilvNode* binary = lilv_plugin_get_library_uri(plug);
+ TEST_ASSERT(strstr(lilv_node_as_string(binary), "inst" SHLIB_EXT));
+
cleanup_uris();
return 1;
}
@@ -1608,6 +1612,14 @@ test_state(void)
LilvState* state6 = lilv_state_new_from_world(world, &map, test_state_node);
TEST_ASSERT(lilv_state_equals(state, state6)); // Round trip accuracy
+
+ lilv_world_unload_resource(world, test_state_node);
+ lilv_world_unload_bundle(world, test_state_bundle);
+
+ LilvState* state6_2 = lilv_state_new_from_world(world, &map, test_state_node);
+ TEST_ASSERT(!state6_2); // No longer present
+ lilv_state_free(state6_2);
+
lilv_node_free(test_state_bundle);
lilv_node_free(test_state_node);