Skip to content

Commit

Permalink
Fix for TEENSYDUINO not having the protected String::concat(const cha…
Browse files Browse the repository at this point in the history
…r *, unsigned int); it has String::append instead.
  • Loading branch information
ssilverman committed Mar 17, 2019
1 parent e4f7a65 commit e0710c7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ArduinoUnitUtility/ArduinoUnitMockPrint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,12 @@ MockPrint::MockPrint(const String &_initial) : String(_initial) {}
MockPrint::~MockPrint() {}

size_t MockPrint::write(uint8_t x) { concat((char) x); return 1; }
size_t MockPrint::write(const uint8_t *buffer, size_t size) { concat((const char *)buffer,size); return size; }
size_t MockPrint::write(const uint8_t *buffer, size_t size) {
#ifdef TEENSYDUINO
append((const char *)buffer, size);
#else
concat((const char *)buffer, size);
#endif // TEENSYDUINO
return size;
}
int MockPrint::availableForWrite() { return INT_MAX; }

0 comments on commit e0710c7

Please sign in to comment.