diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2013-05-13 07:36:16 +1000 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2013-05-13 07:36:16 +1000 |
commit | a4fe510a69190162452889cd629fa258084f46ff (patch) | |
tree | 4da725d8bad7641fb8d9db8b153e61beb313715d /gr-blocks/python | |
parent | c7a2cecdd4e9e04d66b4b20b9debce86696e6290 (diff) | |
parent | 2405532f945576470d1915a4668b91ff35c05775 (diff) |
Merge branch 'next' into runtime_pimpl
Conflicts:
gr-blocks/swig/blocks_swig0.i
gr-digital/lib/ofdm_chanest_vcvc_impl.cc
gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc
gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.h
gr-digital/lib/ofdm_sync_sc_cfb_impl.cc
gr-digital/lib/packet_header_default.cc
gr-digital/lib/packet_headerparser_b_impl.cc
Diffstat (limited to 'gr-blocks/python')
-rwxr-xr-x | gr-blocks/python/qa_tag_gate.py | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/gr-blocks/python/qa_tag_gate.py b/gr-blocks/python/qa_tag_gate.py new file mode 100755 index 0000000000..1999f7a35d --- /dev/null +++ b/gr-blocks/python/qa_tag_gate.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python +# +# Copyright 2013 <+YOU OR YOUR COMPANY+>. +# +# This 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 3, or (at your option) +# any later version. +# +# This software is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this software; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +from gnuradio import gr, gr_unittest +import pmt +import blocks_swig as blocks + + +class qa_tag_gate (gr_unittest.TestCase): + + def setUp (self): + self.tb = gr.top_block () + + def tearDown (self): + self.tb = None + + def test_001_t (self): + tag = gr.tag_t() + tag.key = pmt.string_to_symbol('key') + tag.value = pmt.from_long(42) + tag.offset = 0 + src = blocks.vector_source_f(range(20), False, 1, (tag,)) + gate = blocks.tag_gate(gr.sizeof_float, False) + sink = blocks.vector_sink_f() + self.tb.run () + self.assertEqual(len(sink.tags()), 0) + +if __name__ == '__main__': + gr_unittest.run(qa_tag_gate, "qa_tag_gate.xml") + |