summaryrefslogtreecommitdiff
path: root/gr-blocks/python/blocks/qa_stream_mux.py
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2014-03-25 21:32:13 +0100
committerMartin Braun <martin.braun@ettus.com>2014-03-25 21:32:13 +0100
commit1da534610a1e1ed0e7d613d39ff47485bb8b7bb6 (patch)
tree9cf8b35e99a9360bb1f7eb73e075223b1edd5391 /gr-blocks/python/blocks/qa_stream_mux.py
parent1092e685defd10692d3fa47435c716a88dfd8712 (diff)
blocks: refactored stream_mux to be more flexible with buffer sizes
Diffstat (limited to 'gr-blocks/python/blocks/qa_stream_mux.py')
-rwxr-xr-xgr-blocks/python/blocks/qa_stream_mux.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/gr-blocks/python/blocks/qa_stream_mux.py b/gr-blocks/python/blocks/qa_stream_mux.py
index 7abbced54c..00e32e955e 100755
--- a/gr-blocks/python/blocks/qa_stream_mux.py
+++ b/gr-blocks/python/blocks/qa_stream_mux.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2004,2005,2007,2010,2012,2013 Free Software Foundation, Inc.
+# Copyright 2004,2005,2007,2010,2012,2013,2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -167,5 +167,19 @@ class test_stream_mux (gr_unittest.TestCase):
self.assertEqual (exp_data, result_data)
+ def test_largeN_ff(self):
+ stream_sizes = [3, 8191]
+ r1 = (1,) * stream_sizes[0]
+ r2 = (2,) * stream_sizes[1]
+ v0 = blocks.vector_source_f(r1, repeat=False)
+ v1 = blocks.vector_source_f(r2, repeat=False)
+ mux = blocks.stream_mux(gr.sizeof_float, stream_sizes)
+ dst = blocks.vector_sink_f ()
+ self.tb.connect (v0, (mux,0))
+ self.tb.connect (v1, (mux,1))
+ self.tb.connect (mux, dst)
+ self.tb.run ()
+ self.assertEqual (r1 + r2, dst.data())
+
if __name__ == '__main__':
gr_unittest.run(test_stream_mux, "test_stream_mux.xml")