Formatting code

This commit is contained in:
Ilusha 2023-06-30 14:02:55 +00:00
parent 6dc64ce76b
commit 13a8f07e32
37 changed files with 2242 additions and 2281 deletions

View file

@ -6,36 +6,36 @@
#include <cstdlib>
static bool init(const tp::ModuleManifest* self) {
tp::gTesting.setRootName(self->getName());
return true;
tp::gTesting.setRootName(self->getName());
return true;
}
void* TestAllocator::allocate(tp::ualni size) {
nAllocations++;
return malloc(size);
nAllocations++;
return malloc(size);
}
void TestAllocator::deallocate(void* p) {
nAllocations--;
free(p);
nAllocations--;
free(p);
}
tp::ualni TestAllocator::getAllocationsCount() const {
return nAllocations;
return nAllocations;
}
int main() {
tp::ModuleManifest* deps[] = { &tp::gModuleUtils, nullptr };
tp::ModuleManifest testModule("ContainersTest", init, nullptr, deps);
tp::ModuleManifest* deps[] = { &tp::gModuleUtils, nullptr };
tp::ModuleManifest testModule("ContainersTest", init, nullptr, deps);
if (!testModule.initialize()) {
return 1;
}
if (!testModule.initialize()) {
return 1;
}
testList();
testMap();
testAvl();
testList();
testMap();
testAvl();
testModule.deinitialize();
testModule.deinitialize();
}