Skip to content

Commit

Permalink
fix unit tests for passthru
Browse files Browse the repository at this point in the history
  • Loading branch information
gewang committed Oct 8, 2023
1 parent c6711bf commit f50a1f9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/test/01-Basic/215-chugraph-passthrough.ck
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ Step step => Node node => blackhole;
1::samp => now;

// check if equal (or at least equal enough)
if( Math.equal(.5, step.last() ) )
if( Math.equal(.5, node.last() ) )
<<< "success" >>>;
20 changes: 14 additions & 6 deletions src/test/01-Basic/216-chugen-passthrough.ck
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
class Crash extends Chugen {
fun float tick(float v) {
// verify basic Chugen passthru
class PassThru extends Chugen
{
fun float tick(float v)
{
return v;
}
}

SinOsc s => Crash c => dac;
440.0 => s.freq;
1::second => now;
// patch in the Node
Step step => PassThru node => blackhole;
// set step
.5 => step.next;
// let time pass
1::samp => now;

<<< "success" >>>;
// check if equal (or at least equal enough)
if( Math.equal(.5, node.last() ) )
<<< "success" >>>;

0 comments on commit f50a1f9

Please sign in to comment.