123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- #include "math/Vector.h"
- #include "rendering/Framebuffer.h"
- #include "rendering/GL.h"
- #include "rendering/Window.h"
- #include "tests/ArrayListTests.h"
- #include "tests/ArrayTests.h"
- #include "tests/BitArrayTests.h"
- #include "tests/BufferTests.h"
- #include "tests/ClockTests.h"
- #include "tests/ColorTests.h"
- #include "tests/ComponentsTests.h"
- #include "tests/FrustumTests.h"
- #include "tests/HashMapTests.h"
- #include "tests/ImageReaderTests.h"
- #include "tests/ListTests.h"
- #include "tests/MathTests.h"
- #include "tests/MatrixStackTests.h"
- #include "tests/MatrixTests.h"
- #include "tests/NetworkTests.h"
- #include "tests/PlaneTests.h"
- #include "tests/QuaternionTests.h"
- #include "tests/RandomTests.h"
- #include "tests/RingBufferTests.h"
- #include "tests/SplitStringTests.h"
- #include "tests/StackTests.h"
- #include "tests/StringBufferTests.h"
- #include "tests/TypedBufferTests.h"
- #include "tests/UniquePointerTests.h"
- #include "tests/VectorTests.h"
- #include "utils/Logger.h"
- static int ticks = 40;
- static bool isRunning() {
- return !Window::shouldClose() && ticks > 0;
- }
- static void tick() {
- ticks -= ticks > 0;
- }
- static void render(float) {
- }
- int main(int argAmount, char** args) {
- if(argAmount < 2) {
- LOG_ERROR("missing path to images");
- return 0;
- }
- ArrayTests::test();
- ArrayListTests::test();
- HashMapTests::test();
- ListTests::test();
- BitArrayTests::test();
- StringBufferTests::test();
- RandomTests::test();
- RingBufferTests::test();
- SplitStringTests::test();
- VectorTests::test();
- MatrixTests::test();
- StackTests::test();
- MatrixStackTests::test();
- PlaneTests::test();
- FrustumTests::test();
- QuaternionTests::test();
- MathTests::test();
- ColorTests::test();
- ClockTests::test();
- ImageReaderTests::test(args[1]);
- BufferTests::test();
- TypedBufferTests::test();
- UniquePointerTests::test();
- NetworkTests::test();
- ComponentsTests::test();
- Window::Options options(4, 3, {800, 480}, false, "Test");
- Error error = Window::open(options);
- if(error.has()) {
- LOG_ERROR(error.message);
- return 0;
- }
- Window::show();
- Window::run<isRunning, tick, render>(50'000'000);
- Window::close();
- GL::printError("WUSI");
- return 0;
- }
|