mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-11-30 17:19:27 +00:00
25 lines
523 B
C++
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);
|
|
}
|
|
}
|