From 0484bfdcf79e4ce8602b8e3ded3ab364e8790b02 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 13 Dec 2008 06:20:58 +0000 Subject: Test successful and failed verification. git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@1863 a436a847-0d15-0410-975c-d299462d15a1 --- test/slv2_test.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/slv2_test.c b/test/slv2_test.c index 4024ada..af5cfef 100644 --- a/test/slv2_test.c +++ b/test/slv2_test.c @@ -486,7 +486,29 @@ test_verify() SLV2Plugins plugins = slv2_world_get_all_plugins(world); SLV2Plugin explug = slv2_plugins_get_by_uri(plugins, plugin_uri_value); TEST_ASSERT(explug); - slv2_plugin_verify(explug); + TEST_ASSERT(slv2_plugin_verify(explug)); + slv2_plugins_free(world, plugins); + cleanup_uris(); + return 1; +} + +/*****************************************************************************/ + +int +test_no_verify() +{ + if (!start_bundle(MANIFEST_PREFIXES + ":plug a lv2:Plugin ; lv2:binary ; rdfs:seeAlso .\n", + BUNDLE_PREFIXES + ":plug a lv2:Plugin . ", + 1)) + return 0; + + init_uris(); + SLV2Plugins plugins = slv2_world_get_all_plugins(world); + SLV2Plugin explug = slv2_plugins_get_by_uri(plugins, plugin_uri_value); + TEST_ASSERT(explug); + TEST_ASSERT(!slv2_plugin_verify(explug)); slv2_plugins_free(world, plugins); cleanup_uris(); return 1; @@ -804,6 +826,7 @@ static struct TestCase tests[] = { TEST_CASE(values), /* TEST_CASE(discovery_load_bundle), */ TEST_CASE(verify), + TEST_CASE(no_verify), TEST_CASE(discovery_load_all), TEST_CASE(classes), TEST_CASE(plugin), -- cgit v1.2.1