This commit is contained in:
Ilusha 2024-03-15 23:42:10 +03:00 committed by Ilya Shurupov
parent b8bcf58a29
commit afab59eb21
34 changed files with 288 additions and 264 deletions

View file

@ -2,18 +2,23 @@
#include "Tests.hpp"
#include "UnitTest++/UnitTest++.h"
int main() {
tp::ModuleManifest* deps[] = { &tp::gModuleUtils, &tp::gModuleAllocators, nullptr };
tp::ModuleManifest testModule("ContainersTest", nullptr, nullptr, deps);
if (!testModule.initialize()) {
return 1;
}
bool res = UnitTest::RunAllTests();
testModule.deinitialize();
return res;
void* TestAllocator::allocate(tp::ualni size) {
count++;
return malloc(size);
}
void TestAllocator::deallocate(void* p) {
if (p) {
free(p);
count--;
}
}
TestAllocator::~TestAllocator() {
ASSERT(!count);
}
int main() {
return UnitTest::RunAllTests();
}