Main.cpp 991 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #include <stdio.h>
  2. #include "tests/ArrayListTests.h"
  3. #include "tests/ArrayStringTests.h"
  4. #include "tests/ArrayTests.h"
  5. #include "tests/BitArrayTests.h"
  6. #include "tests/HashMapTests.h"
  7. #include "tests/LinkedListTests.h"
  8. #include "tests/ListTests.h"
  9. #include "tests/MathTests.h"
  10. #include "tests/UniquePointerTests.h"
  11. #include "tests/UtilityTests.h"
  12. #include "utils/Utility.h"
  13. static void onExit(int code, void* data) {
  14. unsigned int i = *static_cast<unsigned int*>(data);
  15. printf("Hello from exit %d: 0x%x\n", code, i);
  16. }
  17. int main() {
  18. Core::ArrayListTests::test();
  19. Core::ArrayStringTests::test();
  20. Core::ArrayTests::test();
  21. Core::BitArrayTests::test();
  22. Core::HashMapTests::test();
  23. Core::LinkedListTests::test();
  24. Core::ListTests::test();
  25. Core::MathTests::test();
  26. Core::UniquePointerTests::test();
  27. Core::UtilityTests::test();
  28. unsigned int data = 0x1234;
  29. Core::setExitHandler(onExit, &data);
  30. Core::exitWithHandler(0);
  31. return 0;
  32. }