Main.cpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #include "test/Test.h"
  2. #include "tests/ArrayListTests.h"
  3. #include "tests/ArrayStringTests.h"
  4. #include "tests/ArrayTests.h"
  5. #include "tests/BitArrayTests.h"
  6. #include "tests/BoxTests.h"
  7. #include "tests/BufferTests.h"
  8. #include "tests/BufferedValueTests.h"
  9. #include "tests/ClockTests.h"
  10. #include "tests/ColorTests.h"
  11. #include "tests/ComponentsTests.h"
  12. #include "tests/FrustumTests.h"
  13. #include "tests/HashMapTests.h"
  14. #include "tests/LinkedListTests.h"
  15. #include "tests/ListTests.h"
  16. #include "tests/MathTests.h"
  17. #include "tests/MatrixStackTests.h"
  18. #include "tests/MatrixTests.h"
  19. #include "tests/PlaneTests.h"
  20. #include "tests/QuaternionTests.h"
  21. #include "tests/RandomTests.h"
  22. #include "tests/RingBufferTests.h"
  23. #include "tests/StackTests.h"
  24. #include "tests/ThreadTests.h"
  25. #include "tests/UniquePointerTests.h"
  26. #include "tests/UtilityTests.h"
  27. #include "tests/VectorTests.h"
  28. #include "tests/ViewTests.h"
  29. #include "utils/ArrayString.h"
  30. #include "utils/Utility.h"
  31. static void onExit(int code, void* data) {
  32. unsigned int i = *static_cast<unsigned int*>(data);
  33. Core::ArrayString<1024> s;
  34. CORE_TEST_ERROR(s.append("Hello from exit #: #"));
  35. CORE_TEST_ERROR(s.format(code, i));
  36. CORE_TEST_ERROR(s.printLine());
  37. Core::Test::finalize();
  38. }
  39. int main() {
  40. Core::ArrayListTests::test();
  41. Core::ArrayStringTests::test();
  42. Core::ArrayTests::test();
  43. Core::BitArrayTests::test();
  44. Core::BoxTests::test();
  45. Core::BufferTests::test();
  46. Core::BufferedValueTests::test();
  47. Core::ClockTests::test();
  48. Core::ColorTests::test();
  49. Core::ComponentsTests::test();
  50. Core::FrustumTests::test();
  51. Core::HashMapTests::test();
  52. Core::LinkedListTests::test();
  53. Core::ListTests::test();
  54. Core::MathTests::test();
  55. Core::MatrixStackTests::test();
  56. Core::MatrixTests::test();
  57. Core::PlaneTests::test();
  58. Core::QuaternionTests::test();
  59. Core::RandomTests::test();
  60. Core::RingBufferTests::test();
  61. Core::StackTests::test();
  62. Core::ThreadTests::test();
  63. Core::UniquePointerTests::test();
  64. Core::UtilityTests::test();
  65. Core::VectorTests::test();
  66. Core::ViewTests::test();
  67. unsigned int data = 123456789;
  68. Core::setExitHandler(onExit, &data);
  69. CORE_EXIT(1);
  70. return 0;
  71. }