From bd50422c4e02a4531f79ba5b8a309f503d0bb96f Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Mon, 4 Apr 2022 10:44:29 -0500 Subject: [PATCH] Drop main() functions from all gtest files (#245) Signed-off-by: Michael Carroll --- src/ClientConfig_TEST.cc | 7 ------- src/CollectionIdentifier_TEST.cc | 7 ------- src/FuelClient_TEST.cc | 7 ------- src/Helpers_TEST.cc | 7 ------- src/JSONParser_TEST.cc | 7 ------- src/LocalCache_TEST.cc | 7 ------- src/ModelIdentifier_TEST.cc | 7 ------- src/ModelIter_TEST.cc | 7 ------- src/Model_TEST.cc | 7 ------- src/RestClient_TEST.cc | 7 ------- src/Result_TEST.cc | 7 ------- src/WorldIdentifier_TEST.cc | 7 ------- src/WorldIter_TEST.cc | 7 ------- src/Zip_TEST.cc | 7 ------- test/integration/zip.cc | 7 ------- 15 files changed, 105 deletions(-) diff --git a/src/ClientConfig_TEST.cc b/src/ClientConfig_TEST.cc index 1e66bb02..e6e85ef4 100644 --- a/src/ClientConfig_TEST.cc +++ b/src/ClientConfig_TEST.cc @@ -433,10 +433,3 @@ TEST(ServerConfig, Url) EXPECT_FALSE(srv.Url().Authority()); } } - -////////////////////////////////////////////////// -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/src/CollectionIdentifier_TEST.cc b/src/CollectionIdentifier_TEST.cc index 89a58a46..8e5a095d 100644 --- a/src/CollectionIdentifier_TEST.cc +++ b/src/CollectionIdentifier_TEST.cc @@ -165,10 +165,3 @@ TEST(CollectionIdentifier, AsPrettyString) EXPECT_NE(str.find("raspberry"), std::string::npos); } } - -////////////////////////////////////////////////// -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/src/FuelClient_TEST.cc b/src/FuelClient_TEST.cc index fb51e3d8..7096590a 100644 --- a/src/FuelClient_TEST.cc +++ b/src/FuelClient_TEST.cc @@ -1457,10 +1457,3 @@ TEST_F(FuelClientTest, PatchModelFail) result = client.PatchModel(modelId, headers); EXPECT_EQ(ResultType::PATCH_ERROR, result.Type()); } - -////////////////////////////////////////////////// -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/src/Helpers_TEST.cc b/src/Helpers_TEST.cc index bfa6c077..c134149e 100644 --- a/src/Helpers_TEST.cc +++ b/src/Helpers_TEST.cc @@ -70,10 +70,3 @@ TEST(HelpersTEST, UriToPathHasAuthority) "path")), uriToPath(uri)); } } - -////////////////////////////////////////////////// -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/src/JSONParser_TEST.cc b/src/JSONParser_TEST.cc index 5de8d58c..2eaee741 100644 --- a/src/JSONParser_TEST.cc +++ b/src/JSONParser_TEST.cc @@ -282,10 +282,3 @@ TEST(JSONParser, ParseLicenses) } } } - -////////////////////////////////////////////////// -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/src/LocalCache_TEST.cc b/src/LocalCache_TEST.cc index 62c64361..0909fad1 100644 --- a/src/LocalCache_TEST.cc +++ b/src/LocalCache_TEST.cc @@ -470,10 +470,3 @@ TEST_F(LocalCacheTest, MatchingWorld) bogus3.SetName("tm3"); EXPECT_FALSE(cache.MatchingWorld(bogus3)); } - -////////////////////////////////////////////////// -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/src/ModelIdentifier_TEST.cc b/src/ModelIdentifier_TEST.cc index 82a32359..6e77e27c 100644 --- a/src/ModelIdentifier_TEST.cc +++ b/src/ModelIdentifier_TEST.cc @@ -227,10 +227,3 @@ TEST(ModelIdentifier, AsPrettyString) EXPECT_NE(str.find("2048"), std::string::npos); } } - -////////////////////////////////////////////////// -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/src/ModelIter_TEST.cc b/src/ModelIter_TEST.cc index effeae76..4252084d 100644 --- a/src/ModelIter_TEST.cc +++ b/src/ModelIter_TEST.cc @@ -159,10 +159,3 @@ TEST(ModelIterTestFixture, MoveThroughModels) ++iter; EXPECT_FALSE(iter); } - -////////////////////////////////////////////////// -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/src/Model_TEST.cc b/src/Model_TEST.cc index 0d51f48e..1bc10c56 100644 --- a/src/Model_TEST.cc +++ b/src/Model_TEST.cc @@ -38,10 +38,3 @@ TEST(Model, ConstructorDoesNotCrash) std::string path = model.PathToModel(); EXPECT_TRUE(path.empty()); } - -////////////////////////////////////////////////// -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/src/RestClient_TEST.cc b/src/RestClient_TEST.cc index 3c9c9100..8833b859 100644 --- a/src/RestClient_TEST.cc +++ b/src/RestClient_TEST.cc @@ -29,10 +29,3 @@ TEST(RestClient, UserAgent) rest.SetUserAgent("my_user_agent"); EXPECT_EQ("my_user_agent", rest.UserAgent()); } - -////////////////////////////////////////////////// -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/src/Result_TEST.cc b/src/Result_TEST.cc index 0559fa01..127269f3 100644 --- a/src/Result_TEST.cc +++ b/src/Result_TEST.cc @@ -114,10 +114,3 @@ TEST(Result, TrueOnSuccess) EXPECT_FALSE(Result(ResultType::UPLOAD_ALREADY_EXISTS)); EXPECT_FALSE(Result(ResultType::UPLOAD_ERROR)); } - -////////////////////////////////////////////////// -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/src/WorldIdentifier_TEST.cc b/src/WorldIdentifier_TEST.cc index 1a6c5950..268ce65a 100644 --- a/src/WorldIdentifier_TEST.cc +++ b/src/WorldIdentifier_TEST.cc @@ -183,10 +183,3 @@ TEST(WorldIdentifier, AsPrettyString) EXPECT_NE(str.find("55"), std::string::npos); } } - -////////////////////////////////////////////////// -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/src/WorldIter_TEST.cc b/src/WorldIter_TEST.cc index 0675f079..f6d5e27a 100644 --- a/src/WorldIter_TEST.cc +++ b/src/WorldIter_TEST.cc @@ -107,10 +107,3 @@ TEST(WorldIterTestFixture, MoveThroughIds) ++iter; EXPECT_FALSE(iter); } - -////////////////////////////////////////////////// -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/src/Zip_TEST.cc b/src/Zip_TEST.cc index 9d70b5e0..47b7c58e 100644 --- a/src/Zip_TEST.cc +++ b/src/Zip_TEST.cc @@ -195,10 +195,3 @@ TEST_F(ZipTest, CompressAndExtract) // Clean. ignition::common::removeAll(newTempDir); } - -////////////////////////////////////////////////// -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/test/integration/zip.cc b/test/integration/zip.cc index 6691426c..3ef74b80 100644 --- a/test/integration/zip.cc +++ b/test/integration/zip.cc @@ -109,10 +109,3 @@ TEST_F(ZipIntegrationTest, Compress) EXPECT_TRUE(ignition::common::removeAll(boxPath)); EXPECT_FALSE(ignition::common::exists(boxPath)); } - -///////////////////////////////////////////////// -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -}