summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/python
diff options
context:
space:
mode:
authorTom Rondeau2012-01-28 19:25:04 -0500
committerTom Rondeau2012-01-28 19:25:04 -0500
commitf63927a46517ea9c7e914feb9177896219b33a0d (patch)
treeb9a41b22fe629f2612669cfb096f1cbbc127163e /gnuradio-core/src/python
parentc9a420645f16f5c28fdcf05c1c09b9a91b95e640 (diff)
downloadgnuradio-f63927a46517ea9c7e914feb9177896219b33a0d.tar.gz
gnuradio-f63927a46517ea9c7e914feb9177896219b33a0d.tar.bz2
gnuradio-f63927a46517ea9c7e914feb9177896219b33a0d.zip
core: more conversion work to Volk for type converters.
Diffstat (limited to 'gnuradio-core/src/python')
-rwxr-xr-xgnuradio-core/src/python/gnuradio/gr/qa_int_to_float.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_int_to_float.py b/gnuradio-core/src/python/gnuradio/gr/qa_int_to_float.py
index edfc26409..530b2a5cc 100755
--- a/gnuradio-core/src/python/gnuradio/gr/qa_int_to_float.py
+++ b/gnuradio-core/src/python/gnuradio/gr/qa_int_to_float.py
@@ -44,6 +44,26 @@ class test_int_to_float (gr_unittest.TestCase):
self.assertFloatTuplesAlmostEqual(expected_result, result_data)
+ def test_002(self):
+
+ vlen = 3
+ src_data = ( 65000, 65001, 65002, 65003, 65004, 65005,
+ -65001, -65002, -65003)
+ expected_result = [ 65000.0, 65001.0, 65002.0,
+ 65003.0, 65004.0, 65005.0,
+ -65001.0, -65002.0, -65003.0]
+ src = gr.vector_source_i(src_data)
+ s2v = gr.stream_to_vector(gr.sizeof_int, vlen)
+ op = gr.int_to_float(vlen)
+ v2s = gr.vector_to_stream(gr.sizeof_float, vlen)
+ dst = gr.vector_sink_f()
+
+ self.tb.connect(src, s2v, op, v2s, dst)
+ self.tb.run()
+ result_data = list(dst.data())
+
+ self.assertEqual(expected_result, result_data)
+
if __name__ == '__main__':
gr_unittest.run(test_int_to_float, "test_int_to_float.xml")