summaryrefslogtreecommitdiff
path: root/gr-blocks/python
diff options
context:
space:
mode:
authorJohnathan Corgan2012-06-28 09:02:58 -0700
committerJohnathan Corgan2012-06-28 09:02:58 -0700
commitc128e5aee66838c849ffc2ac45217ff1efab42e8 (patch)
tree3f95507db8382253a33860a8423aa8ba43a0bfbe /gr-blocks/python
parentbe1219b0623bbceb5bca6a6f6774f0669f52bdde (diff)
downloadgnuradio-c128e5aee66838c849ffc2ac45217ff1efab42e8.tar.gz
gnuradio-c128e5aee66838c849ffc2ac45217ff1efab42e8.tar.bz2
gnuradio-c128e5aee66838c849ffc2ac45217ff1efab42e8.zip
blocks: added gr::blocks::short_to_char
Diffstat (limited to 'gr-blocks/python')
-rwxr-xr-xgr-blocks/python/qa_type_conversions.py10
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")