Files
42_INT_11_ft_containers/headers/tests.h
2022-06-01 15:41:14 +02:00

30 lines
433 B
C++

#ifndef TESTS_H
# define TESTS_H
#include <vector>
#include <string>
# define TEST(s) \
{\
test_title = #s;\
struct tester : public test_base {\
void func()
# define TESTEND \
};\
test = new(tester);\
test->title = test_title;\
test_list.push_back(test);\
}
struct test_base {
std::string title;
virtual void func() {}
};
std::vector<test_base *> test_list;
test_base *test;
std::string test_title;
#endif