changeset 185:fae36c4570d5

Test for reading more than the whole delay + stream in one call
author Chris Cannam
date Sun, 05 May 2013 11:56:29 +0100
parents 045908c861a4
children 479a739c99b1
files yetilab/stream/test/test_filter.yeti
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/yetilab/stream/test/test_filter.yeti	Fri May 03 18:17:00 2013 +0100
+++ b/yetilab/stream/test/test_filter.yeti	Sun May 05 11:56:29 2013 +0100
@@ -89,6 +89,20 @@
         ( str.close (); true )
 ),
 
+"delayedBy-2-3c": \(
+    str = filt.delayedBy 2 (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 7).getRow 0)) [ 0,0,0,1,2 ] and
+        compare str.position 5 and
+        compare str.available (Known 0) and
+        compare str.finished? true and
+        ( str.close (); true )
+),
+
 "delayedBy-2-inf": \(
     str = filt.delayedBy 2 (syn.generated 2 id);
     compare str.position 0 and