diff options
author | Mike Walters <mike@flomp.net> | 2015-10-12 00:57:37 +0100 |
---|---|---|
committer | Mike Walters <mike@flomp.net> | 2015-10-12 00:57:37 +0100 |
commit | 1b4fb3f2867a3e1994d60d62571451db2c54165f (patch) | |
tree | 306ce0a8c802aba67142a227c17d2f4f79e16ac8 /gr-blocks/python | |
parent | b1883cb00cdb7c9d9d24cd48bf3127ff4aa547ae (diff) |
blocks: Add Complex to IChar block
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) |