From 1ffbeaf85456db5449f4c137c112ca5d68cc656f Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Thu, 10 Feb 2022 17:25:18 +0100 Subject: [PATCH] Added GTEST define, removed hello-test --- CMakeLists.txt | 2 +- test/Quaternion_test.cc | 4 +++- test/Vector3_test.cc | 4 +++- test/hello_test.cc | 13 ------------- 4 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 test/hello_test.cc diff --git a/CMakeLists.txt b/CMakeLists.txt index 8998504..777d4cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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" ) diff --git a/test/Quaternion_test.cc b/test/Quaternion_test.cc index f7de62c..84cefcf 100644 --- a/test/Quaternion_test.cc +++ b/test/Quaternion_test.cc @@ -1,3 +1,4 @@ +#if GTEST #include #include #include @@ -184,4 +185,5 @@ TEST(Quaternion, GetSwingTwist) { } TEST(Quaternion, Dot) { -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/test/Vector3_test.cc b/test/Vector3_test.cc index 0a42c57..a0d7135 100644 --- a/test/Vector3_test.cc +++ b/test/Vector3_test.cc @@ -1,3 +1,4 @@ +#if GTEST #include #include #include @@ -527,4 +528,5 @@ TEST(Vector3, SignedAngle) { TEST(Vector3, DISABLED_Lerp) { -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/test/hello_test.cc b/test/hello_test.cc deleted file mode 100644 index 6046370..0000000 --- a/test/hello_test.cc +++ /dev/null @@ -1,13 +0,0 @@ -#include - -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); - } - -} \ No newline at end of file