mirror of
https://github.com/thunderbrewhq/typhoon.git
synced 2025-12-12 02:22:30 +00:00
feat(rect): add CRect
This commit is contained in:
parent
ae7654ea64
commit
0623492fe6
5 changed files with 81 additions and 0 deletions
20
test/Rect.cpp
Normal file
20
test/Rect.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue