Added GTEST define, removed hello-test

This commit is contained in:
Pascal Serrarens 2022-02-10 17:25:18 +01:00
parent 8601756f7e
commit 1ffbeaf854
4 changed files with 7 additions and 16 deletions

View File

@ -4,6 +4,7 @@ project(VectorAlgebra) # Create project "simple_example"
set(CMAKE_CXX_STANDARD 11) # Enable c++11 standard
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_compile_definitions(GTEST)
include(FetchContent)
FetchContent_Declare(
googletest
@ -20,7 +21,6 @@ enable_testing()
add_executable(
VectorAlgebraTest
#"test/hello_test.cc"
"test/Vector3_test.cc"
"test/Quaternion_test.cc"
)

View File

@ -1,3 +1,4 @@
#if GTEST
#include <gtest/gtest.h>
#include <math.h>
#include <limits>
@ -184,4 +185,5 @@ TEST(Quaternion, GetSwingTwist) {
}
TEST(Quaternion, Dot) {
}
}
#endif

View File

@ -1,3 +1,4 @@
#if GTEST
#include <gtest/gtest.h>
#include <math.h>
#include <limits>
@ -527,4 +528,5 @@ TEST(Vector3, SignedAngle) {
TEST(Vector3, DISABLED_Lerp) {
}
}
#endif

View File

@ -1,13 +0,0 @@
#include <gtest/gtest.h>
namespace Passer {
// Demonstrate some basic assertions
TEST(DummyTest, BasicAssertions) {
// Expect two strings not to be equal.
EXPECT_STRNE("hello", "world");
// Expect equality.
EXPECT_EQ(7 * 6, 42);
}
}