Skip to content

Commit bf03006

Browse files
committed
Globally assume at least GTest version 1.10.0
It appears ROOT already depends on at least GTest 1.10.0, by using the following in some places without compatibility code: * GTEST_SKIP * TestWithParam with non-default constructible type * The new "test suite" naming instead of the old "test case" (I found at least TYPED_TEST_SUITE and SetUpTestSuite + TearDownTestSuite). Given that an older version is only found on EL8, where we have been using builtin_gtest since a while, I propose to drop the remaining compatibility code.
1 parent 049d145 commit bf03006

22 files changed

+1
-161
lines changed

hist/hist/test/test_THBinIterator.cxx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
#include "gtest/gtest.h"
22

3-
// Backward compatibility for gtest version < 1.10.0
4-
#ifndef INSTANTIATE_TEST_SUITE_P
5-
#define SetUpTestSuite SetUpTestCase
6-
#define TearDownTestSuite TearDownTestCase
7-
#endif
8-
93
// test iterating histogram bins and using the new THistRange and
104
// THBinIterator classes
115

@@ -451,4 +445,4 @@ int main(int argc, char **argv)
451445

452446

453447
return RUN_ALL_TESTS();
454-
}
448+
}

math/mathcore/test/stress/testGenVector.cxx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,6 @@
44

55
#include "gtest/gtest.h"
66

7-
// Backward compatibility for gtest version < 1.10.0
8-
#ifndef TYPED_TEST_SUITE_P
9-
#define TYPED_TEST_SUITE_P TYPED_TEST_CASE_P
10-
#endif
11-
// Backward compatibility for gtest version < 1.10.0
12-
#ifndef REGISTER_TYPED_TEST_SUITE_P
13-
#define REGISTER_TYPED_TEST_SUITE_P REGISTER_TYPED_TEST_CASE_P
14-
#endif
15-
// Backward compatibility for gtest version < 1.10.0
16-
#ifndef INSTANTIATE_TYPED_TEST_SUITE_P
17-
#define INSTANTIATE_TYPED_TEST_SUITE_P INSTANTIATE_TYPED_TEST_CASE_P
18-
#endif
19-
207
#include "StatFunction.h"
218
#include "TestHelper.h"
229
#include "VectorTest.h"

math/mathcore/test/stress/testSMatrix.cxx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,6 @@
77
#include "TestHelper.h"
88
#include "gtest/gtest.h"
99

10-
// Backward compatibility for gtest version < 1.10.0
11-
#ifndef TYPED_TEST_SUITE_P
12-
#define TYPED_TEST_SUITE_P TYPED_TEST_CASE_P
13-
#endif
14-
// Backward compatibility for gtest version < 1.10.0
15-
#ifndef REGISTER_TYPED_TEST_SUITE_P
16-
#define REGISTER_TYPED_TEST_SUITE_P REGISTER_TYPED_TEST_CASE_P
17-
#endif
18-
// Backward compatibility for gtest version < 1.10.0
19-
#ifndef INSTANTIATE_TYPED_TEST_SUITE_P
20-
#define INSTANTIATE_TYPED_TEST_SUITE_P INSTANTIATE_TYPED_TEST_CASE_P
21-
#endif
22-
2310
#include "VectorTest.h"
2411
#include "TROOT.h"
2512
#include "TSystem.h"

math/mathcore/test/stress/testVector.cxx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,6 @@
44

55
#include "gtest/gtest.h"
66

7-
// Backward compatibility for gtest version < 1.10.0
8-
#ifndef TYPED_TEST_SUITE_P
9-
#define TYPED_TEST_SUITE_P TYPED_TEST_CASE_P
10-
#endif
11-
// Backward compatibility for gtest version < 1.10.0
12-
#ifndef REGISTER_TYPED_TEST_SUITE_P
13-
#define REGISTER_TYPED_TEST_SUITE_P REGISTER_TYPED_TEST_CASE_P
14-
#endif
15-
// Backward compatibility for gtest version < 1.10.0
16-
#ifndef INSTANTIATE_TYPED_TEST_SUITE_P
17-
#define INSTANTIATE_TYPED_TEST_SUITE_P INSTANTIATE_TYPED_TEST_CASE_P
18-
#endif
19-
207
#include "StatFunction.h"
218
#include "TestHelper.h"
229
#include "VectorTest.h"

math/mathcore/test/stress/testVector34.cxx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,6 @@
44

55
#include "gtest/gtest.h"
66

7-
// Backward compatibility for gtest version < 1.10.0
8-
#ifndef TYPED_TEST_SUITE_P
9-
#define TYPED_TEST_SUITE_P TYPED_TEST_CASE_P
10-
#endif
11-
// Backward compatibility for gtest version < 1.10.0
12-
#ifndef REGISTER_TYPED_TEST_SUITE_P
13-
#define REGISTER_TYPED_TEST_SUITE_P REGISTER_TYPED_TEST_CASE_P
14-
#endif
15-
// Backward compatibility for gtest version < 1.10.0
16-
#ifndef INSTANTIATE_TYPED_TEST_SUITE_P
17-
#define INSTANTIATE_TYPED_TEST_SUITE_P INSTANTIATE_TYPED_TEST_CASE_P
18-
#endif
19-
207
#include "StatFunction.h"
218
#include "VectorTest.h"
229

math/mathcore/test/testGradient.cxx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@
2222

2323
#include "gtest/gtest.h"
2424

25-
// Backward compatibility for gtest version < 1.10.0
26-
#ifndef TYPED_TEST_SUITE
27-
#define TYPED_TEST_SUITE TYPED_TEST_CASE
28-
#endif
29-
3025
#include <chrono>
3126
#include <iostream>
3227
#include <string>

math/mathcore/test/testGradientFitting.cxx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,6 @@
1313

1414
#include "gtest/gtest.h"
1515

16-
// Backward compatibility for gtest version < 1.10.0
17-
#ifndef TYPED_TEST_SUITE_P
18-
#define TYPED_TEST_SUITE_P TYPED_TEST_CASE_P
19-
#endif
20-
// Backward compatibility for gtest version < 1.10.0
21-
#ifndef REGISTER_TYPED_TEST_SUITE_P
22-
#define REGISTER_TYPED_TEST_SUITE_P REGISTER_TYPED_TEST_CASE_P
23-
#endif
24-
// Backward compatibility for gtest version < 1.10.0
25-
#ifndef INSTANTIATE_TYPED_TEST_SUITE_P
26-
#define INSTANTIATE_TYPED_TEST_SUITE_P INSTANTIATE_TYPED_TEST_CASE_P
27-
#endif
28-
2916
#include <iostream>
3017
#include <string>
3118

math/mathmore/test/testStress.cxx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,6 @@
2626

2727
#include "gtest/gtest.h"
2828

29-
// Backward compatibility for gtest version < 1.10.0
30-
#ifndef TYPED_TEST_SUITE_P
31-
#define TYPED_TEST_SUITE_P TYPED_TEST_CASE_P
32-
#endif
33-
// Backward compatibility for gtest version < 1.10.0
34-
#ifndef REGISTER_TYPED_TEST_SUITE_P
35-
#define REGISTER_TYPED_TEST_SUITE_P REGISTER_TYPED_TEST_CASE_P
36-
#endif
37-
// Backward compatibility for gtest version < 1.10.0
38-
#ifndef INSTANTIATE_TYPED_TEST_SUITE_P
39-
#define INSTANTIATE_TYPED_TEST_SUITE_P INSTANTIATE_TYPED_TEST_CASE_P
40-
#endif
41-
4229
using ::testing::TestWithParam;
4330
using ::testing::Values;
4431

math/vecops/test/vecops_rvec.cxx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@
1313
#include <sstream>
1414
#include <cmath>
1515

16-
// Backward compatibility for gtest version < 1.10.0
17-
#ifndef INSTANTIATE_TEST_SUITE_P
18-
#define INSTANTIATE_TEST_SUITE_P INSTANTIATE_TEST_CASE_P
19-
#endif
20-
2116
using namespace ROOT;
2217
using namespace ROOT::VecOps;
2318
using namespace ROOT::Detail::VecOps; // for `IsSmall` and `IsAdopting`

roofit/multiprocess/test/test_Job.cxx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@
2525

2626
#include "gtest/gtest.h"
2727

28-
// Backward compatibility for gtest version < 1.10.0
29-
#ifndef INSTANTIATE_TEST_SUITE_P
30-
#define INSTANTIATE_TEST_SUITE_P INSTANTIATE_TEST_CASE_P
31-
#endif
32-
3328
#include "utils.h"
3429

3530
class xSquaredPlusBVectorSerial {

0 commit comments

Comments
 (0)