summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-12-13 06:20:58 +0000
committerDavid Robillard <d@drobilla.net>2008-12-13 06:20:58 +0000
commit0484bfdcf79e4ce8602b8e3ded3ab364e8790b02 (patch)
treecec321ccc1e33a7a596fa9e46caa5dfc15b12d44
parent4e39d42f1b139b57fb984cd21801a46eb2c87d25 (diff)
downloadlilv-0484bfdcf79e4ce8602b8e3ded3ab364e8790b02.tar.gz
lilv-0484bfdcf79e4ce8602b8e3ded3ab364e8790b02.tar.bz2
lilv-0484bfdcf79e4ce8602b8e3ded3ab364e8790b02.zip
Test successful and failed verification.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@1863 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/plugin.c2
-rw-r--r--test/slv2_test.c25
2 files changed, 25 insertions, 2 deletions
diff --git a/src/plugin.c b/src/plugin.c
index 3b42f51..ab8e4f8 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -230,7 +230,7 @@ slv2_plugin_load(SLV2Plugin p)
} else if (this_index < num_ports) {
this_port = slv2_plugin_get_port_by_index(p, this_index);
- // Got a port index out of whack, plugin or rasqal is broken
+ // Got a port index out of whack; plugin or rasqal is broken
} else {
fprintf(stderr, "ERROR: Found port %d immediately after port %d\n",
this_index, num_ports-1);
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 <foo.so> ; rdfs:seeAlso <plugin.ttl> .\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),