# HG changeset patch # User Chris Cannam # Date 1367826164 -3600 # Node ID 1141702908dc85d7f926f9bfb4edb098bf40d2ca # Parent 528f16f988d898c3980979fd606902f3232faf35 We're going to want truncatedTo (perhaps under a different name) to be able to extend a stream as well. Add a test for this (currently failing) diff -r 528f16f988d8 -r 1141702908dc yetilab/stream/test/test_filter.yeti --- a/yetilab/stream/test/test_filter.yeti Sun May 05 18:24:00 2013 +0100 +++ b/yetilab/stream/test/test_filter.yeti Mon May 06 08:42:44 2013 +0100 @@ -11,7 +11,6 @@ [ "truncatedTo": \( - // nb the basic generated function is tested in test_syntheticstream str = filt.truncatedTo 3 (syn.generated 2 id); compare str.position 0 and compare str.channels 1 and @@ -25,6 +24,24 @@ ( str.close (); true ) ), +"extendedTo": \( + str = filt.truncatedTo 5 (filt.truncatedTo 3 (syn.generated 2 id)); + compare str.position 0 and + compare str.channels 1 and + compare str.sampleRate 2 and + compare str.available (Known 5) and + compare str.finished? false and + compare (bl.list ((str.read 4).getRow 0)) [ 0,1,2,0 ] and + compare str.position 4 and + compare str.available (Known 1) and + compare str.finished? false and + compare (bl.list ((str.read 2).getRow 0)) [ 0,0 ] and + compare str.position 5 and + compare str.available (Known 0) and + compare str.finished? true and + ( str.close (); true ) +), + "delayedBy-0-3": \( str = filt.delayedBy 0 (filt.truncatedTo 3 (syn.generated 2 id)); compare str.position 0 and