From 45f02a1390bbea3f7acbef5fdb4807a9f9331f3d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 15 Jul 2014 19:48:59 +0000 Subject: 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 --- test/lilv_test.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'test') 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 .\n" - ":plug a lv2:Plugin ; lv2:binary ; lv2:prototype :prot .\n", + ":plug a lv2:Plugin ; lv2:binary ; 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); -- cgit v1.2.1