AUnit
1.2.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
|
An implementation of Print that writes to an in-memory buffer. More...
#include <FakePrint.h>
Public Member Functions | |
size_t | write (uint8_t c) override |
size_t | write (const uint8_t *buffer, size_t size) override |
void | flush () override |
const char * | getBuffer () const |
Return the NUL terminated string buffer. More... | |
Static Public Attributes | |
static const uint8_t | kBufSize = 8 * sizeof(long long) + 2 + 1 |
Size of the internal buffer. More... | |
An implementation of Print that writes to an in-memory buffer.
The buffer can be retrieved using getBuffer() to verify that the expected string was written to the Print object.
Definition at line 39 of file FakePrint.h.
|
inline |
Return the NUL terminated string buffer.
After the buffer is no longer needed, the flush() method should be called to reset the internal buffer index to 0.
Definition at line 85 of file FakePrint.h.
|
static |
Size of the internal buffer.
This is just large enough to hold the string representation of one 64-bit integer in binary format (64 bytes), including 2 bytes for the '\r\n' from println() and 1 byte for the terminating NUL.
Definition at line 47 of file FakePrint.h.