- 0x00, 0x40, 0x38, 0xcd, 0x38, 0x3d, 0x34, 0xca, 0x31, 0xc3, 0xc1, 0xc6, 0x35, 0xcc, 0x3a, 0x3c,
+ 0x40, 0x38, 0xcd, 0x38, 0x3d, 0x34, 0xca, 0x31, 0xc3, 0xc1, 0xc6, 0x35, 0xcc, 0x3a, 0x3c,
0x3c, 0x3d, 0x3c, 0x37, 0xc5, 0xc1, 0xc0, 0xc1, 0xc1, 0xc3, 0xc0, 0xc1, 0xc6, 0x38, 0x3b, 0xc6,
0xc0, 0xc6, 0x32, 0xc9, 0xc9, 0x34, 0xcf, 0x35, 0xcf, 0x3a, 0x3b, 0xc6, 0xc7, 0x35, 0xcf, 0x36,
0xce, 0x37, 0xc8, 0xc8, 0x3a, 0x3c, 0xc9, 0xc8, 0x3a, 0x3c, 0xcc, 0x32, 0xcd, 0x32, 0xce, 0x32,
0x3c, 0x3d, 0x3c, 0x37, 0xc5, 0xc1, 0xc0, 0xc1, 0xc1, 0xc3, 0xc0, 0xc1, 0xc6, 0x38, 0x3b, 0xc6,
0xc0, 0xc6, 0x32, 0xc9, 0xc9, 0x34, 0xcf, 0x35, 0xcf, 0x3a, 0x3b, 0xc6, 0xc7, 0x35, 0xcf, 0x36,
0xce, 0x37, 0xc8, 0xc8, 0x3a, 0x3c, 0xc9, 0xc8, 0x3a, 0x3c, 0xcc, 0x32, 0xcd, 0x32, 0xce, 0x32,
- for (off = 0; off < sizeof (real_packet) - 576; off++) {
- decode_len = ao_fec_decode(real_packet+off, 576, decode, 34, NULL);
+ ok = ao_fec_decode(real_packet, 576, decode, 34, NULL);
- if (memcmp(original, decode, original_len) != 0) {
- printf ("data mis-match\n");
- error++;
- }
- if (error) {
- printf ("Errors: %d\n", receive_errors);
- ao_fec_dump_bytes(original, original_len, "Input");
- ao_fec_dump_bytes(decode, original_len, "Decode");
- errors += error;
- }
+ printf ("%d packets coded\n", trial);
+ printf ("decode_fail %d crc_mismatch %d data_mismatch %d\n",
+ decode_fail, crc_mismatch, data_mismatch);
+ if (decode_fail != EXPECT_DECODE_FAIL) {
+ printf ("expected %d decode failures\n", EXPECT_DECODE_FAIL);
+ errors++;
+ }
+ if (crc_mismatch != EXPECT_CRC_MISMATCH) {
+ printf ("expected %d crc mismatch\n", EXPECT_CRC_MISMATCH);
+ errors++;
+ }
+ if (data_mismatch != EXPECT_DATA_MISMATCH) {
+ printf ("expected %d data mismatch\n", EXPECT_DATA_MISMATCH);
+ errors++;