1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

Put back the trailing commas on TYPED_TEST_SUITE

This avoids a -pedantic warning:
warning: ISO C++11 requires at least one argument for the "..." in a variadic macro

See also https://github.com/google/googletest/issues/2271
This commit is contained in:
Benjamin Kramer 2021-05-17 14:12:11 +02:00
parent faba1577fb
commit 3ae6f7dd7e
17 changed files with 22 additions and 22 deletions

View File

@ -21,7 +21,7 @@ class BitVectorTest : public ::testing::Test { };
// Test both BitVector and SmallBitVector with the same suite of tests.
typedef ::testing::Types<BitVector, SmallBitVector> BitVectorTestTypes;
TYPED_TEST_SUITE(BitVectorTest, BitVectorTestTypes);
TYPED_TEST_SUITE(BitVectorTest, BitVectorTestTypes, );
TYPED_TEST(BitVectorTest, TrivialOperation) {
TypeParam Vec;

View File

@ -105,7 +105,7 @@ typedef ::testing::Types<DenseMap<uint32_t, uint32_t>,
SmallDenseMap<CtorTester, CtorTester, 4,
CtorTesterMapInfo>
> DenseMapTestTypes;
TYPED_TEST_SUITE(DenseMapTest, DenseMapTestTypes);
TYPED_TEST_SUITE(DenseMapTest, DenseMapTestTypes, );
// Empty map tests
TYPED_TEST(DenseMapTest, EmptyIntMapTest) {

View File

@ -68,7 +68,7 @@ typedef ::testing::Types<DenseSet<unsigned, TestDenseSetInfo>,
const SmallDenseSet<unsigned, 4, TestDenseSetInfo>,
SmallDenseSet<unsigned, 64, TestDenseSetInfo>>
DenseSetTestTypes;
TYPED_TEST_SUITE(DenseSetTest, DenseSetTestTypes);
TYPED_TEST_SUITE(DenseSetTest, DenseSetTestTypes, );
TYPED_TEST(DenseSetTest, Constructor) {
constexpr unsigned a[] = {1, 2, 4};

View File

@ -19,7 +19,7 @@ template <typename T> class IListBaseTest : public ::testing::Test {};
// Test variants with the same test.
typedef ::testing::Types<ilist_base<false>, ilist_base<true>>
IListBaseTestTypes;
TYPED_TEST_SUITE(IListBaseTest, IListBaseTestTypes);
TYPED_TEST_SUITE(IListBaseTest, IListBaseTestTypes, );
TYPED_TEST(IListBaseTest, insertBeforeImpl) {
typedef TypeParam list_base_type;

View File

@ -28,7 +28,7 @@ template <typename T> struct IntrusiveRefCntPtrTest : testing::Test {};
typedef ::testing::Types<SimpleRefCounted<RefCountedBase>,
SimpleRefCounted<ThreadSafeRefCountedBase>>
IntrusiveRefCntTypes;
TYPED_TEST_SUITE(IntrusiveRefCntPtrTest, IntrusiveRefCntTypes);
TYPED_TEST_SUITE(IntrusiveRefCntPtrTest, IntrusiveRefCntTypes, );
TYPED_TEST(IntrusiveRefCntPtrTest, RefCountedBaseCopyDoesNotLeak) {
EXPECT_EQ(0, NumInstances);

View File

@ -162,7 +162,7 @@ template <class IntType> struct MapVectorMappedTypeTest : ::testing::Test {
using MapIntTypes = ::testing::Types<int, long, long long, unsigned,
unsigned long, unsigned long long>;
TYPED_TEST_SUITE(MapVectorMappedTypeTest, MapIntTypes);
TYPED_TEST_SUITE(MapVectorMappedTypeTest, MapIntTypes, );
TYPED_TEST(MapVectorMappedTypeTest, DifferentDenseMap) {
// Test that using a map with a mapped type other than 'unsigned' compiles

View File

@ -22,7 +22,7 @@ using namespace llvm;
template <typename T> class PriorityWorklistTest : public ::testing::Test {};
typedef ::testing::Types<PriorityWorklist<int>, SmallPriorityWorklist<int, 2>>
TestTypes;
TYPED_TEST_SUITE(PriorityWorklistTest, TestTypes);
TYPED_TEST_SUITE(PriorityWorklistTest, TestTypes, );
TYPED_TEST(PriorityWorklistTest, Basic) {
TypeParam W;

View File

@ -129,7 +129,7 @@ template <typename T> class RangeAdapterLValueTest : public ::testing::Test {};
typedef ::testing::Types<std::vector<int>, std::list<int>, int[4]>
RangeAdapterLValueTestTypes;
TYPED_TEST_SUITE(RangeAdapterLValueTest, RangeAdapterLValueTestTypes);
TYPED_TEST_SUITE(RangeAdapterLValueTest, RangeAdapterLValueTestTypes, );
TYPED_TEST(RangeAdapterLValueTest, TrivialOperation) {
TypeParam v = {0, 1, 2, 3};
@ -145,7 +145,7 @@ typedef ::testing::Types<std::vector<int>, std::list<int>, CustomIteratorVector,
ReverseOnlyVector, BidirectionalVector,
BidirectionalVectorConsts>
RangeAdapterRValueTestTypes;
TYPED_TEST_SUITE(RangeAdapterRValueTest, RangeAdapterRValueTestTypes);
TYPED_TEST_SUITE(RangeAdapterRValueTest, RangeAdapterRValueTestTypes, );
TYPED_TEST(RangeAdapterRValueTest, TrivialOperation) {
TestRev(reverse(TypeParam({0, 1, 2, 3})));

View File

@ -60,7 +60,7 @@ using STLForwardCompatRemoveCVRefTestTypes = ::testing::Types<
>;
TYPED_TEST_SUITE(STLForwardCompatRemoveCVRefTest,
STLForwardCompatRemoveCVRefTestTypes);
STLForwardCompatRemoveCVRefTestTypes, );
TYPED_TEST(STLForwardCompatRemoveCVRefTest, RemoveCVRef) {
using From = typename TypeParam::first_type;

View File

@ -208,7 +208,7 @@ typedef ::testing::Types<SmallVector<Constructable, 0>,
SmallVector<Constructable, 4>,
SmallVector<Constructable, 5>
> SmallVectorTestTypes;
TYPED_TEST_SUITE(SmallVectorTest, SmallVectorTestTypes);
TYPED_TEST_SUITE(SmallVectorTest, SmallVectorTestTypes, );
// Constructor test.
TYPED_TEST(SmallVectorTest, ConstructorNonIterTest) {
@ -811,7 +811,7 @@ typedef ::testing::Types<
std::pair<SmallVector<Constructable, 2>, SmallVector<Constructable, 2>>
> DualSmallVectorTestTypes;
TYPED_TEST_SUITE(DualSmallVectorsTest, DualSmallVectorTestTypes);
TYPED_TEST_SUITE(DualSmallVectorsTest, DualSmallVectorTestTypes, );
TYPED_TEST(DualSmallVectorsTest, MoveAssignment) {
SCOPED_TRACE("MoveAssignTest-DualVectorTypes");
@ -1096,7 +1096,7 @@ using SmallVectorReferenceInvalidationTestTypes =
::testing::Types<SmallVector<int, 3>, SmallVector<Constructable, 3>>;
TYPED_TEST_SUITE(SmallVectorReferenceInvalidationTest,
SmallVectorReferenceInvalidationTestTypes);
SmallVectorReferenceInvalidationTestTypes, );
TYPED_TEST(SmallVectorReferenceInvalidationTest, PushBack) {
// Note: setup adds [1, 2, ...] to V until it's at capacity in small mode.
@ -1383,7 +1383,7 @@ using SmallVectorInternalReferenceInvalidationTestTypes =
SmallVector<std::pair<Constructable, Constructable>, 3>>;
TYPED_TEST_SUITE(SmallVectorInternalReferenceInvalidationTest,
SmallVectorInternalReferenceInvalidationTestTypes);
SmallVectorInternalReferenceInvalidationTestTypes, );
TYPED_TEST(SmallVectorInternalReferenceInvalidationTest, EmplaceBack) {
// Note: setup adds [1, 2, ...] to V until it's at capacity in small mode.

View File

@ -83,7 +83,7 @@ protected:
typedef ::testing::Types<TinyPtrVector<int *>, TinyPtrVector<double *>,
TinyPtrVector<PointerIntPair<int *, 1>>>
TinyPtrVectorTestTypes;
TYPED_TEST_SUITE(TinyPtrVectorTest, TinyPtrVectorTestTypes);
TYPED_TEST_SUITE(TinyPtrVectorTest, TinyPtrVectorTestTypes, );
TYPED_TEST(TinyPtrVectorTest, EmptyTest) {
this->expectValues(this->V, this->testArray(0));

View File

@ -1641,7 +1641,7 @@ template <typename T> struct MutableConstTest : PatternMatchTest { };
typedef ::testing::Types<std::tuple<Value*, Instruction*>,
std::tuple<const Value*, const Instruction *>>
MutableConstTestTypes;
TYPED_TEST_SUITE(MutableConstTest, MutableConstTestTypes);
TYPED_TEST_SUITE(MutableConstTest, MutableConstTestTypes, );
TYPED_TEST(MutableConstTest, ICmp) {
auto &IRB = PatternMatchTest::IRB;

View File

@ -35,7 +35,7 @@ protected:
// Run everything on Value*, a subtype to make sure that casting works as
// expected, and a const subtype to make sure we cast const correctly.
typedef ::testing::Types<Value, Instruction, const Instruction> KeyTypes;
TYPED_TEST_SUITE(ValueMapTest, KeyTypes);
TYPED_TEST_SUITE(ValueMapTest, KeyTypes, );
TYPED_TEST(ValueMapTest, Null) {
ValueMap<TypeParam*, int> VM1;

View File

@ -483,7 +483,7 @@ class OverflowTest : public ::testing::Test { };
using OverflowTestTypes = ::testing::Types<signed char, short, int, long,
long long>;
TYPED_TEST_SUITE(OverflowTest, OverflowTestTypes);
TYPED_TEST_SUITE(OverflowTest, OverflowTestTypes, );
TYPED_TEST(OverflowTest, AddNoOverflow) {
TypeParam Result;

View File

@ -208,14 +208,14 @@ using RecordTypes =
::testing::Types<NewBufferRecord, NewCPUIDRecord, TSCWrapRecord,
WallclockRecord, CustomEventRecord, CallArgRecord,
PIDRecord, FunctionRecord>;
INSTANTIATE_TYPED_TEST_SUITE_P(Records, RoundTripTest, RecordTypes);
INSTANTIATE_TYPED_TEST_SUITE_P(Records, RoundTripTest, RecordTypes, );
// For V5, we have two new types we're supporting.
using RecordTypesV5 =
::testing::Types<NewBufferRecord, NewCPUIDRecord, TSCWrapRecord,
WallclockRecord, CustomEventRecordV5, TypedEventRecord,
CallArgRecord, PIDRecord, FunctionRecord>;
INSTANTIATE_TYPED_TEST_SUITE_P(Records, RoundTripTestV5, RecordTypesV5);
INSTANTIATE_TYPED_TEST_SUITE_P(Records, RoundTripTestV5, RecordTypesV5, );
} // namespace
} // namespace xray

View File

@ -122,7 +122,7 @@ using FDRRecordTypes =
NewCPUIDRecord, TSCWrapRecord, WallclockRecord,
CustomEventRecord, CallArgRecord, BufferExtents,
PIDRecord>;
INSTANTIATE_TYPED_TEST_SUITE_P(Records, PrinterTest, FDRRecordTypes);
INSTANTIATE_TYPED_TEST_SUITE_P(Records, PrinterTest, FDRRecordTypes, );
TEST(FDRRecordPrinterTest, WriteFunctionRecordEnter) {
std::string Data;

View File

@ -59,7 +59,7 @@ typedef ::testing::Types<GraphT, const GraphT> GraphTestTypes;
using VVT = typename GraphT::VertexValueType;
using EVT = typename GraphT::EdgeValueType;
TYPED_TEST_SUITE(GraphTest, GraphTestTypes);
TYPED_TEST_SUITE(GraphTest, GraphTestTypes, );
template <typename T> void graphVertexTester(T &G) {
std::set<unsigned> V({1u, 2u, 3u, 4u, 5u, 6u});