123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- #include <stdio.h>
- #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/BufferedValueTests.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/RingBufferTests.h"
- #include "tests/StackTests.h"
- #include "tests/UniquePointerTests.h"
- #include "tests/UtilityTests.h"
- #include "tests/VectorTests.h"
- #include "tests/ViewTests.h"
- #include "utils/Utility.h"
- static void onExit(int code, void* data) {
- unsigned int i = *static_cast<unsigned int*>(data);
- printf("Hello from exit %d: 0x%x\n", code, i);
- }
- static void onError(const char* file, int line, Core::Error e, void* data) {
- if(e == Core::Error::CAPACITY_REACHED ||
- e == Core::Error::INVALID_REMOVE_INDEX) {
- return;
- }
- (void)data;
- CORE_LOG_ERROR("Error in #:# - #", file, line, static_cast<int>(e));
- }
- int main() {
- Core::setErrorHandler(onError, nullptr);
- Core::ArrayListTests::test();
- Core::ArrayStringTests::test();
- Core::ArrayTests::test();
- Core::BitArrayTests::test();
- Core::BoxTests::test();
- Core::BufferedValueTests::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::RingBufferTests::test();
- Core::StackTests::test();
- Core::UniquePointerTests::test();
- Core::UtilityTests::test();
- Core::VectorTests::test();
- Core::ViewTests::test();
- Core::Test::finalize();
- unsigned int data = 0x1234;
- Core::setExitHandler(onExit, &data);
- CORE_EXIT(0);
- return 0;
- }
|