#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
Go to the source code of this file.
#define dap_assert |
( |
|
expr, |
|
|
|
testname |
|
) |
| |
Value:if(expr) { \
} else { \
exit(-1); }\
#define TEXT_COLOR_RED
Definition: dap_test.h:9
#define TEXT_COLOR_RESET
Definition: dap_test.h:16
#define TEXT_COLOR_GRN
Definition: dap_test.h:10
#define dap_assert_PIF |
( |
|
expr, |
|
|
|
msg |
|
) |
| |
Value:if(expr) {} \
else { \
exit(-1); }
#define TEXT_COLOR_RED
Definition: dap_test.h:9
#define TEXT_COLOR_RESET
Definition: dap_test.h:16
PIF - print if failed. For checking value in loop, for don't repeat output.
Value: exit(-1);
#define TEXT_COLOR_RED
Definition: dap_test.h:9
#define TEXT_COLOR_RESET
Definition: dap_test.h:16
#define dap_pass_msg |
( |
|
testname | ) |
printf("\t%s%s PASS.%s\n", TEXT_COLOR_GRN, testname, TEXT_COLOR_RESET); \ |
#define dap_print_module_name |
( |
|
module_name | ) |
printf("%s%s passing the tests... %s\n", TEXT_COLOR_CYN, module_name, TEXT_COLOR_RESET); |
Display the name of the test module.
#define dap_test_msg |
( |
|
... | ) |
|
Value: printf(__VA_ARGS__); \
#define TEXT_COLOR_RESET
Definition: dap_test.h:16
#define TEXT_COLOR_WHT
Definition: dap_test.h:15
Can be used like debug info during write test.
#define TEXT_COLOR_BLU "\x1B[34m" |
#define TEXT_COLOR_CYN "\x1B[36m" |
#define TEXT_COLOR_GRN "\x1B[32m" |
#define TEXT_COLOR_MAG "\x1B[35m" |
#define TEXT_COLOR_RED "\x1B[31m" |
#define TEXT_COLOR_RESET "\x1B[0m" |
#define TEXT_COLOR_WHT "\x1B[37m" |
#define TEXT_COLOR_YEL "\x1B[33m" |
void dap_dump_hex |
( |
const void * |
data, |
|
|
size_t |
size |
|
) |
| |
The function displays a dump.
- Parameters
-
[in] | data | The data dump you want to display |
[in] | size | The size of the data whose dump you want to display |
The function displays a dump, for example an array, in hex format