Files
raylib-cpp/tests/raylib_test.cpp
2019-08-10 16:55:34 -04:00

25 lines
523 B
C++

#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include <string>
#include <raylib.h>
#include "raylib/raylib.hpp"
#include "catch.hpp"
TEST_CASE("raylib_test", "[raylib_test]" ) {
SECTION("Vector2") {
raylib::Vector2 vec(50, 100);
CHECK(vec.getX() == vec.x);
}
SECTION("Window") {
CHECK(raylib::Window::IsReady() == false);
}
SECTION("Color") {
raylib::Color c(RED);
CHECK(c.ToInt() == ColorToInt(RED));
c = RAYWHITE;
CHECK(c.r == RAYWHITE.r);
}
}