# HG changeset patch # User Chris Cannam # Date 1367772901 -3600 # Node ID fa9a15681ba9836effa80a08ff4d08b4b1b66413 # Parent 8a8b07134cada2225dee645a28918d42cbcb9241 Test for repeated (failing first) diff -r 8a8b07134cad -r fa9a15681ba9 yetilab/stream/filter.yeti --- a/yetilab/stream/filter.yeti Sun May 05 12:41:50 2013 +0100 +++ b/yetilab/stream/filter.yeti Sun May 05 17:55:01 2013 +0100 @@ -115,6 +115,7 @@ { get position () = pos, get channels () = s.channels, + get sampleRate () = s.sampleRate, get available () = Infinite (), get finished? () = false, read count = diff -r 8a8b07134cad -r fa9a15681ba9 yetilab/stream/test/test_filter.yeti --- a/yetilab/stream/test/test_filter.yeti Sun May 05 12:41:50 2013 +0100 +++ b/yetilab/stream/test/test_filter.yeti Sun May 05 17:55:01 2013 +0100 @@ -200,6 +200,25 @@ ( str.close (); true ) ), +"repeated-2": \( + str = filt.repeated + (syn.precalculated 2 (bl.fromList [1,2,3])); + compare str.position 0 and + compare str.channels 1 and + compare str.sampleRate 2 and + compare str.available (Infinite ()) and + compare str.finished? false and + compare (map bl.list (mat.asRows (str.read 1))) [[1]] and + compare (map bl.list (mat.asRows (str.read 2))) [[2,3]] and + compare (map bl.list (mat.asRows (str.read 3))) [[1,2,3]] and + compare (map bl.list (mat.asRows (str.read 5))) [[1,2,3,1,2]] and + compare (map bl.list (mat.asRows (str.read 2))) [[3,1]] and + compare str.available (Infinite ()) and + compare str.finished? true and + compare str.position 13 and + ( str.close (); true ) +), + //!!! still no tests for filters with multi-channel inputs ] is hash boolean>