NOVA User-Level Environment
Version testbox/changed-memory-timing-317-g320d8b5
|
#include <nul/error.h>
#include <nul/parent.h>
#include <service/vprintf.h>
#include <service/string.h>
#include <service/logging.h>
#include <nul/baseprogram.h>
Classes | |
class | WvTest |
struct | WvTest::NulErr |
struct | WvTest::NovaErr |
Macros | |
#define | WVTEST_PRINT_INFO_BEFORE 0 |
#define | WVSTART(title) Logging::printf("Testing \"%s\" in %s:%d:\n", title, WvTest::repo_rel_path(__FILE__), __LINE__); |
#define | WVPASS(cond) ({ WvTest __t(__FILE__, __LINE__, #cond); __t.check(cond); }) |
#define | WVNUL(nulerr) ({ WvTest __t(__FILE__, __LINE__, #nulerr); __t.check_nulerr(nulerr); }) |
#define | WVNOVA(novaerr) ({ WvTest __t(__FILE__, __LINE__, #novaerr); __t.check_novaerr(novaerr); }) |
#define | WVPASSEQ(a, b) ({ WvTest __t(__FILE__, __LINE__, #a " == " #b); __t.check_eq((a), (b), true); }) |
#define | WVPASSLT(a, b) ({ WvTest __t(__FILE__, __LINE__, #a " < " #b); __t.check_lt((a), (b)); }) |
#define | WVPASSGE(a, b) ({ WvTest __t(__FILE__, __LINE__, #a " >= " #b); __t.check_le((b), (a)); }) |
#define | WVFAIL(cond) ({ WvTest __t(__FILE__, __LINE__, "NOT(" #cond ")"); !__t.check(!(cond)); }) |
#define | WVFAILEQ(a, b) ({ WvTest __t(__FILE__, __LINE__, #a " != " #b); __t.check_eq((a), (b), false); }) |
#define | WVPASSNE(a, b) WVFAILEQ(a, b) |
#define | WVFAILNE(a, b) WVPASSEQ(a, b) |
#define | WVPERF(value, units) ({ WvTest __t(__FILE__, __LINE__, "PERF: " #value); __t.check_perf(value, units); }) |
#define | WV(code) ({ WvTest __t(__FILE__, __LINE__, #code); __t.check(true); code; }) |
#define | WVSHOW(val) ({ WvTest __t(__FILE__, __LINE__, #val); __t.show(val); }) |
#define | WVSHOWHEX(val) ({ WvTest __t(__FILE__, __LINE__, #val); __t.show_hex(val); }) |
#define | WVPRINTF(fmt,...) Logging::printf("! %s:%d " fmt " ok\n", WvTest::repo_rel_path(__FILE__), __LINE__, ##__VA_ARGS__) |
#define | ER(x) case x: return #x |
#define | ER(x) case NOVA_##x: return #x |
#define ER | ( | x | ) | case x: return #x |
#define ER | ( | x | ) | case NOVA_##x: return #x |
#define WVFAIL | ( | cond | ) | ({ WvTest __t(__FILE__, __LINE__, "NOT(" #cond ")"); !__t.check(!(cond)); }) |
#define WVFAILEQ | ( | a, | |
b | |||
) | ({ WvTest __t(__FILE__, __LINE__, #a " != " #b); __t.check_eq((a), (b), false); }) |
#define WVFAILNE | ( | a, | |
b | |||
) | WVPASSEQ(a, b) |
#define WVNOVA | ( | novaerr | ) | ({ WvTest __t(__FILE__, __LINE__, #novaerr); __t.check_novaerr(novaerr); }) |
#define WVNUL | ( | nulerr | ) | ({ WvTest __t(__FILE__, __LINE__, #nulerr); __t.check_nulerr(nulerr); }) |
#define WVPASS | ( | cond | ) | ({ WvTest __t(__FILE__, __LINE__, #cond); __t.check(cond); }) |
#define WVPASSEQ | ( | a, | |
b | |||
) | ({ WvTest __t(__FILE__, __LINE__, #a " == " #b); __t.check_eq((a), (b), true); }) |
#define WVPASSGE | ( | a, | |
b | |||
) | ({ WvTest __t(__FILE__, __LINE__, #a " >= " #b); __t.check_le((b), (a)); }) |
#define WVPASSLT | ( | a, | |
b | |||
) | ({ WvTest __t(__FILE__, __LINE__, #a " < " #b); __t.check_lt((a), (b)); }) |
#define WVPASSNE | ( | a, | |
b | |||
) | WVFAILEQ(a, b) |
#define WVPERF | ( | value, | |
units | |||
) | ({ WvTest __t(__FILE__, __LINE__, "PERF: " #value); __t.check_perf(value, units); }) |
#define WVPRINTF | ( | fmt, | |
... | |||
) | Logging::printf("! %s:%d " fmt " ok\n", WvTest::repo_rel_path(__FILE__), __LINE__, ##__VA_ARGS__) |
#define WVSTART | ( | title | ) | Logging::printf("Testing \"%s\" in %s:%d:\n", title, WvTest::repo_rel_path(__FILE__), __LINE__); |
#define WVTEST_PRINT_INFO_BEFORE 0 |