|
pianod2
multisource multiuser scriptable networked music player
|
#include <failurecounter.h>
Public Member Functions | |
| FailureCounter (const std::string &n) | |
| Start a new group of tests. More... | |
| ~FailureCounter () | |
| On destruction, report summary of test results. More... | |
| void | subtest (const std::string &n) |
| Provide a name for a group of subtests. More... | |
| void | skip (const std::string &reason) |
| Record that a test was skipped. More... | |
| void | warning (const std::string &reason) |
| Record that a test generated a warning. More... | |
| bool | succeed (const std::string &success) |
| Record and report a successful test. More... | |
| bool | fail (const std::string &failure, const std::string &detail="") |
| Record and report a failed test. More... | |
| bool | result (bool result, const std::string &test, const std::string &detail="") |
| template<typename T > | |
| bool | equal (const std::string &test_name, const T &expect, const T &actual) |
| bool | equal (const std::string &test_name, const char *expect, const char *actual) |
| bool | equal (const std::string &test_name, const char *expect, const std::string &actual) |
| bool | equal (const std::string &test_name, long expect, const long actual) |
| bool | isTrue (const std::string &test_name, bool actual) |
| bool | isFalse (const std::string &test_name, bool actual) |
| bool | signEqual (const std::string &test_name, long expect, long actual) |
| template<typename T > | |
| bool | equal (const T &expect, const T &actual) |
| bool | equal (const char *expect, const char *actual) |
| bool | equal (const char *expect, const std::string &actual) |
| bool | equal (long expect, const long actual) |
| bool | isTrue (bool actual) |
| bool | isFalse (bool actual) |
| bool | sameException (const std::string &trigger, const std::exception &expect, const std::exception &actual, bool compare_text=false) |
| bool | sameExceptionAndText (const std::string &trigger, const std::exception &expect, const std::exception &actual) |
| int | errorCount () |
Static Public Member Functions | |
| static void | initialize_colors () |
| If ncurses is available, initializes terminal color escape sequences. More... | |
| static int | grandTotalErrors () |
| static void | summary () |
Private Attributes | |
| std::string | name |
| std::string | subtest_name |
| int | tests {0} |
| int | passes {0} |
| int | errors {0} |
| int | warnings {0} |
| int | skips {0} |
| int | check_number {0} |
Static Private Attributes | |
| static int | grand_total_tests |
| static int | grand_total_passes |
| static int | grand_total_errors |
| static int | grand_total_warnings |
| static int | grand_total_skips |
| static std::string | green |
| static std::string | red |
| static std::string | yellow |
| static std::string | bold |
| static std::string | normal |
|
inline |
Start a new group of tests.
| n | The name of the test group |
|
inline |
On destruction, report summary of test results.
|
inline |

|
inline |

|
inline |

|
inline |

|
inline |


|
inline |
|
inline |

|
inline |
|
inline |
|
inline |
Record and report a failed test.
| failure | The name or reason for the failure. |
| detail | Additional details about the failure. |

|
inlinestatic |
|
inlinestatic |
If ncurses is available, initializes terminal color escape sequences.
setupterm function, as done by this function, interferes with GDB breakpoints. Don't enable colors if debugging.
|
inline |

|
inline |

|
inline |

|
inline |

|
inline |


|
inline |


|
inline |

|
inline |

|
inline |
Record that a test was skipped.
| reason | The reason for skipping. |
|
inline |
Provide a name for a group of subtests.
| n | The subtest group name. |
|
inline |
Record and report a successful test.
| success | Name or details of the success |

|
inlinestatic |
|
inline |
Record that a test generated a warning.
| reason | The reason for the warning. |
|
staticprivate |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
staticprivate |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |