LinearAlgebra-cpp/test/hello_test.cc
2022-01-24 11:50:34 +01:00

23 lines
550 B
C++

#include <gtest/gtest.h>
#include "Vector3.h"
// Demonstrate some basic assertions
TEST(HelloTest, BasicAssertions) {
// Expect two strings not to be equal.
EXPECT_STRNE("hello", "world");
// Expect equality.
EXPECT_EQ(7 * 6, 42);
}
TEST(VectorNormalize, BasicAssertions) {
Vector3 v = Vector3(0, 2, 0);
Vector3 normalizedV = v.normalized();
bool r = normalizedV == Vector3(0, 1, 0);
ASSERT_EQ(r, true);
}
int main(int argc, char **argv) {
:: testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}