Main.cpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #include <iostream>
  2. #include "rendering/FileTexture.h"
  3. #include "rendering/Framebuffer.h"
  4. #include "rendering/Window.h"
  5. #include "tests/ArrayListTests.h"
  6. #include "tests/ArrayTests.h"
  7. #include "tests/BitArrayTests.h"
  8. #include "tests/BufferTests.h"
  9. #include "tests/ClockTests.h"
  10. #include "tests/ColorTests.h"
  11. #include "tests/FrustumTests.h"
  12. #include "tests/HashMapTests.h"
  13. #include "tests/ListTests.h"
  14. #include "tests/MatrixStackTests.h"
  15. #include "tests/MatrixTests.h"
  16. #include "tests/NetworkTests.h"
  17. #include "tests/PNGReaderTests.h"
  18. #include "tests/PlaneTests.h"
  19. #include "tests/QuaternionTests.h"
  20. #include "tests/RandomTests.h"
  21. #include "tests/RingBufferTests.h"
  22. #include "tests/SplitStringTests.h"
  23. #include "tests/StackTests.h"
  24. #include "tests/StringBufferTests.h"
  25. #include "tests/TypedBufferTests.h"
  26. #include "tests/UniquePointerTests.h"
  27. #include "tests/UtilsTests.h"
  28. #include "tests/VectorTests.h"
  29. int main(int argAmount, char** args) {
  30. if(argAmount < 2) {
  31. std::cout << "missing path to images\n";
  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. TextInput* input = nullptr;
  68. Size size(800, 480);
  69. WindowOptions options(4, 3, size, false, "Test");
  70. Window w(input, options);
  71. if(w.getError().has()) {
  72. std::cout << w.getError().message << "\n";
  73. return 0;
  74. }
  75. Game game;
  76. w.run(game, 10'000'000);
  77. return 0;
  78. }