Main.cpp 1.1 KB

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