Aside from my native unittests, I want to write embedded tests as well for my platform (ststm32-maple). With ArduinoFake/FakeIT I can mock digitalWrite and test this for instance:
Verify(Method(ArduinoFake(), digitalWrite).Using(RESET_PIN, HIGH)).Once(); Verify(Method(ArduinoFake(), digitalWrite).Using(RESET_PIN, LOW)).Once();
to test if a pin was toggled. Can I do something similar with embedded tests? I know I can do a
digitalRead of course, but if it is a reset, the pin is toggled quickly, so timing is an issue. How can I test if the pin was first pulled HIGH and then LOW again, (or the other way around)?