Commit 4e1a864b authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

use TYPED_TEST_SUITE over TYPED_TEST_CASE

Summary: The facility was renamed in gtest.

Reviewed By: praihan

Differential Revision: D27904281

fbshipit-source-id: 3f00b4371e17cd85672ad7ef706cea4ca1ba5c64
parent f0d7b6d5
......@@ -92,7 +92,7 @@ class LtHashTest : public ::testing::Test {
// Some googletest macro magic to make TYPED_TEST work
using LtHashTestTypes =
::testing::Types<LtHash<16, 1024>, LtHash<20, 1008>, LtHash<32, 1024>>;
TYPED_TEST_CASE(LtHashTest, LtHashTestTypes);
TYPED_TEST_SUITE(LtHashTest, LtHashTestTypes);
// Note: in all test cases below, `TypeParam` refers to the H template param.
// Static methods must be prefixed with `TestFixture::`, while class variables
......
......@@ -55,7 +55,7 @@ class StreamingStatsTest : public testing::Test {
};
using InputDataTypes = ::testing::Types<double, float, long, int, short>;
TYPED_TEST_CASE(StreamingStatsTest, InputDataTypes);
TYPED_TEST_SUITE(StreamingStatsTest, InputDataTypes);
TYPED_TEST(StreamingStatsTest, StatsCalculations) {
EXPECT_EQ(this->stats.count(), 10);
......
......@@ -49,7 +49,7 @@ class FollyCallOnce : public testing::Test {
using OnceFlagTypes =
testing::Types<folly::once_flag, folly::compact_once_flag>;
TYPED_TEST_CASE(FollyCallOnce, OnceFlagTypes);
TYPED_TEST_SUITE(FollyCallOnce, OnceFlagTypes);
TYPED_TEST(FollyCallOnce, Simple) {
typename TestFixture::OnceFlag flag;
......
......@@ -246,7 +246,7 @@ struct WithOneByte {
using DelayedInitSizeTestTypes =
testing::Types<char, short, int, long, long long, char[3], short[2]>;
TYPED_TEST_CASE(DelayedInitSizeTest, DelayedInitSizeTestTypes);
TYPED_TEST_SUITE(DelayedInitSizeTest, DelayedInitSizeTestTypes);
TYPED_TEST(DelayedInitSizeTest, Size) {
// DelayedInit should not add more than 1-byte size overhead (modulo padding)
......
......@@ -56,7 +56,7 @@ typedef testing::Types<
>
Implementations;
TYPED_TEST_CASE(RWSpinLockTest, Implementations);
TYPED_TEST_SUITE(RWSpinLockTest, Implementations);
template <typename RWSpinLockType>
static void run(RWSpinLockType* lock) {
......
......@@ -117,7 +117,7 @@ struct AtomicUnorderedInsertMapTest : public ::testing::Test {};
// uint16_t doesn't make sense for most platforms, but we might as well
// test it
using IndexTypesToTest = ::testing::Types<uint16_t, uint32_t, uint64_t>;
TYPED_TEST_CASE(AtomicUnorderedInsertMapTest, IndexTypesToTest);
TYPED_TEST_SUITE(AtomicUnorderedInsertMapTest, IndexTypesToTest);
TYPED_TEST(AtomicUnorderedInsertMapTest, basic) {
UIM<std::string,
......
......@@ -935,7 +935,7 @@ struct ByteSetNeedleFinder {
using NeedleFinders =
::testing::Types<SseNeedleFinder, NoSseNeedleFinder, ByteSetNeedleFinder>;
TYPED_TEST_CASE(NeedleFinderTest, NeedleFinders);
TYPED_TEST_SUITE(NeedleFinderTest, NeedleFinders);
TYPED_TEST(NeedleFinderTest, Null) {
{ // null characters in the string
......
......@@ -94,13 +94,13 @@ using StaticAttributeTypes = ::testing::Types<
OddA,
OddB,
Indestructible>;
TYPED_TEST_CASE(ReplaceableStaticAttributeTest, StaticAttributeTypes);
TYPED_TEST_SUITE(ReplaceableStaticAttributeTest, StaticAttributeTypes);
template <typename T>
struct ReplaceableStaticAttributePairTest : Test {};
using StaticAttributePairTypes = ::testing::
Types<std::pair<int, long>, std::pair<OddA, OddB>, std::pair<OddB, OddA>>;
TYPED_TEST_CASE(ReplaceableStaticAttributePairTest, StaticAttributePairTypes);
TYPED_TEST_SUITE(ReplaceableStaticAttributePairTest, StaticAttributePairTypes);
TYPED_TEST(ReplaceableStaticAttributeTest, size) {
EXPECT_EQ(sizeof(TypeParam), sizeof(Replaceable<TypeParam>));
......
......@@ -52,7 +52,7 @@ using SynchronizedTestTypes = testing::Types<
folly::RWTicketSpinLock64,
#endif
folly::SpinLock>;
TYPED_TEST_CASE(SynchronizedTest, SynchronizedTestTypes);
TYPED_TEST_SUITE(SynchronizedTest, SynchronizedTestTypes);
TYPED_TEST(SynchronizedTest, Basic) {
testBasic<TypeParam>();
......@@ -116,7 +116,7 @@ using SynchronizedTimedTestTypes = testing::Types<
#endif
folly::SharedMutexReadPriority,
folly::SharedMutexWritePriority>;
TYPED_TEST_CASE(SynchronizedTimedTest, SynchronizedTimedTestTypes);
TYPED_TEST_SUITE(SynchronizedTimedTest, SynchronizedTimedTestTypes);
TYPED_TEST(SynchronizedTimedTest, Timed) {
testTimed<TypeParam>();
......@@ -132,7 +132,7 @@ using SynchronizedTimedWithConstTestTypes = testing::Types<
#endif
folly::SharedMutexReadPriority,
folly::SharedMutexWritePriority>;
TYPED_TEST_CASE(
TYPED_TEST_SUITE(
SynchronizedTimedWithConstTest, SynchronizedTimedWithConstTestTypes);
TYPED_TEST(SynchronizedTimedWithConstTest, TimedShared) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment