|
libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
|
Go to the source code of this file.
Data Structures | |
| struct | GblTestScenarioClass |
| struct | GblTestScenario |
Macros | |
Type System | |
Type UUID and cast operators. | |
| #define | GBL_TEST_SCENARIO_TYPE |
| #define | GBL_TEST_SCENARIO(self) |
| #define | GBL_TEST_SCENARIO_CLASS(klass) |
| #define | GBL_TEST_SCENARIO_CLASSOF(self) |
Functions | |
| GblType | GblTestScenario_type (void) |
| void | GblTestScenario_expectError (const GblTestScenario *pSelf) |
Lifetime Management | |
Creation and reference ownership methods. | |
| GblTestScenario * | GblTestScenario_create (const char *pName) |
| GblTestScenario * | GblTestScenario_ref (GblTestScenario *pSelf) |
| GblRefCount | GblTestScenario_unref (GblTestScenario *pSelf) |
Suite Management | |
Routines for managing child test suites. | |
| GBL_RESULT | GblTestScenario_enqueueSuite (GblTestScenario *pSelf, const GblTestSuite *pSuite) |
| GblTestSuite * | GblTestScenario_findSuite (const GblTestScenario *pSelf, const char *pName) |
Current Tests | |
Routines for querying the active tests. | |
| GblTestSuite * | GblTestScenario_currentSuite (const GblTestScenario *pSelf) |
| size_t | GblTestScenario_currentCase (const GblTestScenario *pSelf) |
Execution | |
Routines for starting text execution. | |
| GBL_RESULT | GblTestScenario_run (GblTestScenario *pSelf, int argc, const char *argv[]) |
| int | GblTestScenario_exec (GblTestScenario *pSelf, int argc, const char *argv[]) |
Results | |
Routines for querying the overall results. | |
| GblBool | GblTestScenario_ran (const GblTestScenario *pSelf) |
| GblBool | GblTestScenario_passed (const GblTestScenario *pSelf) |
GblTestScenario and related functions.
This file contains the type declaration for GblTestScenario and its related public API.
Definition in file gimbal_test_scenario.h.
| #define GBL_TEST_SCENARIO_TYPE |
GblType UUID for GblTestScenario.
Definition at line 31 of file gimbal_test_scenario.h.
| #define GBL_TEST_SCENARIO | ( | self | ) |
Casts a GblInstance to a GblTestScenario.
Definition at line 32 of file gimbal_test_scenario.h.
| #define GBL_TEST_SCENARIO_CLASS | ( | klass | ) |
Casts a GblClass to a GblTestScenarioClass.
Definition at line 33 of file gimbal_test_scenario.h.
| #define GBL_TEST_SCENARIO_CLASSOF | ( | self | ) |
Retrieves a GblTestScenarioClass from a GblInstance.
Definition at line 34 of file gimbal_test_scenario.h.
| GblType GblTestScenario_type | ( | void | ) |
Returns the GblType UUID associated with GblTestScenario.
| GblTestScenario * GblTestScenario_create | ( | const char * | pName | ) |
Creates a GblTestScenario with the given name, optionally as an extended subtype with the given instance structure size and floating class.
| GblTestScenario * GblTestScenario_ref | ( | GblTestScenario * | pSelf | ) |
Returns a new reference to an existing GblTestScenario instance, incrementing its reference counter.
| GblRefCount GblTestScenario_unref | ( | GblTestScenario * | pSelf | ) |
Releases a reference to the given GblTestScenario, destroying it when the reference counter hits zero.
| GBL_RESULT GblTestScenario_enqueueSuite | ( | GblTestScenario * | pSelf, |
| const GblTestSuite * | pSuite ) |
Enqueues the given GblTestSuite instance to be run as part of the given GblTestScenario's test plan.
| GblTestSuite * GblTestScenario_findSuite | ( | const GblTestScenario * | pSelf, |
| const char * | pName ) |
Finds a GblTestSuite by name which has been enqueued onto the given GblTestScenario.
| GblTestSuite * GblTestScenario_currentSuite | ( | const GblTestScenario * | pSelf | ) |
Returns a pointer to the currently executing GblTestSuite within the given GblTestScenario, if there is an active one.
| size_t GblTestScenario_currentCase | ( | const GblTestScenario * | pSelf | ) |
Returns the index of the currently executing test case within the currently executing GblTestSuite within the given GblTestScenario, if there is an active one, or GBL_NPOS otherwise.
| GBL_RESULT GblTestScenario_run | ( | GblTestScenario * | pSelf, |
| int | argc, | ||
| const char * | argv[] ) |
Begins execution of the given GblTestScenario instance, running through all of its enqueued GblTestSuites, possibly processing the given command-line arguments.
| int GblTestScenario_exec | ( | GblTestScenario * | pSelf, |
| int | argc, | ||
| const char * | argv[] ) |
Variant of GblTestScenario_run() which releases the GblTestScenario after execution and returns a status code which can be directly returned from main().
| GblBool GblTestScenario_ran | ( | const GblTestScenario * | pSelf | ) |
Returns whether or not the given GblTestScenario has run.
| GblBool GblTestScenario_passed | ( | const GblTestScenario * | pSelf | ) |
Returns whether or not the given GblTestScenario had any failing tests.
| void GblTestScenario_expectError | ( | const GblTestScenario * | pSelf | ) |
Signals to an executing GblTestScenario that the next error raised by the active test case is expected and should not be considered a test failure.