[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r5965 - gnuradio/branches/developers/trondeau/regen/gn
From: |
trondeau |
Subject: |
[Commit-gnuradio] r5965 - gnuradio/branches/developers/trondeau/regen/gnuradio-core/src/python/gnuradio/gr |
Date: |
Sun, 15 Jul 2007 11:16:24 -0600 (MDT) |
Author: trondeau
Date: 2007-07-15 11:16:24 -0600 (Sun, 15 Jul 2007)
New Revision: 5965
Modified:
gnuradio/branches/developers/trondeau/regen/gnuradio-core/src/python/gnuradio/gr/qa_regenerate.py
Log:
added another, longer test case to test the regen -- just in case
Modified:
gnuradio/branches/developers/trondeau/regen/gnuradio-core/src/python/gnuradio/gr/qa_regenerate.py
===================================================================
---
gnuradio/branches/developers/trondeau/regen/gnuradio-core/src/python/gnuradio/gr/qa_regenerate.py
2007-07-15 17:06:56 UTC (rev 5964)
+++
gnuradio/branches/developers/trondeau/regen/gnuradio-core/src/python/gnuradio/gr/qa_regenerate.py
2007-07-15 17:16:24 UTC (rev 5965)
@@ -31,7 +31,7 @@
def tearDown (self):
self.fg = None
- def test_regen (self):
+ def test_regen1 (self):
fg = self.fg
data = [0, 0, 0,
@@ -55,6 +55,36 @@
self.assertEqual (expected_result, dst_data)
+ def test_regen2 (self):
+ fg = self.fg
+
+ data = 200*[0,]
+ data[9] = 1
+ data[99] = 1
+ expected_result = 200*[0,]
+ expected_result[9] = 1
+ expected_result[19] = 1
+ expected_result[29] = 1
+ expected_result[39] = 1
+
+ expected_result[99] = 1
+ expected_result[109] = 1
+ expected_result[119] = 1
+ expected_result[129] = 1
+
+ src = gr.vector_source_b(data, False)
+ regen = gr.regenerate_bb(10, 3)
+ dst = gr.vector_sink_b()
+
+ fg.connect (src, regen)
+ fg.connect (regen, dst)
+ fg.run ()
+
+ dst_data = dst.data ()
+
+ self.assertEqual (tuple(expected_result), dst_data)
+
+
if __name__ == '__main__':
gr_unittest.main ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r5965 - gnuradio/branches/developers/trondeau/regen/gnuradio-core/src/python/gnuradio/gr,
trondeau <=