Main.cpp 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. #include "utils/Logger.h"
  30. int main(int argAmount, char** args) {
  31. if(argAmount < 2) {
  32. std::cout << "missing path to images\n";
  33. return 0;
  34. }
  35. ArrayTests::test();
  36. ArrayListTests::test();
  37. HashMapTests::test();
  38. ListTests::test();
  39. BitArrayTests::test();
  40. StringBufferTests::test();
  41. RandomTests::test();
  42. RingBufferTests::test();
  43. SplitStringTests::test();
  44. VectorTests::test();
  45. MatrixTests::test();
  46. StackTests::test();
  47. MatrixStackTests::test();
  48. PlaneTests::test();
  49. FrustumTests::test();
  50. QuaternionTests::test();
  51. UtilsTests::test();
  52. ColorTests::test();
  53. ClockTests::test();
  54. PNGReaderTests::test(args[1]);
  55. BufferTests::test();
  56. TypedBufferTests::test();
  57. UniquePointerTests::test();
  58. NetworkTests::test();
  59. struct Game {
  60. bool isRunning() {
  61. return true;
  62. }
  63. void tick() {
  64. }
  65. void render(float) {
  66. }
  67. };
  68. TextInput* input = nullptr;
  69. Size size(800, 480);
  70. WindowOptions options(4, 3, size, false, "Test");
  71. Window w(input, options);
  72. if(w.getError().has()) {
  73. std::cout << w.getError().message << "\n";
  74. return 0;
  75. }
  76. Game game;
  77. w.run(game, 10'000'000);
  78. LOG_ERROR("HI");
  79. LOG_ERROR(StringBuffer<50>(" dfgdf hi"));
  80. LOG_WARNING("HI");
  81. LOG_WARNING(StringBuffer<50>(" dfgdf hi"));
  82. LOG_INFO("HI");
  83. LOG_INFO(StringBuffer<50>(" dfgdf hi"));
  84. LOG_DEBUG("HI");
  85. LOG_DEBUG(StringBuffer<50>(" dfgdf hi"));
  86. return 0;
  87. }