mirror of
https://github.com/thunderbrewhq/typhoon.git
synced 2025-12-12 02:22:30 +00:00
20 lines
561 B
C++
20 lines
561 B
C++
#include "tempest/Rect.hpp"
|
|
#include "test/Test.hpp"
|
|
|
|
TEST_CASE("CRect", "[rect]") {
|
|
SECTION("constructs with default constructor") {
|
|
CRect rect;
|
|
CHECK(rect.minY == 0.0f);
|
|
CHECK(rect.minX == 0.0f);
|
|
CHECK(rect.maxY == 0.0f);
|
|
CHECK(rect.maxX == 0.0f);
|
|
}
|
|
|
|
SECTION("constructs with minY minX maxY maxX constructor") {
|
|
auto rect = CRect(1.0f, 2.0f, 3.0f, 4.0f);
|
|
CHECK(rect.minY == 1.0f);
|
|
CHECK(rect.minX == 2.0f);
|
|
CHECK(rect.maxY == 3.0f);
|
|
CHECK(rect.maxX == 4.0f);
|
|
}
|
|
}
|