Main.cpp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #include "ecs/Components.h"
  2. #include "math/Vector.h"
  3. #include "rendering/Window.h"
  4. #include "tests/ArrayListTests.h"
  5. #include "tests/ArrayTests.h"
  6. #include "tests/BitArrayTests.h"
  7. #include "tests/BufferTests.h"
  8. #include "tests/ClockTests.h"
  9. #include "tests/ColorTests.h"
  10. #include "tests/FrustumTests.h"
  11. #include "tests/HashMapTests.h"
  12. #include "tests/ListTests.h"
  13. #include "tests/MatrixStackTests.h"
  14. #include "tests/MatrixTests.h"
  15. #include "tests/NetworkTests.h"
  16. #include "tests/PNGReaderTests.h"
  17. #include "tests/PlaneTests.h"
  18. #include "tests/QuaternionTests.h"
  19. #include "tests/RandomTests.h"
  20. #include "tests/RingBufferTests.h"
  21. #include "tests/SplitStringTests.h"
  22. #include "tests/StackTests.h"
  23. #include "tests/StringBufferTests.h"
  24. #include "tests/TypedBufferTests.h"
  25. #include "tests/UniquePointerTests.h"
  26. #include "tests/UtilsTests.h"
  27. #include "tests/VectorTests.h"
  28. #include "utils/Logger.h"
  29. int main(int argAmount, char** args) {
  30. if(argAmount < 2) {
  31. LOG_ERROR("missing path to images");
  32. return 0;
  33. }
  34. ArrayTests::test();
  35. ArrayListTests::test();
  36. HashMapTests::test();
  37. ListTests::test();
  38. BitArrayTests::test();
  39. StringBufferTests::test();
  40. RandomTests::test();
  41. RingBufferTests::test();
  42. SplitStringTests::test();
  43. VectorTests::test();
  44. MatrixTests::test();
  45. StackTests::test();
  46. MatrixStackTests::test();
  47. PlaneTests::test();
  48. FrustumTests::test();
  49. QuaternionTests::test();
  50. UtilsTests::test();
  51. ColorTests::test();
  52. ClockTests::test();
  53. PNGReaderTests::test(args[1]);
  54. BufferTests::test();
  55. TypedBufferTests::test();
  56. UniquePointerTests::test();
  57. NetworkTests::test();
  58. struct Game {
  59. bool isRunning() {
  60. return true;
  61. }
  62. void tick() {
  63. }
  64. void render(float) {
  65. }
  66. };
  67. WindowOptions options(4, 3, {800, 480}, false, "Test");
  68. Window w;
  69. Error error = w.open(options);
  70. if(error.has()) {
  71. LOG_ERROR(error.message);
  72. return 0;
  73. }
  74. Game game;
  75. w.run(game, 10'000'000);
  76. return 0;
  77. }