Modules/Containers/tests/Tests.cpp
2024-03-15 23:42:10 +03:00

24 lines
325 B
C++

#include "Tests.hpp"
#include "UnitTest++/UnitTest++.h"
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();
}