From 7461b22bfa50f5ec69be281ac35fb8c5b726ed8f Mon Sep 17 00:00:00 2001 From: jaseg Date: Sat, 12 Jan 2019 22:44:25 +0900 Subject: Protocol unit test working --- fw/protocol_test.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fw/protocol_test.c b/fw/protocol_test.c index 5f02ef1..ab824f2 100644 --- a/fw/protocol_test.c +++ b/fw/protocol_test.c @@ -35,7 +35,7 @@ void send_test_command_single(struct test_cmd_if *cmd_if, struct proto_rx_st *st receive_symbol(st, -K28_1); receive_symbol(st, cmd); receive_symbol(st, address); - for (int i=0; ipayload_len[i]; i++) + for (int i=0; ipayload_len[cmd]; i++) receive_symbol(st, pattern[i]); } @@ -57,7 +57,6 @@ void test_commands_with_pattern(struct test_cmd_if *cmd_if, unsigned char patter for (int cmd=0; cmdcmd_if.packet_type_max; cmd++) { /* Addresssed tests */ - /* reset_receiver(&st, &cmd_if->cmd_if); st.address = 23; handler_state.ncalls = 0; @@ -79,7 +78,6 @@ void test_commands_with_pattern(struct test_cmd_if *cmd_if, unsigned char patter assert(handler_state.ncalls == 1); assert(handler_state.last_cmd == cmd); assert(!memcmp(handler_state.last_args, pattern, cmd_if->payload_len[cmd])); - */ /* Bulk test */ reset_receiver(&st, &cmd_if->cmd_if); -- cgit