diff options
Diffstat (limited to 'test/missing_port_name.lv2')
-rw-r--r-- | test/missing_port_name.lv2/test_missing_port_name.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/test/missing_port_name.lv2/test_missing_port_name.c b/test/missing_port_name.lv2/test_missing_port_name.c index 1187325..2072549 100644 --- a/test/missing_port_name.lv2/test_missing_port_name.c +++ b/test/missing_port_name.lv2/test_missing_port_name.c @@ -1,8 +1,11 @@ +#undef NDEBUG + #include "../src/lilv_internal.h" #include "serd/serd.h" #include "lilv/lilv.h" +#include <assert.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> @@ -10,13 +13,6 @@ #define PLUGIN_URI "http://example.org/missing-port-name" -#define TEST_ASSERT(check) do {\ - if (!(check)) {\ - fprintf(stderr, "%s:%d: failed test: %s\n", __FILE__, __LINE__, #check);\ - return 1;\ - }\ -} while (0) - int main(int argc, char** argv) { @@ -40,12 +36,12 @@ main(int argc, char** argv) LilvNode* plugin_uri = lilv_new_uri(world, PLUGIN_URI); const LilvPlugins* plugins = lilv_world_get_all_plugins(world); const LilvPlugin* plugin = lilv_plugins_get_by_uri(plugins, plugin_uri); - TEST_ASSERT(plugin); + assert(plugin); const LilvPort* port = lilv_plugin_get_port_by_index(plugin, 0); - TEST_ASSERT(port); + assert(port); LilvNode* name = lilv_port_get_name(plugin, port); - TEST_ASSERT(!name); + assert(!name); lilv_node_free(name); lilv_node_free(plugin_uri); |