From 4ac63786a94f54e9f343b6db28d2a707e16a5161 Mon Sep 17 00:00:00 2001
From: sreekanth-arikatla <sreekanth.arikatla@kitware.com>
Date: Wed, 4 Aug 2021 10:57:58 -0400
Subject: [PATCH] STYLE: Clean up CD tests of unnecessary gtest init

---
 .../imstkBidirectionalPlaneToSphereCDTest.cpp        | 12 +-----------
 .../Testing/imstkMeshToMeshBruteForceCDTest.cpp      | 12 +-----------
 .../Testing/imstkPointSetToOrientedBoxCDTest.cpp     | 12 +-----------
 .../Testing/imstkPointSetToPlaneCDTest.cpp           | 12 +-----------
 .../Testing/imstkSphereToCylinderCDTest.cpp          | 12 +-----------
 .../Testing/imstkSphereToSphereCDTest.cpp            | 10 ----------
 .../Testing/imstkTetraToLineMeshCDTest.cpp           | 12 +-----------
 .../Testing/imstkTetraToPointSetCDTest.cpp           | 12 +-----------
 .../imstkUnidirectionalPlaneToSphereCDTest.cpp       | 10 ----------
 9 files changed, 7 insertions(+), 97 deletions(-)

diff --git a/Source/CollisionDetection/Testing/imstkBidirectionalPlaneToSphereCDTest.cpp b/Source/CollisionDetection/Testing/imstkBidirectionalPlaneToSphereCDTest.cpp
index 5ef51180b..3896e9d6b 100644
--- a/Source/CollisionDetection/Testing/imstkBidirectionalPlaneToSphereCDTest.cpp
+++ b/Source/CollisionDetection/Testing/imstkBidirectionalPlaneToSphereCDTest.cpp
@@ -114,14 +114,4 @@ TEST(imstkBidirectionalPlaneToSphereCDTest, NonIntersectionTestAB)
     // Should be no elements
     EXPECT_EQ(0, colData->elementsA.getSize());
     EXPECT_EQ(0, colData->elementsB.getSize());
-}
-
-int
-imstkBidirectionalPlaneToSphereCDTest(int argc, char* argv[])
-{
-    // Init Google Test & Mock
-    ::testing::InitGoogleTest(&argc, argv);
-
-    // Run tests with gtest
-    return RUN_ALL_TESTS();
-}
+}
\ No newline at end of file
diff --git a/Source/CollisionDetection/Testing/imstkMeshToMeshBruteForceCDTest.cpp b/Source/CollisionDetection/Testing/imstkMeshToMeshBruteForceCDTest.cpp
index e32bda6ec..c940e937f 100644
--- a/Source/CollisionDetection/Testing/imstkMeshToMeshBruteForceCDTest.cpp
+++ b/Source/CollisionDetection/Testing/imstkMeshToMeshBruteForceCDTest.cpp
@@ -197,14 +197,4 @@ TEST(imstkMeshToMeshBruteForceCDTest, IntersectionTestAB_VertexToEdge)
 
     EXPECT_EQ(colData->elementsA[0].m_element.m_CellIndexElement.idCount, 2);
     EXPECT_EQ(colData->elementsB[0].m_element.m_CellIndexElement.idCount, 1);
-}
-
-int
-imstkMeshToMeshBruteForceCDTest(int argc, char* argv[])
-{
-    // Init Google Test & Mock
-    ::testing::InitGoogleTest(&argc, argv);
-
-    // Run tests with gtest
-    return RUN_ALL_TESTS();
-}
+}
\ No newline at end of file
diff --git a/Source/CollisionDetection/Testing/imstkPointSetToOrientedBoxCDTest.cpp b/Source/CollisionDetection/Testing/imstkPointSetToOrientedBoxCDTest.cpp
index 02670a079..7e49612a7 100644
--- a/Source/CollisionDetection/Testing/imstkPointSetToOrientedBoxCDTest.cpp
+++ b/Source/CollisionDetection/Testing/imstkPointSetToOrientedBoxCDTest.cpp
@@ -86,14 +86,4 @@ TEST(imstkPointSetToOrientedBoxCDTest, NonIntersectionTestAB)
     // Should be one element on side A, 0 on side B (default CD data is not generated for the sphere)
     EXPECT_EQ(0, colData->elementsA.getSize());
     EXPECT_EQ(0, colData->elementsB.getSize());
-}
-
-int
-imstkPointSetToOrientedBoxCDTest(int argc, char* argv[])
-{
-    // Init Google Test & Mock
-    ::testing::InitGoogleTest(&argc, argv);
-
-    // Run tests with gtest
-    return RUN_ALL_TESTS();
-}
+}
\ No newline at end of file
diff --git a/Source/CollisionDetection/Testing/imstkPointSetToPlaneCDTest.cpp b/Source/CollisionDetection/Testing/imstkPointSetToPlaneCDTest.cpp
index a258c6fef..e91758d20 100644
--- a/Source/CollisionDetection/Testing/imstkPointSetToPlaneCDTest.cpp
+++ b/Source/CollisionDetection/Testing/imstkPointSetToPlaneCDTest.cpp
@@ -86,14 +86,4 @@ TEST(imstkPointSetToPlaneCDTest, NonIntersectionTestAB)
     // Should be no elements
     EXPECT_EQ(0, colData->elementsA.getSize());
     EXPECT_EQ(0, colData->elementsB.getSize());
-}
-
-int
-imstkPointSetToPlaneCDTest(int argc, char* argv[])
-{
-    // Init Google Test & Mock
-    ::testing::InitGoogleTest(&argc, argv);
-
-    // Run tests with gtest
-    return RUN_ALL_TESTS();
-}
+}
\ No newline at end of file
diff --git a/Source/CollisionDetection/Testing/imstkSphereToCylinderCDTest.cpp b/Source/CollisionDetection/Testing/imstkSphereToCylinderCDTest.cpp
index 3ddb613d1..06bdd4e8e 100644
--- a/Source/CollisionDetection/Testing/imstkSphereToCylinderCDTest.cpp
+++ b/Source/CollisionDetection/Testing/imstkSphereToCylinderCDTest.cpp
@@ -77,14 +77,4 @@ TEST(imstkSphereToCylinderCDTest, NonIntersectionTestAB)
     // Should be no elements
     EXPECT_EQ(0, colData->elementsA.getSize());
     EXPECT_EQ(0, colData->elementsB.getSize());
-}
-
-int
-imstkSphereToCylinderCDTest(int argc, char* argv[])
-{
-    // Init Google Test & Mock
-    ::testing::InitGoogleTest(&argc, argv);
-
-    // Run tests with gtest
-    return RUN_ALL_TESTS();
-}
+}
\ No newline at end of file
diff --git a/Source/CollisionDetection/Testing/imstkSphereToSphereCDTest.cpp b/Source/CollisionDetection/Testing/imstkSphereToSphereCDTest.cpp
index 2a4d25577..7538ed59d 100644
--- a/Source/CollisionDetection/Testing/imstkSphereToSphereCDTest.cpp
+++ b/Source/CollisionDetection/Testing/imstkSphereToSphereCDTest.cpp
@@ -77,13 +77,3 @@ TEST(imstkSphereToSphereCDTest, NonIntersectionTestAB)
     EXPECT_EQ(0, colData->elementsA.getSize());
     EXPECT_EQ(0, colData->elementsB.getSize());
 }
-
-int
-imstkSphereToSphereCDTest(int argc, char* argv[])
-{
-    // Init Google Test & Mock
-    ::testing::InitGoogleTest(&argc, argv);
-
-    // Run tests with gtest
-    return RUN_ALL_TESTS();
-}
diff --git a/Source/CollisionDetection/Testing/imstkTetraToLineMeshCDTest.cpp b/Source/CollisionDetection/Testing/imstkTetraToLineMeshCDTest.cpp
index 8940feed6..0f67eb2da 100644
--- a/Source/CollisionDetection/Testing/imstkTetraToLineMeshCDTest.cpp
+++ b/Source/CollisionDetection/Testing/imstkTetraToLineMeshCDTest.cpp
@@ -153,14 +153,4 @@ TEST(imstkTetraToLineMeshCDTest, NonIntersectionTestAB)
     // Should have no elements
     EXPECT_EQ(0, colData->elementsA.getSize());
     EXPECT_EQ(0, colData->elementsB.getSize());
-}
-
-int
-imstkTetraToLineMeshCDTest(int argc, char* argv[])
-{
-    // Init Google Test & Mock
-    ::testing::InitGoogleTest(&argc, argv);
-
-    // Run tests with gtest
-    return RUN_ALL_TESTS();
-}
+}
\ No newline at end of file
diff --git a/Source/CollisionDetection/Testing/imstkTetraToPointSetCDTest.cpp b/Source/CollisionDetection/Testing/imstkTetraToPointSetCDTest.cpp
index 8a20e6889..76cbeeb78 100644
--- a/Source/CollisionDetection/Testing/imstkTetraToPointSetCDTest.cpp
+++ b/Source/CollisionDetection/Testing/imstkTetraToPointSetCDTest.cpp
@@ -117,14 +117,4 @@ TEST(imstkTetraToPointSetCDTest, NonIntersectionTestAB)
     // Should have no elements
     EXPECT_EQ(0, colData->elementsA.getSize());
     EXPECT_EQ(0, colData->elementsB.getSize());
-}
-
-int
-imstkTetraToPointSetCDTest(int argc, char* argv[])
-{
-    // Init Google Test & Mock
-    ::testing::InitGoogleTest(&argc, argv);
-
-    // Run tests with gtest
-    return RUN_ALL_TESTS();
-}
+}
\ No newline at end of file
diff --git a/Source/CollisionDetection/Testing/imstkUnidirectionalPlaneToSphereCDTest.cpp b/Source/CollisionDetection/Testing/imstkUnidirectionalPlaneToSphereCDTest.cpp
index 1f56903c6..0ad708e69 100644
--- a/Source/CollisionDetection/Testing/imstkUnidirectionalPlaneToSphereCDTest.cpp
+++ b/Source/CollisionDetection/Testing/imstkUnidirectionalPlaneToSphereCDTest.cpp
@@ -80,13 +80,3 @@ TEST(imstkUnidirectionalPlaneToSphereCDTest, NonIntersectionTestAB)
     EXPECT_EQ(0, colData->elementsA.getSize());
     EXPECT_EQ(0, colData->elementsB.getSize());
 }
-
-int
-imstkUnidirectionalPlaneToSphereCDTest(int argc, char* argv[])
-{
-    // Init Google Test & Mock
-    ::testing::InitGoogleTest(&argc, argv);
-
-    // Run tests with gtest
-    return RUN_ALL_TESTS();
-}
-- 
GitLab