diff options
author | Fred Sundvik <fsundvik@gmail.com> | 2016-02-21 18:51:10 +0200 |
---|---|---|
committer | Fred Sundvik <fsundvik@gmail.com> | 2016-02-21 18:51:10 +0200 |
commit | fe1db50fc32c13bb1030676b1381125398bce5de (patch) | |
tree | c247af1fb6d62c4fe8ebffd17789fd35ef5027cd /serial_link/tests | |
parent | 2710361cd818aae6dd349fa433ebff365908de06 (diff) |
Writing signals events
Diffstat (limited to 'serial_link/tests')
-rw-r--r-- | serial_link/tests/transport_tests.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/serial_link/tests/transport_tests.c b/serial_link/tests/transport_tests.c index 31e7b2dc7e..61b9a65080 100644 --- a/serial_link/tests/transport_tests.c +++ b/serial_link/tests/transport_tests.c @@ -23,8 +23,13 @@ SOFTWARE. */ #include <cgreen/cgreen.h> +#include <cgreen/mocks.h> #include "protocol/transport.c" +void signal_data_written(void) { + mock(); +} + typedef struct { uint32_t test; } test_object1_t; @@ -51,4 +56,13 @@ BeforeEach(Transport) { AfterEach(Transport) {} Ensure(Transport, write_to_local_signals_an_event) { + begin_write_master_to_slave(); + expect(signal_data_written); + end_write_master_to_slave(); + begin_write_slave_to_master(); + expect(signal_data_written); + end_write_slave_to_master(); + begin_write_master_to_single_slave(1); + expect(signal_data_written); + end_write_master_to_single_slave(1); } |