struct scx_test { /** * name - The name of the testcase.
*/ constchar *name;
/** * description - A description of your testcase: what it tests and is * meant to validate.
*/ constchar *description;
/* * setup - Setup the test. * @ctx: A pointer to a context object that will be passed to run and * cleanup. * * An optional callback that allows a testcase to perform setup for its * run. A test may return SCX_TEST_SKIP to skip the run.
*/ enum scx_test_status (*setup)(void **ctx);
/* * run - Run the test. * @ctx: Context set in the setup() callback. If @ctx was not set in * setup(), it is NULL. * * The main test. Callers should return one of: * * - SCX_TEST_PASS: Test passed * - SCX_TEST_SKIP: Test should be skipped * - SCX_TEST_FAIL: Test failed * * This callback must be defined.
*/ enum scx_test_status (*run)(void *ctx);
/* * cleanup - Perform cleanup following the test * @ctx: Context set in the setup() callback. If @ctx was not set in * setup(), it is NULL. * * An optional callback that allows a test to perform cleanup after * being run. This callback is run even if the run() callback returns * SCX_TEST_SKIP or SCX_TEST_FAIL. It is not run if setup() returns * SCX_TEST_SKIP or SCX_TEST_FAIL.
*/ void (*cleanup)(void *ctx);
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.