diff options
Diffstat (limited to 'gr-blocks/python')
-rwxr-xr-x | gr-blocks/python/qa_type_conversions.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gr-blocks/python/qa_type_conversions.py b/gr-blocks/python/qa_type_conversions.py index 92e0a7ca4..ddb876b3d 100755 --- a/gr-blocks/python/qa_type_conversions.py +++ b/gr-blocks/python/qa_type_conversions.py @@ -271,6 +271,16 @@ class test_type_conversions(gr_unittest.TestCase): self.tb.run() self.assertEqual(expected_data, dst.data()) + def test_short_to_char(self): + src_data = (256, 512, 768, 1024, 1280) + expected_data = (1, 2, 3, 4, 5) + src = gr.vector_source_s(src_data) + op = blocks_swig.short_to_char() + dst = gr.vector_sink_b() + self.tb.connect(src, op, dst) + self.tb.run() + self.assertEqual(expected_data, dst.data()) + if __name__ == '__main__': gr_unittest.run(test_type_conversions, "test_type_conversions.xml") |