diff options
author | Johnathan Corgan | 2012-06-22 16:58:50 -0700 |
---|---|---|
committer | Johnathan Corgan | 2012-06-22 16:58:50 -0700 |
commit | 75f11771a9ee4b2854297fdb2c9db5761bde1c45 (patch) | |
tree | cffe302da2c6b2154eebb146175e84bf9744cffc /gr-blocks/python | |
parent | 6e0626fd93b99eab2234fba79fc0174261ea67f4 (diff) | |
download | gnuradio-75f11771a9ee4b2854297fdb2c9db5761bde1c45.tar.gz gnuradio-75f11771a9ee4b2854297fdb2c9db5761bde1c45.tar.bz2 gnuradio-75f11771a9ee4b2854297fdb2c9db5761bde1c45.zip |
blocks: added gr::blocks:char_to_short
Diffstat (limited to 'gr-blocks/python')
-rwxr-xr-x | gr-blocks/python/qa_type_conversions.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gr-blocks/python/qa_type_conversions.py b/gr-blocks/python/qa_type_conversions.py index bc65a2781..ff2e5c609 100755 --- a/gr-blocks/python/qa_type_conversions.py +++ b/gr-blocks/python/qa_type_conversions.py @@ -51,5 +51,16 @@ class test_type_conversions(gr_unittest.TestCase): self.tb.run() self.assertFloatTuplesAlmostEqual(expected_data, dst.data()) + def test_char_to_short(self): + src_data = (1, 2, 3, 4, 5) + expected_data = (256, 512, 768, 1024, 1280) + src = gr.vector_source_b(src_data) + op = blocks_swig.char_to_short() + dst = gr.vector_sink_s() + 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") |