From d7e26d41f333b0c30ca49dbcc66458dec8b8cea6 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Fri, 11 Oct 2019 22:45:31 +0200 Subject: [PATCH] :art: Update trig test --- tests/import/trig.c | 13 +++++++++++-- tests/import/trig.gw | 8 +++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/import/trig.c b/tests/import/trig.c index 6fb1c931..c33ef532 100644 --- a/tests/import/trig.c +++ b/tests/import/trig.c @@ -25,9 +25,18 @@ static CTOR(trig_ctor) { ugen_gen(shred->info->vm->gwion, UGEN(o), trig_tick, (void*)1, 1); } +static CTOR(trig2_ctor) { + ugen_ini(shred->info->vm->gwion, UGEN(o), 2, 2); + ugen_gen(shred->info->vm->gwion, UGEN(o), trig_tick, (void*)1, 1); +} + GWION_IMPORT(trig) { - const Type t_gain = gwi_mk_type(gwi, "Trig", SZ_INT, "UGen"); - GWI_BB(gwi_class_ini(gwi, t_gain, trig_ctor, NULL)) + const Type t_trig = gwi_mk_type(gwi, "Trig", SZ_INT, "UGen"); + GWI_BB(gwi_class_ini(gwi, t_trig, trig_ctor, NULL)) + gwi_class_end(gwi); + + const Type t_trig2 = gwi_mk_type(gwi, "Trig2", SZ_INT, "UGen"); + GWI_BB(gwi_class_ini(gwi, t_trig2, trig2_ctor, NULL)) return gwi_class_end(gwi); } diff --git a/tests/import/trig.gw b/tests/import/trig.gw index 104dcf3b..c56299b3 100644 --- a/tests/import/trig.gw +++ b/tests/import/trig.gw @@ -1,3 +1,9 @@ Trig trig => dac; adc :=> trig; -adc := dac; +adc :=> trig2; +adc :=< trig2; + +samp => now; -- 2.43.0