diff options
author | Josh Blum <josh@joshknows.com> | 2013-05-22 15:29:49 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2013-05-22 15:29:49 -0700 |
commit | fa75f18dc4d347bd7d5a1595b162395f773858d3 (patch) | |
tree | 15a2b5c9ee855334c3330c144308c11da88d1307 /gr-uhd/python/qa_uhd.py | |
parent | 0a8078a57237fcc12f4a51f6d217c54031cc904d (diff) |
uhd: swig fix for stream args channel comprehension
* added %template entries for swig
* added python qa tests for channels
Tested on ubuntu 12.10 x64
Tested on ubuntu 11.04 x86
Diffstat (limited to 'gr-uhd/python/qa_uhd.py')
-rw-r--r--[-rwxr-xr-x] | gr-uhd/python/qa_uhd.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gr-uhd/python/qa_uhd.py b/gr-uhd/python/qa_uhd.py index 00757369ff..dafae926c5 100755..100644 --- a/gr-uhd/python/qa_uhd.py +++ b/gr-uhd/python/qa_uhd.py @@ -36,5 +36,17 @@ class test_uhd(gr_unittest.TestCase): They may not have a UHD device connected, etc. Don't try to run anything""" pass + def test_stream_args_channel_foo(self): + """ + Try to manipulate the stream args channels for proper swig'ing checks. + """ + sa = uhd_swig.stream_args_t() + sa.channels.append(1) + sa.channels.append(0) + print sa.channels + self.assertEqual(len(sa.channels), 2) + self.assertEqual(sa.channels[0], 1) + self.assertEqual(sa.channels[1], 0) + if __name__ == '__main__': gr_unittest.run(test_uhd, "test_uhd.xml") |