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. // Test both BitVector and SmallBitVector with the same suite of tests.
typedef ::testing::Types<BitVector, SmallBitVector> BitVectorTestTypes; typedef ::testing::Types<BitVector, SmallBitVector> BitVectorTestTypes;
TYPED_TEST_SUITE(BitVectorTest, BitVectorTestTypes); TYPED_TEST_SUITE(BitVectorTest, BitVectorTestTypes, );
TYPED_TEST(BitVectorTest, TrivialOperation) { TYPED_TEST(BitVectorTest, TrivialOperation) {
TypeParam Vec; TypeParam Vec;

View File

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

View File

@ -68,7 +68,7 @@ typedef ::testing::Types<DenseSet<unsigned, TestDenseSetInfo>,
const SmallDenseSet<unsigned, 4, TestDenseSetInfo>, const SmallDenseSet<unsigned, 4, TestDenseSetInfo>,
SmallDenseSet<unsigned, 64, TestDenseSetInfo>> SmallDenseSet<unsigned, 64, TestDenseSetInfo>>
DenseSetTestTypes; DenseSetTestTypes;
TYPED_TEST_SUITE(DenseSetTest, DenseSetTestTypes); TYPED_TEST_SUITE(DenseSetTest, DenseSetTestTypes, );
TYPED_TEST(DenseSetTest, Constructor) { TYPED_TEST(DenseSetTest, Constructor) {
constexpr unsigned a[] = {1, 2, 4}; 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. // Test variants with the same test.
typedef ::testing::Types<ilist_base<false>, ilist_base<true>> typedef ::testing::Types<ilist_base<false>, ilist_base<true>>
IListBaseTestTypes; IListBaseTestTypes;
TYPED_TEST_SUITE(IListBaseTest, IListBaseTestTypes); TYPED_TEST_SUITE(IListBaseTest, IListBaseTestTypes, );
TYPED_TEST(IListBaseTest, insertBeforeImpl) { TYPED_TEST(IListBaseTest, insertBeforeImpl) {
typedef TypeParam list_base_type; typedef TypeParam list_base_type;

View File

@ -28,7 +28,7 @@ template <typename T> struct IntrusiveRefCntPtrTest : testing::Test {};
typedef ::testing::Types<SimpleRefCounted<RefCountedBase>, typedef ::testing::Types<SimpleRefCounted<RefCountedBase>,
SimpleRefCounted<ThreadSafeRefCountedBase>> SimpleRefCounted<ThreadSafeRefCountedBase>>
IntrusiveRefCntTypes; IntrusiveRefCntTypes;
TYPED_TEST_SUITE(IntrusiveRefCntPtrTest, IntrusiveRefCntTypes); TYPED_TEST_SUITE(IntrusiveRefCntPtrTest, IntrusiveRefCntTypes, );
TYPED_TEST(IntrusiveRefCntPtrTest, RefCountedBaseCopyDoesNotLeak) { TYPED_TEST(IntrusiveRefCntPtrTest, RefCountedBaseCopyDoesNotLeak) {
EXPECT_EQ(0, NumInstances); 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, using MapIntTypes = ::testing::Types<int, long, long long, unsigned,
unsigned long, unsigned long long>; unsigned long, unsigned long long>;
TYPED_TEST_SUITE(MapVectorMappedTypeTest, MapIntTypes); TYPED_TEST_SUITE(MapVectorMappedTypeTest, MapIntTypes, );
TYPED_TEST(MapVectorMappedTypeTest, DifferentDenseMap) { TYPED_TEST(MapVectorMappedTypeTest, DifferentDenseMap) {
// Test that using a map with a mapped type other than 'unsigned' compiles // 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 {}; template <typename T> class PriorityWorklistTest : public ::testing::Test {};
typedef ::testing::Types<PriorityWorklist<int>, SmallPriorityWorklist<int, 2>> typedef ::testing::Types<PriorityWorklist<int>, SmallPriorityWorklist<int, 2>>
TestTypes; TestTypes;
TYPED_TEST_SUITE(PriorityWorklistTest, TestTypes); TYPED_TEST_SUITE(PriorityWorklistTest, TestTypes, );
TYPED_TEST(PriorityWorklistTest, Basic) { TYPED_TEST(PriorityWorklistTest, Basic) {
TypeParam W; 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]> typedef ::testing::Types<std::vector<int>, std::list<int>, int[4]>
RangeAdapterLValueTestTypes; RangeAdapterLValueTestTypes;
TYPED_TEST_SUITE(RangeAdapterLValueTest, RangeAdapterLValueTestTypes); TYPED_TEST_SUITE(RangeAdapterLValueTest, RangeAdapterLValueTestTypes, );
TYPED_TEST(RangeAdapterLValueTest, TrivialOperation) { TYPED_TEST(RangeAdapterLValueTest, TrivialOperation) {
TypeParam v = {0, 1, 2, 3}; TypeParam v = {0, 1, 2, 3};
@ -145,7 +145,7 @@ typedef ::testing::Types<std::vector<int>, std::list<int>, CustomIteratorVector,
ReverseOnlyVector, BidirectionalVector, ReverseOnlyVector, BidirectionalVector,
BidirectionalVectorConsts> BidirectionalVectorConsts>
RangeAdapterRValueTestTypes; RangeAdapterRValueTestTypes;
TYPED_TEST_SUITE(RangeAdapterRValueTest, RangeAdapterRValueTestTypes); TYPED_TEST_SUITE(RangeAdapterRValueTest, RangeAdapterRValueTestTypes, );
TYPED_TEST(RangeAdapterRValueTest, TrivialOperation) { TYPED_TEST(RangeAdapterRValueTest, TrivialOperation) {
TestRev(reverse(TypeParam({0, 1, 2, 3}))); TestRev(reverse(TypeParam({0, 1, 2, 3})));

View File

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

View File

@ -208,7 +208,7 @@ typedef ::testing::Types<SmallVector<Constructable, 0>,
SmallVector<Constructable, 4>, SmallVector<Constructable, 4>,
SmallVector<Constructable, 5> SmallVector<Constructable, 5>
> SmallVectorTestTypes; > SmallVectorTestTypes;
TYPED_TEST_SUITE(SmallVectorTest, SmallVectorTestTypes); TYPED_TEST_SUITE(SmallVectorTest, SmallVectorTestTypes, );
// Constructor test. // Constructor test.
TYPED_TEST(SmallVectorTest, ConstructorNonIterTest) { TYPED_TEST(SmallVectorTest, ConstructorNonIterTest) {
@ -811,7 +811,7 @@ typedef ::testing::Types<
std::pair<SmallVector<Constructable, 2>, SmallVector<Constructable, 2>> std::pair<SmallVector<Constructable, 2>, SmallVector<Constructable, 2>>
> DualSmallVectorTestTypes; > DualSmallVectorTestTypes;
TYPED_TEST_SUITE(DualSmallVectorsTest, DualSmallVectorTestTypes); TYPED_TEST_SUITE(DualSmallVectorsTest, DualSmallVectorTestTypes, );
TYPED_TEST(DualSmallVectorsTest, MoveAssignment) { TYPED_TEST(DualSmallVectorsTest, MoveAssignment) {
SCOPED_TRACE("MoveAssignTest-DualVectorTypes"); SCOPED_TRACE("MoveAssignTest-DualVectorTypes");
@ -1096,7 +1096,7 @@ using SmallVectorReferenceInvalidationTestTypes =
::testing::Types<SmallVector<int, 3>, SmallVector<Constructable, 3>>; ::testing::Types<SmallVector<int, 3>, SmallVector<Constructable, 3>>;
TYPED_TEST_SUITE(SmallVectorReferenceInvalidationTest, TYPED_TEST_SUITE(SmallVectorReferenceInvalidationTest,
SmallVectorReferenceInvalidationTestTypes); SmallVectorReferenceInvalidationTestTypes, );
TYPED_TEST(SmallVectorReferenceInvalidationTest, PushBack) { TYPED_TEST(SmallVectorReferenceInvalidationTest, PushBack) {
// Note: setup adds [1, 2, ...] to V until it's at capacity in small mode. // 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>>; SmallVector<std::pair<Constructable, Constructable>, 3>>;
TYPED_TEST_SUITE(SmallVectorInternalReferenceInvalidationTest, TYPED_TEST_SUITE(SmallVectorInternalReferenceInvalidationTest,
SmallVectorInternalReferenceInvalidationTestTypes); SmallVectorInternalReferenceInvalidationTestTypes, );
TYPED_TEST(SmallVectorInternalReferenceInvalidationTest, EmplaceBack) { TYPED_TEST(SmallVectorInternalReferenceInvalidationTest, EmplaceBack) {
// Note: setup adds [1, 2, ...] to V until it's at capacity in small mode. // 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 *>, typedef ::testing::Types<TinyPtrVector<int *>, TinyPtrVector<double *>,
TinyPtrVector<PointerIntPair<int *, 1>>> TinyPtrVector<PointerIntPair<int *, 1>>>
TinyPtrVectorTestTypes; TinyPtrVectorTestTypes;
TYPED_TEST_SUITE(TinyPtrVectorTest, TinyPtrVectorTestTypes); TYPED_TEST_SUITE(TinyPtrVectorTest, TinyPtrVectorTestTypes, );
TYPED_TEST(TinyPtrVectorTest, EmptyTest) { TYPED_TEST(TinyPtrVectorTest, EmptyTest) {
this->expectValues(this->V, this->testArray(0)); 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*>, typedef ::testing::Types<std::tuple<Value*, Instruction*>,
std::tuple<const Value*, const Instruction *>> std::tuple<const Value*, const Instruction *>>
MutableConstTestTypes; MutableConstTestTypes;
TYPED_TEST_SUITE(MutableConstTest, MutableConstTestTypes); TYPED_TEST_SUITE(MutableConstTest, MutableConstTestTypes, );
TYPED_TEST(MutableConstTest, ICmp) { TYPED_TEST(MutableConstTest, ICmp) {
auto &IRB = PatternMatchTest::IRB; auto &IRB = PatternMatchTest::IRB;

View File

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

View File

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

View File

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

View File

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

View File

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