|
FastLED 3.9.15
|
#include <fltest.h>
Collaboration diagram for fl::test::TestContext:Classes | |
| struct | TestCaseInfo |
Public Types | |
| typedef void(* | TestFunc) () |
Public Member Functions | |
| void | checkFailed (const char *expr, const char *file, int line) FL_NOEXCEPT |
| bool | checkTimeout () FL_NOEXCEPT |
| Check if current test has timed out (call periodically in long tests) Returns true if timed out. | |
| bool | enterSubcase (const SubcaseSignature &sig) FL_NOEXCEPT |
| void | exitSubcase (const SubcaseSignature &sig) FL_NOEXCEPT |
| fl::u32 | getElapsedMs () const FL_NOEXCEPT |
| Get elapsed time for current test (in ms) | |
| bool | hasFailure () const FL_NOEXCEPT |
| fl::size | listTests (const char *filter=nullptr) const FL_NOEXCEPT |
| bool | needsReentry () const FL_NOEXCEPT |
| int | registerTest (TestFunc func, const char *name, const char *file, int line) FL_NOEXCEPT |
| void | reportAssert (const AssertResult &result) FL_NOEXCEPT |
| IReporter * | reporter () FL_NOEXCEPT |
| void | requireFailed (const char *expr, const char *file, int line) FL_NOEXCEPT |
| int | run (const char *filter) FL_NOEXCEPT |
| int | run (int argc=0, const char *const *argv=nullptr) FL_NOEXCEPT |
| void | setCurrentTestFailed (bool failed) FL_NOEXCEPT |
| void | setDefaultTimeoutMs (fl::u32 timeoutMs) FL_NOEXCEPT |
| Set default timeout for all tests (0 = no timeout) | |
| void | setGetMillis (GetMillisFunc func) FL_NOEXCEPT |
| Set the function to get current time in milliseconds. | |
| void | setReporter (IReporter *reporter) FL_NOEXCEPT |
| void | setTimeoutHandler (TimeoutHandlerFunc func) FL_NOEXCEPT |
| Set the timeout handler callback. | |
| const TestStats & | stats () const FL_NOEXCEPT |
| TestStats & | stats () FL_NOEXCEPT |
Static Public Member Functions | |
| static TestContext & | instance () FL_NOEXCEPT |
Private Member Functions | |
| TestContext () FL_NOEXCEPT | |
| fl::u32 | hashCurrentPath (const SubcaseSignature &sig) const FL_NOEXCEPT |
| bool | isFullyTraversed (fl::u32 hash) const FL_NOEXCEPT |
| void | markFullyTraversed (fl::u32 hash) FL_NOEXCEPT |
| bool | matchesFilter (const char *name, const char *filter) const FL_NOEXCEPT |
| void | runTestCase (const TestCaseInfo &info) FL_NOEXCEPT |
Private Attributes | |
| fl::size | mCurrentSubcaseDepth = 0 |
| bool | mCurrentTestFailed = false |
| const char * | mCurrentTestName = nullptr |
| fl::u32 | mCurrentTestStartMs = 0 |
| bool | mCurrentTestTimedOut = false |
| DefaultReporter | mDefaultReporter |
| fl::u32 | mDefaultTimeoutMs = 0 |
| fl::vector< fl::u32 > | mFullyTraversedHashes |
| GetMillisFunc | mGetMillis = nullptr |
| fl::vector< SubcaseSignature > | mNextSubcaseStack |
| IReporter * | mReporter = nullptr |
| bool | mShouldReenter = false |
| TestStats | mStats |
| fl::size | mSubcaseDiscoveryDepth = 0 |
| fl::vector< SubcaseSignature > | mSubcaseStack |
| fl::vector< TestCaseInfo > | mTestCases |
| TimeoutHandlerFunc | mTimeoutHandler = nullptr |