12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- #include <locale.h>
- #include <stdio.h>
- #include <string.h>
- #include "Test.h"
- #include "Tests.h"
- #include "core/utils/Logger.h"
- #include "core/utils/Utility.h"
- static void onExit(int code, void* data) {
- unsigned int i = *(unsigned int*)(data);
- CORE_LOG_WARNING("Hello from exit %d: %u", code, i);
- coreFinalizeTests();
- corePrintMemoryReport();
- }
- int main(int argAmount, const char** args) {
- setlocale(LC_ALL, "en_US.utf8");
- bool light = false;
- for(int i = 0; i < argAmount; i++) {
- if(strcmp(args[i], "light") == 0) {
- light = true;
- } else if(strcmp(args[i], "alloc") == 0) {
- coreTestInvalidAllocate();
- } else if(strcmp(args[i], "realloc") == 0) {
- coreTestInvalidReallocate();
- } else if(strcmp(args[i], "pre_canary") == 0) {
- coreTestPreCanary();
- } else if(strcmp(args[i], "post_canary") == 0) {
- coreTestPostCanary();
- }
- }
- (void)light;
- /*
- Core::testArrayList(light);
- Core::testArrayString();
- Core::testArray();
- Core::testBitArray();
- Core::testBox();
- Core::testBuffer(light);
- Core::testBufferedValue();
- Core::testClock(light);
- Core::testColor();
- Core::testComponents();
- Core::testError();
- Core::testFileReader();
- Core::testFrustum();
- Core::testHashedString();
- Core::testHashMap(light);
- Core::testLinkedList(light);
- Core::testList(light);
- Core::testMath();
- Core::testMatrixStack(light);
- Core::testMatrix();
- Core::testNew();
- Core::testPlane();
- Core::testQuaternion();
- Core::testRandom(light);
- Core::testRingBuffer();
- Core::testStack(light);
- Core::testThread();
- Core::testUniquePointer();*/
- coreTestUtility();
- /*Core::testVector();
- Core::testView();*/
- coreLogLevel = CORE_LOG_WARNING;
- CORE_LOG_DEBUG("You won't see this!");
- coreLogLevel = CORE_LOG_DEBUG;
- unsigned int data = 123456789;
- coreSetExitHandler(onExit, &data);
- CORE_EXIT(1);
- return 0;
- }
|