mirror of
https://github.com/thunderbrewhq/typhoon.git
synced 2025-12-12 02:22:30 +00:00
feat(vector): add C2Vector::operator== for C2Vector
This commit is contained in:
parent
285073dc24
commit
bd159b5369
3 changed files with 22 additions and 0 deletions
|
|
@ -15,6 +15,22 @@ TEST_CASE("C2Vector", "[vector]") {
|
|||
}
|
||||
}
|
||||
|
||||
TEST_CASE("C2Vector::operator==", "[vector]") {
|
||||
SECTION("returns true when compared to identical vector") {
|
||||
auto vector1 = C2Vector(1.0f, 2.0f);
|
||||
auto vector2 = C2Vector(1.0f, 2.0f);
|
||||
auto identical = vector1 == vector2;
|
||||
REQUIRE(identical);
|
||||
}
|
||||
|
||||
SECTION("returns false when compared to different vector") {
|
||||
auto vector1 = C2Vector(2.0f, 1.0f);
|
||||
auto vector2 = C2Vector(1.0f, 2.0f);
|
||||
auto identical = vector1 == vector2;
|
||||
REQUIRE(!identical);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("C3Vector", "[vector]") {
|
||||
SECTION("constructs with default constructor") {
|
||||
C3Vector vector;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue