Use UnitTest-Cpp library for testing

This commit is contained in:
Ilusha 2024-03-15 16:03:33 +03:00
parent ecaa2bbdfb
commit 00d8fa0886
53 changed files with 1046 additions and 1383 deletions

View file

@ -1,27 +1,19 @@
#include "Tests.hpp"
#include "Testing.hpp"
static bool init(const tp::ModuleManifest* self) {
tp::gTesting.setRootName(self->getName());
return true;
}
#include "UnitTest++/UnitTest++.h"
int main() {
tp::ModuleManifest* deps[] = { &tp::gModuleUtils, &tp::gModuleAllocators, nullptr };
tp::ModuleManifest testModule("ContainersTest", init, nullptr, deps);
tp::ModuleManifest testModule("ContainersTest", nullptr, nullptr, deps);
if (!testModule.initialize()) {
return 1;
}
testIntervalTree();
testList();
testMap();
testAvl();
testBuffer();
testBuffer2d();
bool res = UnitTest::RunAllTests();
testModule.deinitialize();
return res;
}