Main.cpp 1.0 KB

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