summaryrefslogtreecommitdiffstats
path: root/test/lilv_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-01-04 21:03:42 +0000
committerDavid Robillard <d@drobilla.net>2012-01-04 21:03:42 +0000
commit59b7cb60f0dcdd639ee4b130df9cbce3d7ebf04a (patch)
treef620184058830c46610456391f0352e9824ca52f /test/lilv_test.c
parent84ee3d3636f642df74cec72541416a387e730842 (diff)
downloadlilv-59b7cb60f0dcdd639ee4b130df9cbce3d7ebf04a.tar.gz
lilv-59b7cb60f0dcdd639ee4b130df9cbce3d7ebf04a.tar.bz2
lilv-59b7cb60f0dcdd639ee4b130df9cbce3d7ebf04a.zip
Use platform specific shared library extension in test suite.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3917 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'test/lilv_test.c')
-rw-r--r--test/lilv_test.c40
1 files changed, 24 insertions, 16 deletions
diff --git a/test/lilv_test.c b/test/lilv_test.c
index 0a8a226..44596f0 100644
--- a/test/lilv_test.c
+++ b/test/lilv_test.c
@@ -34,6 +34,14 @@
#define TEST_PATH_MAX 1024
+#if defined(__APPLE__)
+# define SHLIB_EXT ".dylib"
+#elif defined(__WIN32__)
+# define SHLIB_EXT ".dll"
+#else
+# define SHLIB_EXT ".so"
+#endif
+
static char bundle_dir_name[TEST_PATH_MAX];
static char bundle_dir_uri[TEST_PATH_MAX];
static char manifest_name[TEST_PATH_MAX];
@@ -205,7 +213,7 @@ int
test_value(void)
{
if (!start_bundle(MANIFEST_PREFIXES
- ":plug a lv2:Plugin ; lv2:binary <foo.so> ; rdfs:seeAlso <plugin.ttl> .\n",
+ ":plug a lv2:Plugin ; lv2:binary <foo" SHLIB_EXT "> ; rdfs:seeAlso <plugin.ttl> .\n",
BUNDLE_PREFIXES
":plug a lv2:Plugin ; a lv2:CompressorPlugin ; "
PLUGIN_NAME("Test plugin") " ; "
@@ -324,7 +332,7 @@ discovery_verify_plugin(const LilvPlugin* plugin)
TEST_ASSERT(lib_uri);
TEST_ASSERT(lilv_node_is_uri(lib_uri));
TEST_ASSERT(lilv_node_as_uri(lib_uri));
- TEST_ASSERT(strstr(lilv_node_as_uri(lib_uri), "foo.so"));
+ TEST_ASSERT(strstr(lilv_node_as_uri(lib_uri), "foo" SHLIB_EXT));
TEST_ASSERT(lilv_plugin_verify(plugin));
}
}
@@ -333,7 +341,7 @@ int
test_discovery(void)
{
if (!start_bundle(MANIFEST_PREFIXES
- ":plug a lv2:Plugin ; lv2:binary <foo.so> ; rdfs:seeAlso <plugin.ttl> .\n",
+ ":plug a lv2:Plugin ; lv2:binary <foo" SHLIB_EXT "> ; rdfs:seeAlso <plugin.ttl> .\n",
BUNDLE_PREFIXES
":plug a lv2:Plugin ;"
PLUGIN_NAME("Test plugin") " ; "
@@ -376,7 +384,7 @@ int
test_verify(void)
{
if (!start_bundle(MANIFEST_PREFIXES
- ":plug a lv2:Plugin ; lv2:binary <foo.so> ; rdfs:seeAlso <plugin.ttl> .\n",
+ ":plug a lv2:Plugin ; lv2:binary <foo" SHLIB_EXT "> ; rdfs:seeAlso <plugin.ttl> .\n",
BUNDLE_PREFIXES
":plug a lv2:Plugin ; "
PLUGIN_NAME("Test plugin") " ; "
@@ -400,7 +408,7 @@ int
test_no_verify(void)
{
if (!start_bundle(MANIFEST_PREFIXES
- ":plug a lv2:Plugin ; lv2:binary <foo.so> ; rdfs:seeAlso <plugin.ttl> .\n",
+ ":plug a lv2:Plugin ; lv2:binary <foo" SHLIB_EXT "> ; rdfs:seeAlso <plugin.ttl> .\n",
BUNDLE_PREFIXES
":plug a lv2:Plugin . "))
return 0;
@@ -420,7 +428,7 @@ int
test_classes(void)
{
if (!start_bundle(MANIFEST_PREFIXES
- ":plug a lv2:Plugin ; lv2:binary <foo.so> ; rdfs:seeAlso <plugin.ttl> .\n",
+ ":plug a lv2:Plugin ; lv2:binary <foo" SHLIB_EXT "> ; rdfs:seeAlso <plugin.ttl> .\n",
BUNDLE_PREFIXES
":plug a lv2:Plugin ; a lv2:CompressorPlugin ; "
PLUGIN_NAME("Test plugin") " ; "
@@ -464,7 +472,7 @@ int
test_plugin(void)
{
if (!start_bundle(MANIFEST_PREFIXES
- ":plug a lv2:Plugin ; lv2:binary <foo.so> ; rdfs:seeAlso <plugin.ttl> .\n",
+ ":plug a lv2:Plugin ; lv2:binary <foo" SHLIB_EXT "> ; rdfs:seeAlso <plugin.ttl> .\n",
BUNDLE_PREFIXES
":plug a lv2:Plugin ; a lv2:CompressorPlugin ; "
PLUGIN_NAME("Test plugin") " ; "
@@ -669,7 +677,7 @@ int
test_port(void)
{
if (!start_bundle(MANIFEST_PREFIXES
- ":plug a lv2:Plugin ; lv2:binary <foo.so> ; rdfs:seeAlso <plugin.ttl> .\n",
+ ":plug a lv2:Plugin ; lv2:binary <foo" SHLIB_EXT "> ; rdfs:seeAlso <plugin.ttl> .\n",
BUNDLE_PREFIXES PREFIX_LV2EV
":plug a lv2:Plugin ; "
PLUGIN_NAME("Test plugin") " ; "
@@ -904,7 +912,7 @@ int
test_ui(void)
{
if (!start_bundle(MANIFEST_PREFIXES
- ":plug a lv2:Plugin ; lv2:binary <foo.so> ; rdfs:seeAlso <plugin.ttl> .\n",
+ ":plug a lv2:Plugin ; lv2:binary <foo" SHLIB_EXT "> ; rdfs:seeAlso <plugin.ttl> .\n",
BUNDLE_PREFIXES PREFIX_LV2UI
":plug a lv2:Plugin ; a lv2:CompressorPlugin ; "
PLUGIN_NAME("Test plugin") " ; "
@@ -929,11 +937,11 @@ test_ui(void)
"] .\n"
":ui a lv2ui:GtkUI ; "
" lv2ui:requiredFeature lv2ui:makeResident ; "
- " lv2ui:binary <ui.so> ; "
+ " lv2ui:binary <ui" SHLIB_EXT "> ; "
" lv2ui:optionalFeature lv2ui:ext_presets . "
- ":ui2 a lv2ui:GtkUI ; lv2ui:binary <ui2.so> . "
- ":ui3 a lv2ui:GtkUI ; lv2ui:binary <ui3.so> . "
- ":ui4 a lv2ui:GtkUI ; lv2ui:binary <ui4.so> . "))
+ ":ui2 a lv2ui:GtkUI ; lv2ui:binary <ui2" SHLIB_EXT "> . "
+ ":ui3 a lv2ui:GtkUI ; lv2ui:binary <ui3" SHLIB_EXT "> . "
+ ":ui4 a lv2ui:GtkUI ; lv2ui:binary <ui4" SHLIB_EXT "> . "))
return 0;
init_uris();
@@ -984,7 +992,7 @@ test_ui(void)
char* ui_binary_uri_str = (char*)malloc(TEST_PATH_MAX);
snprintf(ui_binary_uri_str, TEST_PATH_MAX, "%s%s",
- lilv_node_as_string(plug_bundle_uri), "ui.so");
+ lilv_node_as_string(plug_bundle_uri), "ui" SHLIB_EXT);
const LilvNode* ui_binary_uri = lilv_ui_get_binary_uri(ui0);
@@ -1196,7 +1204,7 @@ int
test_bad_port_symbol(void)
{
if (!start_bundle(MANIFEST_PREFIXES
- ":plug a lv2:Plugin ; lv2:binary <foo.so> ; rdfs:seeAlso <plugin.ttl> .\n",
+ ":plug a lv2:Plugin ; lv2:binary <foo" SHLIB_EXT "> ; rdfs:seeAlso <plugin.ttl> .\n",
BUNDLE_PREFIXES PREFIX_LV2EV
":plug a lv2:Plugin ; "
PLUGIN_NAME("Test plugin") " ; "
@@ -1227,7 +1235,7 @@ int
test_bad_port_index(void)
{
if (!start_bundle(MANIFEST_PREFIXES
- ":plug a lv2:Plugin ; lv2:binary <foo.so> ; rdfs:seeAlso <plugin.ttl> .\n",
+ ":plug a lv2:Plugin ; lv2:binary <foo" SHLIB_EXT "> ; rdfs:seeAlso <plugin.ttl> .\n",
BUNDLE_PREFIXES PREFIX_LV2EV
":plug a lv2:Plugin ; "
PLUGIN_NAME("Test plugin") " ; "