arduino-dataflash
|
Display test failure informations on the serial line. More...
#include <SerialNotifier.h>
Public Types | |
enum | { DefaultValueLen = 32, DefaultFilenameLen = 32, DefaultSuitenameLen = 16, DefaultTestnameLen = 16, MaxStringLen = 127 } |
Public Member Functions | |
SerialNotifier (size_t maxValueLen=DefaultValueLen, size_t maxFilenameLen=DefaultFilenameLen, size_t maxSuitenameLen=DefaultSuitenameLen, size_t maxTestnameLen=DefaultTestnameLen) | |
Constructor. | |
virtual | ~SerialNotifier () |
Destructor. | |
virtual void | NotifyFailure (char const *expected, char const *value, Dummy::Infos const &infos) |
Build failure notification string and send it via Serial. | |
virtual void | NotifyResult (const Result &result) |
Tests result notification and send it via Serial. | |
![]() | |
virtual | ~TestNotificationInterface () |
Destructor. | |
Protected Member Functions | |
void | FormatString (char *&out, const char *in, size_t len, size_t allowedLen) |
Add current string to notification string and cut it if necessary. | |
Protected Attributes | |
size_t | m_allowedValueLen |
size_t | m_allowedFilenameLen |
size_t | m_allowedSuitenameLen |
size_t | m_allowedTestnameLen |
char | m_notificationString [128] |
Display test failure informations on the serial line.
The notification is : "filename:line suite test expected_value test_value" If filename, suite, test or values are too long they are cut and "..." is appended.
anonymous enum |
Dummy::SerialNotifier::SerialNotifier | ( | size_t | maxValueLen = DefaultValueLen , |
size_t | maxFilenameLen = DefaultFilenameLen , |
||
size_t | maxSuitenameLen = DefaultSuitenameLen , |
||
size_t | maxTestnameLen = DefaultTestnameLen |
||
) |
Constructor.
|
virtual |
Destructor.
|
protected |
Add current string to notification string and cut it if necessary.
[out] | out | Notification string pointer. |
[in] | in | Input string. |
[in] | len | Input string length. |
[in] | allowedLen | Allowed output length. |
|
virtual |
Build failure notification string and send it via Serial.
[in] | expected | Expected value. |
[in] | value | Obtained value. |
[in] | infos | Test infos. |
Implements Dummy::TestNotificationInterface.
|
virtual |
Tests result notification and send it via Serial.
[in] | result | : tests result. |
Implements Dummy::TestNotificationInterface.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |