Fixes
This commit is contained in:
parent
fabceb52d3
commit
bc892da992
24 changed files with 116 additions and 110 deletions
|
|
@ -1,32 +1,15 @@
|
|||
|
||||
#include "Tests.hpp"
|
||||
|
||||
#include "Testing.hpp"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
static bool init(const tp::ModuleManifest* self) {
|
||||
tp::gTesting.setRootName(self->getName());
|
||||
return true;
|
||||
}
|
||||
|
||||
void* TestAllocator::allocate(tp::ualni size) {
|
||||
nAllocations++;
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void TestAllocator::deallocate(void* p) {
|
||||
nAllocations--;
|
||||
free(p);
|
||||
}
|
||||
|
||||
tp::ualni TestAllocator::getAllocationsCount() const {
|
||||
return nAllocations;
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
||||
tp::ModuleManifest* deps[] = { &tp::gModuleContainers, &tp::gModuleUtils, nullptr };
|
||||
tp::ModuleManifest* deps[] = { &tp::gModuleUtils, &tp::gModuleAllocators, nullptr };
|
||||
tp::ModuleManifest testModule("ContainersTest", init, nullptr, deps);
|
||||
|
||||
if (!testModule.initialize()) {
|
||||
|
|
@ -36,7 +19,7 @@ int main() {
|
|||
testList();
|
||||
testMap();
|
||||
testAvl();
|
||||
testBuffer();
|
||||
testBuffer();
|
||||
testBuffer2d();
|
||||
|
||||
testModule.deinitialize();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue