diff options
author | Fred Sundvik <fsundvik@gmail.com> | 2016-02-20 13:59:48 +0200 |
---|---|---|
committer | Fred Sundvik <fsundvik@gmail.com> | 2016-02-20 13:59:48 +0200 |
commit | 4b9fccc75633b4ea297de373d5d7f01288d2fb11 (patch) | |
tree | 8608a73275d59ef38bcae58608489581ff0b74b9 /serial_link/tests/frame_validator_tests.c | |
parent | 5a1600e24f2ca0cf8e9d75e23691bc1971657934 (diff) |
Start implement router
Diffstat (limited to 'serial_link/tests/frame_validator_tests.c')
-rw-r--r-- | serial_link/tests/frame_validator_tests.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/serial_link/tests/frame_validator_tests.c b/serial_link/tests/frame_validator_tests.c index 49c61d1e4d..f4abd14d1b 100644 --- a/serial_link/tests/frame_validator_tests.c +++ b/serial_link/tests/frame_validator_tests.c @@ -30,7 +30,7 @@ void route_incoming_frame(uint8_t link, uint8_t* data, uint16_t size) { mock(data, size); } -void send_frame(uint8_t link, uint8_t* data, uint16_t size) { +void byte_stuffer_send_frame(uint8_t link, uint8_t* data, uint16_t size) { mock(data, size); } @@ -83,7 +83,7 @@ Ensure(FrameValidator, validates_five_byte_frame_with_correct_crc) { Ensure(FrameValidator, sends_one_byte_with_correct_crc) { uint8_t original[] = {0x44, 0, 0, 0, 0}; uint8_t expected[] = {0x44, 0x04, 0x6A, 0xB3, 0xA3}; - expect(send_frame, + expect(byte_stuffer_send_frame, when(size, is_equal_to(sizeof(expected))), when(data, is_equal_to_contents_of(expected, sizeof(expected))) ); @@ -93,7 +93,7 @@ Ensure(FrameValidator, sends_one_byte_with_correct_crc) { Ensure(FrameValidator, sends_five_bytes_with_correct_crc) { uint8_t original[] = {1, 2, 3, 4, 5, 0, 0, 0, 0}; uint8_t expected[] = {1, 2, 3, 4, 5, 0xF4, 0x99, 0x0B, 0x47}; - expect(send_frame, + expect(byte_stuffer_send_frame, when(size, is_equal_to(sizeof(expected))), when(data, is_equal_to_contents_of(expected, sizeof(expected))) ); |