Files

20 lines
397 B
C++
Raw Permalink Normal View History

2026-10-02 20:31:24 +03:00
#pragma once
#include <iostream>
#include <vector>
typedef int (*TestFunc)(void);
extern std::vector<TestFunc> test_funcs;
#define CHECK(a) do { \
if (a) { \
std::cout << "Failed check in " << __func__ << ":" << __LINE__ << "\n" \
<< #a << " does not hold\n"; \
return 1; \
} \
} while (0)
#define TEST(name) static int name(void)
#define REGISTER(name) test_funcs.push_back(name)