summaryrefslogtreecommitdiffstats
path: root/test/failed_instantiation.lv2/test_failed_instantiation.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/failed_instantiation.lv2/test_failed_instantiation.c')
-rw-r--r--test/failed_instantiation.lv2/test_failed_instantiation.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/test/failed_instantiation.lv2/test_failed_instantiation.c b/test/failed_instantiation.lv2/test_failed_instantiation.c
index 9955d3f..3eb5406 100644
--- a/test/failed_instantiation.lv2/test_failed_instantiation.c
+++ b/test/failed_instantiation.lv2/test_failed_instantiation.c
@@ -1,8 +1,11 @@
+#undef NDEBUG
+
#include "../src/lilv_internal.h"
#include "lilv/lilv.h"
#include "serd/serd.h"
+#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
@@ -10,13 +13,6 @@
#define PLUGIN_URI "http://example.org/failed-instantiation"
-#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,9 +36,9 @@ 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);
- TEST_ASSERT(!lilv_plugin_instantiate(plugin, 48000, NULL));
+ assert(!lilv_plugin_instantiate(plugin, 48000, NULL));
lilv_node_free(plugin_uri);
lilv_world_free(world);