]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: do not conditionize on GTEST_HAS_PARAM_TEST 27927/head
authorKefu Chai <kchai@redhat.com>
Thu, 2 May 2019 17:29:55 +0000 (01:29 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 2 May 2019 17:38:27 +0000 (01:38 +0800)
value-parameterized is supported on all platforms, so drop this check

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/msgr/test_async_driver.cc
src/test/msgr/test_async_networkstack.cc
src/test/msgr/test_msgr.cc
src/test/objectstore/Allocator_bench.cc
src/test/objectstore/Allocator_test.cc
src/test/objectstore/store_test.cc
src/test/objectstore/test_kv.cc

index f15c37d9e41c2027bb0383cb601289e17bcdda13..8b0f329ab24b48a645edf2641ffc45857539d087 100644 (file)
@@ -59,8 +59,6 @@
 #include <gtest/gtest.h>
 
 
-#if GTEST_HAS_PARAM_TEST
-
 class EventDriverTest : public ::testing::TestWithParam<const char*> {
  public:
   EventDriver *driver;
@@ -346,19 +344,6 @@ INSTANTIATE_TEST_SUITE_P(
   )
 );
 
-#else
-
-// Google Test may not support value-parameterized tests with some
-// compilers. If we use conditional compilation to compile out all
-// code referring to the gtest_main library, MSVC linker will not link
-// that library at all and consequently complain about missing entry
-// point defined in that library (fatal error LNK1561: entry point
-// must be defined). This dummy test keeps gtest_main linked in.
-TEST(DummyTest, ValueParameterizedTestsAreNotSupportedOnThisPlatform) {}
-
-#endif
-
-
 /*
  * Local Variables:
  * compile-command: "cd ../.. ; make ceph_test_async_driver && 
index 0cc7e351a1a57a19ab699eec35830c381c54f91e..3077c1f13e663cabb87483ac748eb5d10d11f27b 100644 (file)
@@ -31,8 +31,6 @@
 #include "msg/async/Stack.h"
 
 
-#if GTEST_HAS_PARAM_TEST
-
 class NoopConfigObserver : public md_config_obs_t {
   std::list<std::string> options;
   const char **ptrs = 0;
@@ -1077,19 +1075,6 @@ INSTANTIATE_TEST_SUITE_P(
   )
 );
 
-#else
-
-// Google Test may not support value-parameterized tests with some
-// compilers. If we use conditional compilation to compile out all
-// code referring to the gtest_main library, MSVC linker will not link
-// that library at all and consequently complain about missing entry
-// point defined in that library (fatal error LNK1561: entry point
-// must be defined). This dummy test keeps gtest_main linked in.
-TEST(DummyTest, ValueParameterizedTestsAreNotSupportedOnThisPlatform) {}
-
-#endif
-
-
 /*
  * Local Variables:
  * compile-command: "cd ../.. ; make ceph_test_async_networkstack &&
index 4818b4c9f53f85770efc5735b45aca0f5d78be9f..dd4c52c010ab2b0b63e59f30205a9f22c6e21321 100644 (file)
@@ -50,8 +50,6 @@ typedef boost::mt11213b gen_type;
 #define dout_prefix *_dout << " ceph_test_msgr "
 
 
-#if GTEST_HAS_PARAM_TEST
-
 #define CHECK_AND_WAIT_TRUE(expr) do {  \
   int n = 1000;                         \
   while (--n) {                         \
@@ -2221,19 +2219,6 @@ INSTANTIATE_TEST_SUITE_P(
   )
 );
 
-#else
-
-// Google Test may not support value-parameterized tests with some
-// compilers. If we use conditional compilation to compile out all
-// code referring to the gtest_main library, MSVC linker will not link
-// that library at all and consequently complain about missing entry
-// point defined in that library (fatal error LNK1561: entry point
-// must be defined). This dummy test keeps gtest_main linked in.
-TEST(DummyTest, ValueParameterizedTestsAreNotSupportedOnThisPlatform) {}
-
-#endif
-
-
 int main(int argc, char **argv) {
   vector<const char*> args;
   argv_to_vec(argc, (const char **)argv, args);
index bd030df701ca26e69b8659d392a6e42151198dfc..50fbb1e410ac17c0ea9b8c3627a35084eccac59e 100755 (executable)
@@ -22,8 +22,6 @@ typedef boost::mt11213b gen_type;
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_
 
-#if GTEST_HAS_PARAM_TEST
-
 class AllocTest : public ::testing::TestWithParam<const char*> {
 
 public:
@@ -333,8 +331,3 @@ INSTANTIATE_TEST_SUITE_P(
   Allocator,
   AllocTest,
   ::testing::Values("stupid", "bitmap"));
-
-#else
-
-TEST(DummyTest, ValueParameterizedTestsAreNotSupportedOnThisPlatform) {}
-#endif
index 5c579103c53372e561383c4d73bb0f246a4382ac..1bf3a7d2dd03159a577f3777ebb246a39f0c2931 100644 (file)
@@ -18,8 +18,6 @@
 #include <boost/random/uniform_int.hpp>
 typedef boost::mt11213b gen_type;
 
-#if GTEST_HAS_PARAM_TEST
-
 class AllocTest : public ::testing::TestWithParam<const char*> {
 
 public:
@@ -332,8 +330,3 @@ INSTANTIATE_TEST_SUITE_P(
   Allocator,
   AllocTest,
   ::testing::Values("stupid", "bitmap"));
-
-#else
-
-TEST(DummyTest, ValueParameterizedTestsAreNotSupportedOnThisPlatform) {}
-#endif
index ddd54c149b1561fcb484b72d79186acbbf0cb1b2..bb22c7038e1114cc753939af2c69c7f5b1fc8ae3 100644 (file)
@@ -48,8 +48,6 @@ typedef boost::mt11213b gen_type;
 const uint64_t DEF_STORE_TEST_BLOCKDEV_SIZE = 10240000000;
 #define dout_context g_ceph_context
 
-#if GTEST_HAS_PARAM_TEST
-
 static bool bl_eq(bufferlist& expected, bufferlist& actual)
 {
   if (expected.contents_equal(actual))
@@ -6211,18 +6209,6 @@ INSTANTIATE_TEST_SUITE_P(
 #endif
     "kstore"));
 
-#else
-
-// Google Test may not support value-parameterized tests with some
-// compilers. If we use conditional compilation to compile out all
-// code referring to the gtest_main library, MSVC linker will not link
-// that library at all and consequently complain about missing entry
-// point defined in that library (fatal error LNK1561: entry point
-// must be defined). This dummy test keeps gtest_main linked in.
-TEST(DummyTest, ValueParameterizedTestsAreNotSupportedOnThisPlatform) {}
-
-#endif
-
 void doMany4KWritesTest(boost::scoped_ptr<ObjectStore>& store,
                         unsigned max_objects,
                         unsigned max_ops,
index fe2560e63417c3efb39a68cfd1078e7d64d9c29a..16881bcb044ccb98f528af7af251018f00b7857a 100644 (file)
@@ -27,8 +27,6 @@
 #include "include/stringify.h"
 #include <gtest/gtest.h>
 
-#if GTEST_HAS_PARAM_TEST
-
 class KVTest : public ::testing::TestWithParam<const char*> {
 public:
   boost::scoped_ptr<KeyValueDB> db;
@@ -472,18 +470,6 @@ INSTANTIATE_TEST_SUITE_P(
   KVTest,
   ::testing::Values("leveldb", "rocksdb", "memdb"));
 
-#else
-
-// Google Test may not support value-parameterized tests with some
-// compilers. If we use conditional compilation to compile out all
-// code referring to the gtest_main library, MSVC linker will not link
-// that library at all and consequently complain about missing entry
-// point defined in that library (fatal error LNK1561: entry point
-// must be defined). This dummy test keeps gtest_main linked in.
-TEST(DummyTest, ValueParameterizedTestsAreNotSupportedOnThisPlatform) {}
-
-#endif
-
 int main(int argc, char **argv) {
   vector<const char*> args;
   argv_to_vec(argc, (const char **)argv, args);