commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 11/24: digital: fixed packet parser QA test


From: git
Subject: [Commit-gnuradio] [gnuradio] 11/24: digital: fixed packet parser QA tests
Date: Tue, 14 Jun 2016 00:40:58 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch packet2
in repository gnuradio.

commit 5959a2e4a61a1c99eb3d94a1d0ed03250318b095
Author: Tom Rondeau <address@hidden>
Date:   Fri Apr 8 16:32:39 2016 -0400

    digital: fixed packet parser QA tests
---
 gr-digital/lib/qa_packet_formatters.cc        | 8 --------
 gr-digital/python/digital/qa_packet_format.py | 6 +++---
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/gr-digital/lib/qa_packet_formatters.cc 
b/gr-digital/lib/qa_packet_formatters.cc
index e6cfb16..aa3d033 100644
--- a/gr-digital/lib/qa_packet_formatters.cc
+++ b/gr-digital/lib/qa_packet_formatters.cc
@@ -127,14 +127,10 @@ qa_packet_formatters::test_default_parse()
   pmt::pmt_t dict = info[0];
   int payload_bits = pmt::to_long(pmt::dict_ref(dict, pmt::intern("payload 
bits"),
                                                 pmt::PMT_NIL));
-  int skip_samps = pmt::to_long(pmt::dict_ref(dict, pmt::intern("skip samps"),
-                                              pmt::PMT_NIL));
 
   int hdr_bits = (int)formatter->header_nbits();
   int expected_bits = nbits - hdr_bits;
-  int expected_skip = index * 8 + hdr_bits;
   CPPUNIT_ASSERT_EQUAL(expected_bits, payload_bits);
-  CPPUNIT_ASSERT_EQUAL(expected_skip, skip_samps);
 
   volk_free(bytes);
   volk_free(bits);
@@ -253,8 +249,6 @@ qa_packet_formatters::test_counter_parse()
   pmt::pmt_t dict = info[0];
   int payload_bits = pmt::to_long(pmt::dict_ref(dict, pmt::intern("payload 
bits"),
                                                 pmt::PMT_NIL));
-  int skip_samps = pmt::to_long(pmt::dict_ref(dict, pmt::intern("skip samps"),
-                                              pmt::PMT_NIL));
   int bps = pmt::to_long(pmt::dict_ref(dict, pmt::intern("bps"),
                                        pmt::PMT_NIL));
   int counter = pmt::to_long(pmt::dict_ref(dict, pmt::intern("counter"),
@@ -262,9 +256,7 @@ qa_packet_formatters::test_counter_parse()
 
   int hdr_bits = (int)formatter->header_nbits();
   int expected_bits = nbits - hdr_bits;
-  int expected_skip = index * 8 + hdr_bits;
   CPPUNIT_ASSERT_EQUAL(expected_bits, payload_bits);
-  CPPUNIT_ASSERT_EQUAL(expected_skip, skip_samps);
   CPPUNIT_ASSERT_EQUAL(expected_bps, (uint16_t)bps);
   CPPUNIT_ASSERT_EQUAL(0, counter);
 
diff --git a/gr-digital/python/digital/qa_packet_format.py 
b/gr-digital/python/digital/qa_packet_format.py
index 40bc144..2dbe600 100644
--- a/gr-digital/python/digital/qa_packet_format.py
+++ b/gr-digital/python/digital/qa_packet_format.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2014 Free Software Foundation, Inc.
+# Copyright 2015,2016 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -35,7 +35,7 @@ class test_packet_format_fb(gr_unittest.TestCase):
 
     def test_packet_format_async_default(self):
         ac = packet_utils.default_access_code
-        formatter = digital.packet_formatter_default(ac)
+        formatter = digital.packet_formatter_default(ac, 0)
 
         pkt_header = digital.packet_format_async(formatter)
         snk_hdr = blocks.message_debug()
@@ -83,7 +83,7 @@ class test_packet_format_fb(gr_unittest.TestCase):
     def test_packet_format_async_counter(self):
         bps = 2
         ac = packet_utils.default_access_code
-        formatter = digital.packet_formatter_counter(ac, 2)
+        formatter = digital.packet_formatter_counter(ac, 0, 2)
 
         pkt_header = digital.packet_format_async(formatter)
         snk_hdr = blocks.message_debug()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]