#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
+# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
class test_unpack(gr_unittest.TestCase):
def setUp(self):
- self.fg = gr.flow_graph ()
+ self.tb = gr.top_block ()
def tearDown(self):
- self.fg = None
+ self.tb = None
def test_001(self):
src_data = (1,0,1,1,0,1,1,0)
src = gr.vector_source_b(src_data,False)
op = gr.unpack_k_bits_bb(1)
dst = gr.vector_sink_b()
- self.fg.connect(src, op, dst)
- self.fg.run()
+ self.tb.connect(src, op, dst)
+ self.tb.run()
self.assertEqual(expected_results, dst.data())
def test_002(self):
src = gr.vector_source_b(src_data,False)
op = gr.unpack_k_bits_bb(2)
dst = gr.vector_sink_b()
- self.fg.connect(src, op, dst)
- self.fg.run()
+ self.tb.connect(src, op, dst)
+ self.tb.run()
self.assertEqual(expected_results, dst.data())