Mercurial > hg > may
changeset 191:1141702908dc
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)
author | Chris Cannam |
---|---|
date | Mon, 06 May 2013 08:42:44 +0100 |
parents | 528f16f988d8 |
children | a6889d4314b1 |
files | yetilab/stream/test/test_filter.yeti |
diffstat | 1 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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