From 59ec230f9812354b855ef5842c3362caa71e8fe0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 30 Jul 2016 08:31:54 -0400 Subject: Clean up tests --- tests/empty.ingen/graph.ttl | 12 +++++++++--- tests/enable_graph.ttl | 14 ++++++-------- tests/ingen_test.cpp | 18 ++++++++++++------ tests/set_graph_poly.ttl | 14 ++++++-------- 4 files changed, 33 insertions(+), 25 deletions(-) (limited to 'tests') diff --git a/tests/empty.ingen/graph.ttl b/tests/empty.ingen/graph.ttl index aaaf6087..3f8c8ed5 100644 --- a/tests/empty.ingen/graph.ttl +++ b/tests/empty.ingen/graph.ttl @@ -1,18 +1,20 @@ -@prefix rdf: . @prefix atom: . -@prefix patch: . @prefix doap: . @prefix ingen: . @prefix lv2: . -@prefix lv2ev: . @prefix midi: . @prefix owl: . +@prefix patch: . +@prefix rdf: . @prefix rdfs: . @prefix xsd: . + ingen:canvasX 32.0 ; + ingen:canvasY 32.0 ; ingen:polyphonic false ; atom:bufferType atom:Sequence ; + 4096 ; lv2:index 0 ; lv2:name "Control" ; lv2:portProperty lv2:connectionOptional ; @@ -21,10 +23,14 @@ lv2:InputPort . + ingen:canvasX 128.0 ; + ingen:canvasY 32.0 ; ingen:polyphonic false ; atom:bufferType atom:Sequence ; + 4096 ; lv2:index 1 ; lv2:name "Control" ; + lv2:portProperty lv2:connectionOptional ; lv2:symbol "control_out" ; a atom:AtomPort , lv2:OutputPort . diff --git a/tests/enable_graph.ttl b/tests/enable_graph.ttl index b16a0332..481cc93a 100644 --- a/tests/enable_graph.ttl +++ b/tests/enable_graph.ttl @@ -3,15 +3,13 @@ @prefix patch: . - a patch:Put ; + a patch:Set ; patch:subject ; - patch:body [ - ingen:enabled true - ] . + patch:property ingen:enabled ; + patch:value true . - a patch:Put ; + a patch:Set ; patch:subject ; - patch:body [ - ingen:enabled false - ] . + patch:property ingen:enabled ; + patch:value false . diff --git a/tests/ingen_test.cpp b/tests/ingen_test.cpp index 542636a2..ee2c4924 100644 --- a/tests/ingen_test.cpp +++ b/tests/ingen_test.cpp @@ -1,6 +1,6 @@ /* This file is part of Ingen. - Copyright 2007-2015 David Robillard + Copyright 2007-2016 David Robillard Ingen is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free @@ -126,6 +126,16 @@ ingen_try(bool cond, const char* msg) } } +static void +flush_events(Ingen::World* world) +{ + while (world->engine()->pending_events()) { + world->engine()->run(4096); + world->engine()->main_iteration(); + g_usleep(1000); + } +} + int main(int argc, char** argv) { @@ -175,11 +185,7 @@ main(int argc, char** argv) cerr << "error: failed to load initial graph " << start_graph << endl; return EXIT_FAILURE; } - while (world->engine()->pending_events()) { - world->engine()->run(4096); - world->engine()->main_iteration(); - g_usleep(1000); - } + flush_events(world); // Read commands diff --git a/tests/set_graph_poly.ttl b/tests/set_graph_poly.ttl index 0e830c4a..7c730639 100644 --- a/tests/set_graph_poly.ttl +++ b/tests/set_graph_poly.ttl @@ -3,15 +3,13 @@ @prefix patch: . - a patch:Put ; + a patch:Set ; patch:subject ; - patch:body [ - ingen:polyphony 4 - ] . + patch:property ingen:polyphony ; + patch:value 4 . - a patch:Put ; + a patch:Set ; patch:subject ; - patch:body [ - ingen:polyphony 1 - ] . + patch:property ingen:polyphony ; + patch:value 1 . -- cgit v1.2.1