iPXE
|
UUID tests. More...
Go to the source code of this file.
Macros | |
#define | UUID(A, B, C, D, E0, E1, E2, E3, E4, E5) |
Define an inline UUID value. More... | |
#define | uuid_ntoa_ok(value, text) |
#define | uuid_aton_ok(text, value) |
#define | uuid_aton_fail_ok(text) uuid_aton_fail_okx ( text, __FILE__, __LINE__ ) |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | uuid_ntoa_okx (const union uuid *uuid, const char *text, const char *file, unsigned int line) |
Report a uuid_ntoa() test result. More... | |
static void | uuid_aton_okx (const char *text, const union uuid *uuid, const char *file, unsigned int line) |
Report a uuid_aton() test result. More... | |
static void | uuid_aton_fail_okx (const char *text, const char *file, unsigned int line) |
Report a uuid_aton() failure test result. More... | |
static void | uuid_test_exec (void) |
Perform UUID self-tests. More... | |
Variables | |
struct self_test uuid_test | __self_test |
UUID self-test. More... | |
UUID tests.
Definition in file uuid_test.c.
#define UUID | ( | A, | |
B, | |||
C, | |||
D, | |||
E0, | |||
E1, | |||
E2, | |||
E3, | |||
E4, | |||
E5 | |||
) |
#define uuid_ntoa_ok | ( | value, | |
text | |||
) |
Definition at line 71 of file uuid_test.c.
#define uuid_aton_ok | ( | text, | |
value | |||
) |
Definition at line 95 of file uuid_test.c.
#define uuid_aton_fail_ok | ( | text | ) | uuid_aton_fail_okx ( text, __FILE__, __LINE__ ) |
Definition at line 116 of file uuid_test.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Report a uuid_ntoa() test result.
uuid | UUID |
text | Expected textual representation |
file | Test code file |
line | Test code line |
Definition at line 57 of file uuid_test.c.
References uuid::a, uuid::b, uuid::c, uuid::canonical, uuid::d, DBG, uuid::e, ntohl, ntohs, okx, strcmp(), and uuid_ntoa().
|
static |
Report a uuid_aton() test result.
text | Textual representation |
uuid | Expected UUID |
file | Test code file |
line | Test code line |
Definition at line 86 of file uuid_test.c.
References DBG, memcmp(), okx, uuid_aton(), and uuid_ntoa().
|
static |
Report a uuid_aton() failure test result.
text | Textual representation |
file | Test code file |
line | Test code line |
Definition at line 109 of file uuid_test.c.
References okx, and uuid_aton().
|
static |
Perform UUID self-tests.
Definition at line 123 of file uuid_test.c.
References UUID, uuid_aton_fail_ok, uuid_aton_ok, and uuid_ntoa_ok.
struct self_test uuid_test __self_test |
UUID self-test.
Definition at line 153 of file uuid_test.c.