Revision 3c443c0b gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py
| b/gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py | ||
|---|---|---|
| 1 | 1 |
#!/usr/bin/env python |
| 2 | 2 |
# |
| 3 |
# Copyright 2005 Free Software Foundation, Inc. |
|
| 3 |
# Copyright 2005,2007 Free Software Foundation, Inc.
|
|
| 4 | 4 |
# |
| 5 | 5 |
# This file is part of GNU Radio |
| 6 | 6 |
# |
| ... | ... | |
| 25 | 25 |
class test_single_pole_iir(gr_unittest.TestCase): |
| 26 | 26 |
|
| 27 | 27 |
def setUp (self): |
| 28 |
self.fg = gr.flow_graph ()
|
|
| 28 |
self.tb = gr.top_block ()
|
|
| 29 | 29 |
|
| 30 | 30 |
def tearDown (self): |
| 31 |
self.fg = None
|
|
| 31 |
self.tb = None
|
|
| 32 | 32 |
|
| 33 | 33 |
def test_001(self): |
| 34 | 34 |
src_data = (-10, 0, 10, 100, 1000, 10000, 100000) |
| ... | ... | |
| 36 | 36 |
src = gr.vector_source_f(src_data) |
| 37 | 37 |
op = gr.nlog10_ff(10) |
| 38 | 38 |
dst = gr.vector_sink_f() |
| 39 |
self.fg.connect (src, op, dst)
|
|
| 40 |
self.fg.run()
|
|
| 39 |
self.tb.connect (src, op, dst)
|
|
| 40 |
self.tb.run()
|
|
| 41 | 41 |
result_data = dst.data() |
| 42 | 42 |
self.assertFloatTuplesAlmostEqual (expected_result, result_data) |
| 43 | 43 |
|
Also available in: Unified diff