LTE Primopredajnik
Loading...
Searching...
No Matches
tests.test_crc_checker.TestCRCChecker Class Reference

Public Member Functions

 setup_method (self)
 test_valid_payload_crc_ok (self)
 test_single_bit_flip_detected (self)
 test_multiple_bit_flips_detected (self)
 test_crc_bits_corrupted (self)
 test_all_zero_payload (self)
 test_all_one_payload (self)
 test_input_shorter_than_crc_raises (self)

Public Attributes

 checker = CRCChecker()
 encoder = PBCHEncoder(verbose=False)

Detailed Description

Test suite za CRCChecker (PBCH RX).
Pokriva:
- happy path (valid payload + CRC)
- single-bit error
- multiple-bit error
- CRC-only corruption
- minimalne i neispravne ulaze

Member Function Documentation

◆ setup_method()

tests.test_crc_checker.TestCRCChecker.setup_method ( self)
Poziva se prije svakog testa.

◆ test_all_one_payload()

tests.test_crc_checker.TestCRCChecker.test_all_one_payload ( self)
payload = sve jedinice, CRC treba proci

◆ test_all_zero_payload()

tests.test_crc_checker.TestCRCChecker.test_all_zero_payload ( self)
payload = svi nule, CRC treba proci

◆ test_crc_bits_corrupted()

tests.test_crc_checker.TestCRCChecker.test_crc_bits_corrupted ( self)
payload ispravan, CRC dio korumpiran -> ok = False

◆ test_input_shorter_than_crc_raises()

tests.test_crc_checker.TestCRCChecker.test_input_shorter_than_crc_raises ( self)
ulaz kraci od 16 CRC bitova -> ValueError

◆ test_multiple_bit_flips_detected()

tests.test_crc_checker.TestCRCChecker.test_multiple_bit_flips_detected ( self)
flip vise bitova -> ok = False

◆ test_single_bit_flip_detected()

tests.test_crc_checker.TestCRCChecker.test_single_bit_flip_detected ( self)
flip jednog bita -> ok = False

◆ test_valid_payload_crc_ok()

tests.test_crc_checker.TestCRCChecker.test_valid_payload_crc_ok ( self)
valid payload + crc -> ok = True

The documentation for this class was generated from the following file:
  • tests/test_crc_checker.py