diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2015-10-30 12:47:42 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2015-10-30 12:47:42 -0700 |
commit | 98c442585bb0968b43ea998f41bd0c53350dc73a (patch) | |
tree | 84b6c8040c823719ce8cfcc28c4d4e0b9aae1f3b /gr-blocks/python | |
parent | fd5cbdd2ea5597067f5ca3f21cee815959c07df0 (diff) | |
parent | 1b4fb3f2867a3e1994d60d62571451db2c54165f (diff) |
Merge remote-tracking branch 'miek/complex-to-ichar'
Diffstat (limited to 'gr-blocks/python')
-rwxr-xr-x | gr-blocks/python/blocks/qa_type_conversions.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gr-blocks/python/blocks/qa_type_conversions.py b/gr-blocks/python/blocks/qa_type_conversions.py index 0246320159..cd600de2be 100755 --- a/gr-blocks/python/blocks/qa_type_conversions.py +++ b/gr-blocks/python/blocks/qa_type_conversions.py @@ -62,6 +62,16 @@ class test_type_conversions(gr_unittest.TestCase): self.tb.run() self.assertEqual(expected_data, dst.data()) + def test_complex_to_interleaved_char(self): + src_data = (1+2j, 3+4j, 5+6j, 7+8j, 9+10j) + expected_data = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) + src = blocks.vector_source_c(src_data) + op = blocks.complex_to_interleaved_char() + dst = blocks.vector_sink_b() + self.tb.connect(src, op, dst) + self.tb.run() + self.assertEqual(expected_data, dst.data()) + def test_complex_to_interleaved_short(self): src_data = (1+2j, 3+4j, 5+6j, 7+8j, 9+10j) expected_data = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) |