diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/create_delete_node.ttl | 12 | ||||
-rw-r--r-- | tests/disconnect_all_port.ttl | 32 | ||||
-rw-r--r-- | tests/duplicate_node.ttl | 19 | ||||
-rw-r--r-- | tests/ingen_test.cpp | 10 |
4 files changed, 71 insertions, 2 deletions
diff --git a/tests/create_delete_node.ttl b/tests/create_delete_node.ttl index 0fff4d24..81086e69 100644 --- a/tests/create_delete_node.ttl +++ b/tests/create_delete_node.ttl @@ -13,3 +13,15 @@ <msg1> a patch:Delete ; patch:subject <ingen:/main/node> . + +<msg2> + a patch:Put ; + patch:subject <ingen:/main/deprecatednode> ; + patch:body [ + a ingen:Block ; + ingen:prototype <http://drobilla.net/plugins/mda/Shepard> + ] . + +<msg3> + a patch:Delete ; + patch:subject <ingen:/main/deprecatednode> . diff --git a/tests/disconnect_all_port.ttl b/tests/disconnect_all_port.ttl new file mode 100644 index 00000000..5c2d92f2 --- /dev/null +++ b/tests/disconnect_all_port.ttl @@ -0,0 +1,32 @@ +@prefix lv2: <http://lv2plug.in/ns/lv2core#> . +@prefix patch: <http://lv2plug.in/ns/ext/patch#> . +@prefix ingen: <http://drobilla.net/ns/ingen#> . + +<msg0> + a patch:Put ; + patch:subject <ingen:/main/audio_in> ; + patch:body [ + a lv2:InputPort , + lv2:AudioPort + ] . + +<msg1> + a patch:Put ; + patch:subject <ingen:/main/node> ; + patch:body [ + a ingen:Block ; + lv2:prototype <http://drobilla.net/plugins/mda/Shepard> + ] . + +<msg2> + a patch:Put ; + patch:subject <ingen:/main/> ; + patch:body [ + a ingen:Arc ; + ingen:tail <ingen:/main/audio_in> ; + ingen:head <ingen:/main/node/left_in> + ] . + +<msg3> + a patch:Delete ; + patch:subject <ingen:/main/audio_in> . diff --git a/tests/duplicate_node.ttl b/tests/duplicate_node.ttl new file mode 100644 index 00000000..47d71dfc --- /dev/null +++ b/tests/duplicate_node.ttl @@ -0,0 +1,19 @@ +@prefix lv2: <http://lv2plug.in/ns/lv2core#> . +@prefix patch: <http://lv2plug.in/ns/ext/patch#> . +@prefix ingen: <http://drobilla.net/ns/ingen#> . + +<msg0> + a patch:Put ; + patch:subject <ingen:/main/node> ; + patch:body [ + a ingen:Block ; + lv2:prototype <http://drobilla.net/plugins/mda/Shepard> + ] . + +<msg1> + a patch:Put ; + patch:subject <ingen:/main/deprecatednode> ; + patch:body [ + a ingen:Block ; + lv2:prototype <ingen:/main/node> + ] . diff --git a/tests/ingen_test.cpp b/tests/ingen_test.cpp index 12e9e9f9..bb013ebd 100644 --- a/tests/ingen_test.cpp +++ b/tests/ingen_test.cpp @@ -135,10 +135,16 @@ ingen_try(bool cond, const char* msg) static void flush_events(Ingen::World* world) { + static const uint32_t block_length = 4096; + int count = 0; + uint32_t offset = 0; while (world->engine()->pending_events()) { - world->engine()->run(4096); + world->engine()->locate(offset, block_length); + world->engine()->run(block_length); world->engine()->main_iteration(); g_usleep(1000); + ++count; + offset += block_length; } } @@ -250,7 +256,7 @@ main(int argc, char** argv) NULL, NULL, atom->type, atom->size, LV2_ATOM_BODY(atom)) << endl; #endif - if (!atom_reader.write((const LV2_Atom*)out.buf)) { + if (!atom_reader.write((const LV2_Atom*)out.buf, n_events + 1)) { return EXIT_FAILURE; } |