#include "test/Test.h" #include "tests/ArrayListTests.h" #include "tests/ArrayStringTests.h" #include "tests/ArrayTests.h" #include "tests/BitArrayTests.h" #include "tests/BoxTests.h" #include "tests/BufferTests.h" #include "tests/BufferedValueTests.h" #include "tests/ClockTests.h" #include "tests/ColorTests.h" #include "tests/ComponentsTests.h" #include "tests/FrustumTests.h" #include "tests/HashMapTests.h" #include "tests/LinkedListTests.h" #include "tests/ListTests.h" #include "tests/MathTests.h" #include "tests/MatrixStackTests.h" #include "tests/MatrixTests.h" #include "tests/PlaneTests.h" #include "tests/QuaternionTests.h" #include "tests/RandomTests.h" #include "tests/RingBufferTests.h" #include "tests/StackTests.h" #include "tests/UniquePointerTests.h" #include "tests/UtilityTests.h" #include "tests/VectorTests.h" #include "tests/ViewTests.h" #include "utils/ArrayString.h" #include "utils/Utility.h" static void onExit(int code, void* data) { unsigned int i = *static_cast(data); Core::ArrayString<1024> s; CORE_TEST_FALSE(s.append("Hello from exit #: #")); CORE_TEST_FALSE(s.format(code, i)); CORE_TEST_FALSE(s.printLine()); Core::Test::finalize(); } static void onError(const char* file, int line, Core::Error e, void*) { if(e == Core::Error::CAPACITY_REACHED || e == Core::Error::INVALID_REMOVE_INDEX) { return; } CORE_LOG_ERROR("Error in #:# - #", file, line, static_cast(e)); } int main() { Core::setErrorHandler(onError, nullptr); Core::ArrayListTests::test(); Core::ArrayStringTests::test(); Core::ArrayTests::test(); Core::BitArrayTests::test(); Core::BoxTests::test(); Core::BufferTests::test(); Core::BufferedValueTests::test(); Core::ClockTests::test(); Core::ColorTests::test(); Core::ComponentsTests::test(); Core::FrustumTests::test(); Core::HashMapTests::test(); Core::LinkedListTests::test(); Core::ListTests::test(); Core::MathTests::test(); Core::MatrixStackTests::test(); Core::MatrixTests::test(); Core::PlaneTests::test(); Core::QuaternionTests::test(); Core::RandomTests::test(); Core::RingBufferTests::test(); Core::StackTests::test(); Core::UniquePointerTests::test(); Core::UtilityTests::test(); Core::VectorTests::test(); Core::ViewTests::test(); unsigned int data = 123456789; Core::setExitHandler(onExit, &data); CORE_EXIT(1); return 0; }