Main.cpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #include <stdio.h>
  2. #include "test/Test.h"
  3. #include "tests/ArrayListTests.h"
  4. #include "tests/ArrayStringTests.h"
  5. #include "tests/ArrayTests.h"
  6. #include "tests/BitArrayTests.h"
  7. #include "tests/BoxTests.h"
  8. #include "tests/ComponentsTests.h"
  9. #include "tests/HashMapTests.h"
  10. #include "tests/LinkedListTests.h"
  11. #include "tests/ListTests.h"
  12. #include "tests/MathTests.h"
  13. #include "tests/MatrixTests.h"
  14. #include "tests/QuaternionTests.h"
  15. #include "tests/RingBufferTests.h"
  16. #include "tests/StackTests.h"
  17. #include "tests/UniquePointerTests.h"
  18. #include "tests/UtilityTests.h"
  19. #include "tests/VectorTests.h"
  20. #include "utils/Utility.h"
  21. static void onExit(int code, void* data) {
  22. unsigned int i = *static_cast<unsigned int*>(data);
  23. printf("Hello from exit %d: 0x%x\n", code, i);
  24. }
  25. int main() {
  26. Core::ArrayListTests::test();
  27. Core::ArrayStringTests::test();
  28. Core::ArrayTests::test();
  29. Core::BitArrayTests::test();
  30. Core::BoxTests::test();
  31. Core::ComponentsTests::test();
  32. Core::HashMapTests::test();
  33. Core::LinkedListTests::test();
  34. Core::ListTests::test();
  35. Core::MathTests::test();
  36. Core::MatrixTests::test();
  37. Core::QuaternionTests::test();
  38. Core::RingBufferTests::test();
  39. Core::StackTests::test();
  40. Core::UniquePointerTests::test();
  41. Core::UtilityTests::test();
  42. Core::VectorTests::test();
  43. Core::Test::finalize();
  44. unsigned int data = 0x1234;
  45. Core::setExitHandler(onExit, &data);
  46. CORE_EXIT(0);
  47. return 0;
  48. }