removed bit_stuff from adidas so v1.1

This commit is contained in:
Rens Pastoor
2025-06-05 16:46:09 +02:00
parent 34ebc83b3e
commit 44025963ed
8 changed files with 15 additions and 80 deletions

View File

@@ -52,6 +52,14 @@ void test_decode_parity_flip(void){
TEST_ASSERT_EQUAL(0xD, right_data); // so the result should be 0b01101100 or 0xD
}
//
// mutiple bit flip test
void test_decode_multi_bit_flip(void){
uint8_t wrong_data = 0b01111101; // this should be 0b01101100 or unparityd 0b1101, 0xD
uint8_t right_data; // this is the correct data
decode_byte(wrong_data, &right_data);
TEST_ASSERT_NOT_EQUAL(0xD, right_data); // so the result should be 0b01101100 or 0xD
}
//
void run_decode_tests(){
UnityRegisterSetupTearDown(decode_setUp, decode_tearDown);
@@ -60,6 +68,9 @@ void run_decode_tests(){
MY_RUN_TEST(test_decode_get_nibbles_all_ones);
MY_RUN_TEST(test_decode_MSB_flip);
MY_RUN_TEST(test_decode_databit_flip);
MY_RUN_TEST(test_decode_common_databit_flip);
MY_RUN_TEST(test_decode_parity_flip);
MY_RUN_TEST(test_decode_multi_bit_flip);
UnityUnregisterSetupTearDown();
}