summaryrefslogtreecommitdiffstats
path: root/serial_link/tests/transport_tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'serial_link/tests/transport_tests.c')
-rw-r--r--serial_link/tests/transport_tests.c14
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);
}