From: Michael Lee Date: Wed, 20 Jan 2016 15:09:04 +0000 (-0800) Subject: Remove unecessary main functions. X-Git-Tag: deprecate-dynamic-initializer~150 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=edc4bd3f8833c5da2d46c03492748119585a1806;p=folly.git Remove unecessary main functions. Summary: Starting with this, but I will keep digging through these. The tests will be compiled into one combined test with a single main. Reviewed By: yfeldblum Differential Revision: D2841391 fb-gh-sync-id: 78fd153e282f1ca2dbe7ada942dc04fc8ba5d42d --- diff --git a/folly/test/DemangleTest.cpp b/folly/test/DemangleTest.cpp index 0f235c88..29d0eaea 100644 --- a/folly/test/DemangleTest.cpp +++ b/folly/test/DemangleTest.cpp @@ -16,7 +16,6 @@ #include -#include #include using folly::demangle; @@ -69,9 +68,3 @@ TEST(Demangle, strlcpy) { EXPECT_EQ(strlen(big_string), folly::strlcpy(buf, big_string, 0)); EXPECT_EQ('z', buf[0]); // unchanged, size = 0 } - -int main(int argc, char *argv[]) { - testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); - return RUN_ALL_TESTS(); -} diff --git a/folly/test/FBStringTest.cpp b/folly/test/FBStringTest.cpp index 94bbac99..67c79cf2 100644 --- a/folly/test/FBStringTest.cpp +++ b/folly/test/FBStringTest.cpp @@ -29,8 +29,6 @@ #include #include -#include - #include #include #include @@ -1405,9 +1403,3 @@ TEST(FBStringCtorTest, DefaultInitStructAlloc) { EXPECT_TRUE(t2.stringMember.empty()); EXPECT_EQ(allocatorConstructedCount.load(), 1); } - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - gflags::ParseCommandLineFlags(&argc, &argv, true); - return RUN_ALL_TESTS(); -}