Main.cpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #include <locale.h>
  2. #include <string.h>
  3. #include "../src/ErrorSimulator.hpp"
  4. #include "Test.hpp"
  5. #include "Tests.hpp"
  6. #include "core/utils/ArrayString.hpp"
  7. #include "core/utils/Utility.hpp"
  8. static void onExit(int code, void* data) {
  9. unsigned int i = *static_cast<unsigned int*>(data);
  10. Core::ArrayString<1024> s;
  11. s.append("Hello from exit #: #");
  12. s.format(code, i);
  13. s.printLine();
  14. Core::print('A');
  15. Core::Test::finalize();
  16. }
  17. int main(int argAmount, const char** args) {
  18. setlocale(LC_ALL, "en_US.utf8");
  19. bool light = false;
  20. for(int i = 0; i < argAmount; i++) {
  21. if(strcmp(args[i], "light") == 0) {
  22. light = true;
  23. }
  24. }
  25. Core::testArrayList(light);
  26. Core::testArrayString();
  27. Core::testArray();
  28. Core::testBitArray();
  29. Core::testBox();
  30. Core::testBuffer(light);
  31. Core::testBufferedValue();
  32. Core::testClock(light);
  33. Core::testColor();
  34. Core::testComponents();
  35. Core::testError();
  36. Core::testFileReader();
  37. Core::testFrustum();
  38. Core::testHashedString();
  39. Core::testHashMap(light);
  40. Core::testLinkedList(light);
  41. Core::testList(light);
  42. Core::testMath();
  43. Core::testMatrixStack(light);
  44. Core::testMatrix();
  45. Core::testNew();
  46. Core::testPlane();
  47. Core::testQuaternion();
  48. Core::testRandom(light);
  49. Core::testRingBuffer();
  50. Core::testStack(light);
  51. Core::testThread();
  52. Core::testUniquePointer();
  53. Core::testUtility();
  54. Core::testVector();
  55. Core::testView();
  56. Core::Logger::level = Core::Logger::Level::WARNING;
  57. CORE_LOG_DEBUG("You won't see this!");
  58. Core::Logger::level = Core::Logger::Level::DEBUG;
  59. unsigned int data = 123456789;
  60. Core::setExitHandler(onExit, &data);
  61. CORE_EXIT(1);
  62. return 0;
  63. }