#!/usr/bin/env python
#
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright 2004,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# 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,
from gnuradio import gr, gr_unittest
import math
-class test_sig_source (gr_unittest.TestCase):
+class test_pll_refout (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_pll_refout (self):
expected_result = ((1+7.39965699825e-10j),
head = gr.head (gr.sizeof_gr_complex, int (freq))
dst = gr.vector_sink_c ()
- self.fg.connect (src, pll, head)
- self.fg.connect (head, dst)
+ self.tb.connect (src, pll, head)
+ self.tb.connect (head, dst)
- self.fg.run ()
+ self.tb.run ()
dst_data = dst.data ()
self.assertComplexTuplesAlmostEqual (expected_result, dst_data, 5)
if __name__ == '__main__':
- gr_unittest.main ()
+ gr_unittest.run(test_pll_refout, "test_pll_refout.xml")