You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const char * msg = String("test").c_str();
Serial.println(msg);
Verify(OverloadedMethod(ArduinoFake(Serial), println, size_t(const char *)).Using("test")).Once();
// [FAILED]
// it prints 'ArduinoFake(Serial).println()' like println was called without any value at all
[UPDATED]
as I see, one of possible workaround for this is to modify the 'proxy' methods, and always create a copy of a String without calling free() method. E.g.
I've faced with a strange behavior when String type is used
a test contains the following
it fails with a message ...'ArduinoFake(Serial).println(1)...
"println(1)." <-- why '1' ?
BUT the following code works OK
One more example which doesn't work
BUT this one works OK
[UPDATED]
as I see, one of possible workaround for this is to modify the 'proxy' methods, and always create a copy of a String without calling free() method. E.g.
replace to
The text was updated successfully, but these errors were encountered: