UEFIStarter
a simple UEFI framework
tests.h
Go to the documentation of this file.
1 
11 #ifndef __TESTS_H
12 #define __TESTS_H
13 
14 #include <Uefi.h>
15 #include "types.h"
16 #include "asserts.h"
17 #include "output.h"
19 
20 
24 
25 
30 void run_tests();
31 
32 void run_test(void (*func)(), CHAR16 *description);
33 void run_group(BOOLEAN (*func)());
34 BOOLEAN is_skipped_test(CHAR16 *name);
35 
41 #define INIT_TESTGROUP(NAME) \
42  if(is_skipped_test(NAME)) \
43  { \
44  global_test_results.skipped_count++; \
45  return FALSE; \
46  } \
47  print_test_group_start(NAME);
48 
52 #define FINISH_TESTGROUP() return TRUE;
53 
60 #define RUN_TEST(FUNC,DESC) run_test(FUNC,DESC);
61 
63 #define mark_test_incomplete() individual_test_results.incomplete_count++;
64 
65 
66 #endif
void run_group(BOOLEAN(*func)())
Runs a test group.
Definition: tests.c:207
Common types for tests.
Presentation logic for tests.
General assertions for tests.
void run_tests()
Runs a test group.
Definition: runner.c:15
test_verbosity_t test_verbosity
the current test verbosity
Definition: tests.c:33
void run_test(void(*func)(), CHAR16 *description)
Runs an individual test.
Definition: tests.c:183
test_results_t global_test_results
results for all tests in this suite
Definition: tests.c:37
data type for test verbosity configuration
Definition: types.h:18
BOOLEAN is_skipped_test(CHAR16 *name)
Tests whether a given test should be skipped.
Definition: tests.c:239
CLI initialization and I/O helpers.
test_results_t individual_test_results
results for the current test
Definition: tests.c:35
data type for test results
Definition: types.h:38