Closed tickietackie closed 2 years ago
You need to tell the mock to expect the call and what to do when the method is called.
void test_something_with_a_delay(){
When(Method(ArduinoFake(), delay)).AlwaysReturn();
delay(1000);
Verify(Method(ArduinoFake(), delay).Using(1000)).Exactly(1);
}
Thanks for the explanation @wrong-kendall ..
@tickietackie as mentioned.. you have to mock the calls
Hello, I am using the delay function which is causing the following crash when used within my tests.
I tried if it will even crash for a very simple test, which it does for me:
When I remove the delay(2000) it runs smoothly. Is this a general error, or can somebody explain the behavior?
I am running this on a Mac M1 and with the current master branch on GitHub.