示例#1
0
 def test_002(self):
     data_src = tuple([ord(x) for x in self._packet00.decode('hex')])
     data_exp = data_src
     data_src = data_src[:230] + (0, ) + data_src[231:]
     test_block = error_correction()
     self.do(data_src, data_exp, test_block)
     self.tb.run ()
示例#2
0
 def test_002(self):
     data_src = tuple([ord(x) for x in self._packet00.decode('hex')])
     data_exp = data_src
     data_src = data_src[:230] + (0, ) + data_src[231:]
     test_block = error_correction()
     self.do(data_src, data_exp, test_block)
     self.tb.run()
示例#3
0
 def test_005(self):
     """11 data bytes broken (2 erasure), correctable."""
     data_src = tuple([ord(x) for x in self._packet00.decode('hex')])
     data_exp = data_src
     data_src = data_src[:72] + (0, )*11 + (0x400, ) * 2 + data_src[85:]
     test_block = error_correction()
     self.do(data_src, data_exp, test_block)
     self.tb.run ()
示例#4
0
 def test_004(self):
     """13 data bytes broken, uncorrectable."""
     data_src = tuple([ord(x) for x in self._packet00.decode('hex')])
     data_src = data_src[:72] + (0, )*13 + data_src[85:]
     data_exp = data_src
     test_block = error_correction()
     self.do(data_src, data_exp, test_block)
     self.tb.run ()
示例#5
0
 def test_005(self):
     """11 data bytes broken (2 erasure), correctable."""
     data_src = tuple([ord(x) for x in self._packet00.decode('hex')])
     data_exp = data_src
     data_src = data_src[:72] + (0, ) * 11 + (0x400, ) * 2 + data_src[85:]
     test_block = error_correction()
     self.do(data_src, data_exp, test_block)
     self.tb.run()
示例#6
0
 def test_004(self):
     """13 data bytes broken, uncorrectable."""
     data_src = tuple([ord(x) for x in self._packet00.decode('hex')])
     data_src = data_src[:72] + (0, ) * 13 + data_src[85:]
     data_exp = data_src
     test_block = error_correction()
     self.do(data_src, data_exp, test_block)
     self.tb.run()