Basis for test suites.
More...
#include <Uefi.h>
#include "types.h"
#include "asserts.h"
#include "output.h"
#include <UEFIStarter/core/console.h>
Go to the source code of this file.
Basis for test suites.
- Author
- Richard Nusser
- Copyright
- 2017-2018 Richard Nusser
- License
- GPLv3 (see http://www.gnu.org/licenses/)
- See also
- https://github.com/rinusser/UEFIStarter
◆ INIT_TESTGROUP
#define INIT_TESTGROUP |
( |
|
NAME | ) |
|
Value: { \
global_test_results.skipped_count++; \
return FALSE; \
} \
print_test_group_start(NAME);
BOOLEAN is_skipped_test(CHAR16 *name)
Tests whether a given test should be skipped.
Definition: tests.c:239
Helper macro to start a testgroup.
- Parameters
-
NAME | the test group's name |
◆ RUN_TEST
#define RUN_TEST |
( |
|
FUNC, |
|
|
|
DESC |
|
) |
| run_test(FUNC,DESC); |
Helper macro to run a test.
- Parameters
-
FUNC | the test's function to execute |
DESC | the test's description |
◆ run_tests()
Runs a test group.
This gets created automatically (in generated/runner.c in the test suite's directory).
◆ run_test()
void run_test |
( |
void(*)() |
func, |
|
|
CHAR16 * |
description |
|
) |
| |
Runs an individual test.
This function takes care of required setup/teardown around tests.
- Parameters
-
func | the test function to execute |
description | the test's description |
◆ run_group()
void run_group |
( |
BOOLEAN(*)() |
func | ) |
|
Runs a test group.
- Parameters
-
func | the test group to run |
◆ is_skipped_test()
BOOLEAN is_skipped_test |
( |
CHAR16 * |
name | ) |
|
Tests whether a given test should be skipped.
- Parameters
-
- Returns
- whether the test should be skipped