1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- #include <locale.h>
- #include <string.h>
- // #include "../src/ErrorSimulator.hpp"
- #include "Test.h"
- #include "Tests.h"
- #include "core/utils/Logger.h"
- // #include "core/utils/ArrayString.hpp"
- // #include "core/utils/Utility.hpp"
- /*static void onExit(int code, void* data) {
- unsigned int i = *static_cast<unsigned int*>(data);
- Core::ArrayString<1024> s;
- s.append("Hello from exit #: #");
- s.format(code, i);
- s.printLine();
- Core::print('A');
- Core::Test::finalize();
- }*/
- 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;
- }
- }
- (void)light;
- CORE_TEST_INT(20, 30);
- CORE_TEST_INT(20, 20);
- CORE_TEST_INT(20, 40);
- CORE_TEST_INT(20, 50);
- CORE_TEST_BOOL(true, false);
- CORE_TEST_TRUE(true);
- CORE_TEST_FALSE(false);
- CORE_TEST_TRUE(false);
- CORE_TEST_NULL(nullptr);
- CORE_TEST_NOT_NULL(nullptr);
- CORE_TEST_FLOAT(0, 3, 1);
- CORE_TEST_STRING("wusi", "GUSI");
- CORE_TEST_STRING("wusi", "wusi");
- Test_finalize();
- CORE_LOG_DEBUG("This is a test %d", 6);
- CORE_LOG_INFO("This is a test");
- CORE_LOG_WARNING("This is a test");
- CORE_LOG_ERROR("This is a test");
- /*
- 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();
- Core::testUtility();
- Core::testVector();
- Core::testView();*/
- logLevel = LOG_LEVEL_WARNING;
- CORE_LOG_DEBUG("You won't see this!");
- logLevel = LOG_LEVEL_DEBUG;
- // unsigned int data = 123456789;
- // Core::setExitHandler(onExit, &data);
- // CORE_EXIT(1);
- return 0;
- }
|