diff options
author | jaseg <git@jaseg.net> | 2019-01-12 22:44:25 +0900 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2019-01-12 22:44:25 +0900 |
commit | 7461b22bfa50f5ec69be281ac35fb8c5b726ed8f (patch) | |
tree | 5818aaeb227e7fbafc5ff9f4a8a69fcaa193311d /fw | |
parent | 2d392fe60a9cc6c9541ae5db9b7857b7c0cdae06 (diff) | |
download | 8seg-7461b22bfa50f5ec69be281ac35fb8c5b726ed8f.tar.gz 8seg-7461b22bfa50f5ec69be281ac35fb8c5b726ed8f.tar.bz2 8seg-7461b22bfa50f5ec69be281ac35fb8c5b726ed8f.zip |
Protocol unit test working
Diffstat (limited to 'fw')
-rw-r--r-- | fw/protocol_test.c | 4 |
1 files changed, 1 insertions, 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; i<cmd_if->payload_len[i]; i++) + for (int i=0; i<cmd_if->payload_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; cmd<cmd_if->cmd_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); |