diff options
author | Tom Rondeau | 2012-02-02 16:36:47 -0500 |
---|---|---|
committer | Tom Rondeau | 2012-02-02 16:36:47 -0500 |
commit | e8089db25b2e28824f11d27c9d98a4adef191736 (patch) | |
tree | c129ba7c8dbf119e8a59f1e0ea3fde43eb7442aa /gnuradio-core/src/python | |
parent | 67d23bdecd3f15197bdf46f8c0cd66a6f754fea5 (diff) | |
download | gnuradio-e8089db25b2e28824f11d27c9d98a4adef191736.tar.gz gnuradio-e8089db25b2e28824f11d27c9d98a4adef191736.tar.bz2 gnuradio-e8089db25b2e28824f11d27c9d98a4adef191736.zip |
core: moving multiply_cc and multiply_const_cc out of gengen and into general so they can make use of volk calls.
QA code now explicitly tests the cc versions of these blocks.
Diffstat (limited to 'gnuradio-core/src/python')
-rwxr-xr-x | gnuradio-core/src/python/gnuradio/gr/qa_add_and_friends.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_add_and_friends.py b/gnuradio-core/src/python/gnuradio/gr/qa_add_and_friends.py index 8fb70fb3f..c1d8dafd1 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_add_and_friends.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_add_and_friends.py @@ -78,6 +78,18 @@ class test_add_and_friends (gr_unittest.TestCase): op = gr.multiply_const_ii (5) self.help_ii ((src_data,), expected_result, op) + def test_mult_const_cc (self): + src_data = (-1-1j, 0+0j, 1+1j, 2+2j, 3+3j) + expected_result = (-5-5j, 0+0j, 5+5j, 10+10j, 15+15j) + op = gr.multiply_const_cc (5) + self.help_cc ((src_data,), expected_result, op) + + def test_mult_const_cc2 (self): + src_data = (-1-1j, 0+0j, 1+1j, 2+2j, 3+3j) + expected_result = (-3-7j, 0+0j, 3+7j, 6+14j, 9+21j) + op = gr.multiply_const_cc (5+2j) + self.help_cc ((src_data,), expected_result, op) + def test_add_ii (self): src1_data = (1, 2, 3, 4, 5) src2_data = (8, -3, 4, 8, 2) @@ -94,6 +106,14 @@ class test_add_and_friends (gr_unittest.TestCase): self.help_ii ((src1_data, src2_data), expected_result, op) + def test_mult_cc (self): + src1_data = (1+1j, 2+2j, 3+3j, 4+4j, 5+5j) + src2_data = (8, -3, 4, 8, 2) + expected_result = (8+8j, -6-6j, 12+12j, 32+32j, 10+10j) + op = gr.multiply_cc () + self.help_cc ((src1_data, src2_data), + expected_result, op) + def test_sub_ii_1 (self): src1_data = (1, 2, 3, 4, 5) expected_result = (-1, -2, -3, -4, -5) |