Main.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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/ComponentsTests.h"
  8. #include "tests/HashMapTests.h"
  9. #include "tests/LinkedListTests.h"
  10. #include "tests/ListTests.h"
  11. #include "tests/MathTests.h"
  12. #include "tests/RingBufferTests.h"
  13. #include "tests/StackTests.h"
  14. #include "tests/UniquePointerTests.h"
  15. #include "tests/UtilityTests.h"
  16. #include "utils/Utility.h"
  17. static void onExit(int code, void* data) {
  18. unsigned int i = *static_cast<unsigned int*>(data);
  19. printf("Hello from exit %d: 0x%x\n", code, i);
  20. }
  21. int main() {
  22. Core::ArrayListTests::test();
  23. Core::ArrayStringTests::test();
  24. Core::ArrayTests::test();
  25. Core::BitArrayTests::test();
  26. Core::ComponentsTests::test();
  27. Core::HashMapTests::test();
  28. Core::LinkedListTests::test();
  29. Core::ListTests::test();
  30. Core::MathTests::test();
  31. Core::RingBufferTests::test();
  32. Core::StackTests::test();
  33. Core::UniquePointerTests::test();
  34. Core::UtilityTests::test();
  35. Core::Test::finalize();
  36. unsigned int data = 0x1234;
  37. Core::setExitHandler(onExit, &data);
  38. Core::exitWithHandler(0);
  39. return 0;
  40. }