feat(vector): add C2Vector constructors

This commit is contained in:
fallenoak 2020-11-26 12:46:16 -06:00
parent 0ebe6450a0
commit 51ccc49265
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
2 changed files with 20 additions and 0 deletions

View file

@ -1,6 +1,20 @@
#include "tempest/Vector.hpp"
#include "test/Test.hpp"
TEST_CASE("C2Vector", "[vector]") {
SECTION("constructs with default constructor") {
C2Vector vector;
REQUIRE(vector.x == 0.0f);
REQUIRE(vector.y == 0.0f);
}
SECTION("constructs with xy constructor") {
auto vector = C2Vector(1.0f, 2.0f);
REQUIRE(vector.x == 1.0f);
REQUIRE(vector.y == 2.0f);
}
}
TEST_CASE("C3Vector", "[vector]") {
SECTION("constructs with default constructor") {
C3Vector vector;