diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-03-08 20:28:10 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-03-08 20:29:03 +0530 |
| commit | 6d3ee55638164df6521a60b6392a26f855d5f924 (patch) | |
| tree | 18448793cbb971e76cbaeb7b9d2159ee2ab5d3b6 /spec/TestUtils.h | |
| parent | b7ac4dc7a20c624a343c946c5decd1b84eab2b82 (diff) | |
| download | null-browser-6d3ee55638164df6521a60b6392a26f855d5f924.tar.gz null-browser-6d3ee55638164df6521a60b6392a26f855d5f924.zip | |
Add test setup + spec for command input
Diffstat (limited to '')
| -rw-r--r-- | spec/TestUtils.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/TestUtils.h b/spec/TestUtils.h new file mode 100644 index 0000000..b2c1cc6 --- /dev/null +++ b/spec/TestUtils.h @@ -0,0 +1,20 @@ +#include <QtTest/QtTest> +#include <cstdio> + +#define ANSI_BOLD "\x1b[1m" +#define COLOR_CONTEXT "\x1b[32m" ANSI_BOLD +#define COLOR_IT "\x1b[36m" ANSI_BOLD +#define COLOR_SKIP "\x1b[33m" ANSI_BOLD +#define ANSI_RESET "\x1b[0m" + +#define context(msg) printf("⚪" COLOR_CONTEXT "%s" ANSI_RESET "\n", msg); + +#define it(msg) \ + printf(" ⚪" ANSI_BOLD COLOR_IT "it " ANSI_RESET COLOR_IT "%s" ANSI_RESET \ + "\n", \ + msg); \ + if (1) + +#define xit(msg) \ + printf(" ⚪" COLOR_SKIP "SKIPPED it %s" ANSI_RESET "\n", msg); \ + if (0) |
