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