mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-12-02 17:34:03 +00:00
Adopt cpplint
This commit is contained in:
@@ -4,35 +4,35 @@
|
||||
#include "catch.hpp"
|
||||
|
||||
TEST_CASE("raylib_test", "[raylib_test]" ) {
|
||||
SECTION("Vector2") {
|
||||
raylib::Vector2 position(50, 100);
|
||||
REQUIRE(position.GetX() == position.x);
|
||||
position.x = 150;
|
||||
REQUIRE(position.GetX() == 150);
|
||||
SECTION("Vector2") {
|
||||
raylib::Vector2 position(50, 100);
|
||||
REQUIRE(position.GetX() == position.x);
|
||||
position.x = 150;
|
||||
REQUIRE(position.GetX() == 150);
|
||||
|
||||
// Addition operator.
|
||||
raylib::Vector2 speed(10, 10);
|
||||
position += speed;
|
||||
REQUIRE(position.x == 160);
|
||||
}
|
||||
// Addition operator.
|
||||
raylib::Vector2 speed(10, 10);
|
||||
position += speed;
|
||||
REQUIRE(position.x == 160);
|
||||
}
|
||||
|
||||
SECTION("Window") {
|
||||
REQUIRE(raylib::Window::IsReady() == false);
|
||||
}
|
||||
SECTION("Window") {
|
||||
REQUIRE(raylib::Window::IsReady() == false);
|
||||
}
|
||||
|
||||
SECTION("Color") {
|
||||
raylib::Color c(RED);
|
||||
REQUIRE(c.ToInt() == ::ColorToInt(RED));
|
||||
SECTION("Color") {
|
||||
raylib::Color c(RED);
|
||||
REQUIRE(c.ToInt() == ::ColorToInt(RED));
|
||||
|
||||
c = RAYWHITE;
|
||||
REQUIRE(c.r == RAYWHITE.r);
|
||||
c = RAYWHITE;
|
||||
REQUIRE(c.r == RAYWHITE.r);
|
||||
|
||||
REQUIRE(raylib::Color::LightGray.r == LIGHTGRAY.r);
|
||||
}
|
||||
REQUIRE(raylib::Color::LightGray.r == LIGHTGRAY.r);
|
||||
}
|
||||
|
||||
SECTION("RayMath") {
|
||||
raylib::Vector2 direction(50, 50);
|
||||
raylib::Vector2 newDirection = direction.Rotate(30);
|
||||
REQUIRE((int)newDirection.x == 18);
|
||||
}
|
||||
SECTION("RayMath") {
|
||||
raylib::Vector2 direction(50, 50);
|
||||
raylib::Vector2 newDirection = direction.Rotate(30);
|
||||
REQUIRE((int)newDirection.x == 18);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user