add namespace, make stl, and template allocator

This commit is contained in:
hugogogo
2022-06-03 14:49:22 +02:00
parent 6362a50ffa
commit aecd2caa1c
6 changed files with 262 additions and 197 deletions

29
headers/tests.hpp Normal file
View File

@@ -0,0 +1,29 @@
#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