adding Serial.prinf(const char* format, ...)#84
adding Serial.prinf(const char* format, ...)#84arek-jamanskiy wants to merge 1 commit intoFabioBatSilva:masterfrom
Conversation
|
|
||
|
|
||
| size_t Print::printf(const char *format, ...) { | ||
| va_list arg; |
There was a problem hiding this comment.
This should be a call to the fake instance not a concrete implementation.
This might help : https://github.com/FabioBatSilva/ArduinoFake/blob/master/CONTRIBUTING.md
There was a problem hiding this comment.
I tried - maybe not very hard - but mocking method with ... did not work for me at all.
There was a problem hiding this comment.
But I will try one more time. thanks for fast feedback!
| if (this->Instances) { | ||
| delete this->Instances; | ||
| } | ||
| this->Instances = new ArduinoFakeInstances(); |
There was a problem hiding this comment.
this is necessary to fix unit test ArduinoContextTest::test_reset. It failed on my pc all the time no matter what.
It failed because CRT, used in g++ compiler shipped with msys64 installed on Windows, reuses very same memory address (value of this->Instances) when re-creating object just after deleting it. So I created new object first and then deleted the old one
adding Serial.printf(const char* format, ...)