initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#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)
|
||||
Reference in New Issue
Block a user