@@ -42,6 +42,7 @@ struct ticker_interface_stub_t {
42
42
unsigned int disable_interrupt_call;
43
43
unsigned int clear_interrupt_call;
44
44
unsigned int set_interrupt_call;
45
+ unsigned int fire_interrupt_call;
45
46
};
46
47
47
48
static ticker_interface_stub_t interface_stub = { 0 };
@@ -75,6 +76,11 @@ static void ticker_interface_stub_set_interrupt(timestamp_t timestamp)
75
76
interface_stub.interrupt_timestamp = timestamp;
76
77
}
77
78
79
+ static void ticker_interface_stub_fire_interrupt ()
80
+ {
81
+ ++interface_stub.fire_interrupt_call ;
82
+ }
83
+
78
84
static void reset_ticker_interface_stub ()
79
85
{
80
86
interface_stub.interface .init = ticker_interface_stub_init;
@@ -84,6 +90,7 @@ static void reset_ticker_interface_stub()
84
90
interface_stub.interface .clear_interrupt =
85
91
ticker_interface_stub_clear_interrupt;
86
92
interface_stub.interface .set_interrupt =ticker_interface_stub_set_interrupt;
93
+ interface_stub.interface .fire_interrupt = ticker_interface_stub_fire_interrupt;
87
94
interface_stub.initialized = false ;
88
95
interface_stub.interrupt_flag = false ;
89
96
interface_stub.timestamp = 0 ;
@@ -93,6 +100,7 @@ static void reset_ticker_interface_stub()
93
100
interface_stub.disable_interrupt_call = 0 ;
94
101
interface_stub.clear_interrupt_call = 0 ;
95
102
interface_stub.set_interrupt_call = 0 ;
103
+ interface_stub.fire_interrupt_call = 0 ;
96
104
}
97
105
98
106
// stub of the event queue
@@ -949,11 +957,7 @@ static void test_insert_event_us_underflow()
949
957
);
950
958
951
959
TEST_ASSERT_EQUAL_PTR (&event, queue_stub.head );
952
- TEST_ASSERT_EQUAL_UINT32 (
953
- interface_stub.timestamp ,
954
- interface_stub.interrupt_timestamp
955
- );
956
- TEST_ASSERT_EQUAL (1 , interface_stub.set_interrupt_call );
960
+ TEST_ASSERT_EQUAL (1 , interface_stub.fire_interrupt_call );
957
961
958
962
TEST_ASSERT_EQUAL (0 , interface_stub.disable_interrupt_call );
959
963
}
@@ -2079,4 +2083,4 @@ int main()
2079
2083
{
2080
2084
Specification specification (greentea_test_setup, cases, greentea_test_teardown_handler);
2081
2085
return !Harness::run (specification);
2082
- }
2086
+ }
0 commit comments