tmp
This commit is contained in:
parent
00d8fa0886
commit
65cb26a627
34 changed files with 288 additions and 264 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue