Modules/Objects/tests/Tests.cpp
IlushaShurupov 3f4f2caf1f Load and destroy methods revised for proper reference counting
The update enhances object management by involving scope-based reference counting. The change affects loading and destruction operations in the Object and several other classes, ensuring the release or retention of objects adhere to their usage context. A function for logging type data has also been introduced to provide better clarity during debugging. Also, tests in script & interpreter have been altered to run in separate module initializations to avoid cross-test interference. Overall, it provides better memory management and dependable tests.
2024-11-24 22:38:03 +03:00

36 lines
No EOL
578 B
C++

#include "NewPlacement.hpp"
#include "Testing.hpp"
#include "primitives/primitives.h"
using namespace tp;
using namespace obj;
void testCore();
void testPrimitives();
void testInterpreter();
int main() {
tp::ModuleManifest* deps[] = { &gModuleObjects, nullptr };
tp::ModuleManifest module("ObjectsTests", nullptr, nullptr, deps);
if (module.initialize()) {
testCore();
module.deinitialize();
}
if (module.initialize()) {
testPrimitives();
module.deinitialize();
}
if (module.initialize()) {
testInterpreter();
module.deinitialize();
}
return 0;
}