Skip to content

Commit 86463c6

Browse files
committed
[roottest] Attempt at removing no longer needed header guards to fix failing tests
1 parent c7b301a commit 86463c6

File tree

15 files changed

+19
-40
lines changed

15 files changed

+19
-40
lines changed

roottest/cling/const/constissue.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class TriggerCharacterizer {
1616
trigger_counting_map m_map;
1717
};
1818

19-
#ifdef __CLING__
19+
//#ifdef __CLING__
2020
//#pragma link C++ class TriggerCharacterizer::trigger_counting_map;
21-
#endif
21+
//#endif
2222

2323
void constissue() {}

roottest/cling/dict/algebra3

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
namespace aux {
2020

21-
#ifndef __CLING__
2221
using std::size_t;
2322
using std::complex;
2423
using std::istream;
@@ -32,7 +31,6 @@ namespace aux {
3231
using std::sin;
3332
// using std::conj;
3433
using std::norm;
35-
#endif /* __CLING__ */
3634

3735
/* ****************** algebra3.h begins here ****************** */
3836

@@ -710,7 +708,6 @@ namespace aux {
710708
// Implementation
711709
//
712710

713-
#ifndef __CLING__
714711

715712
/****************************************************************
716713
* *
@@ -1999,7 +1996,6 @@ namespace aux {
19991996
((_Tp)0), ((_Tp)0), ((_Tp)1), ((_Tp)0),
20001997
((_Tp)0), ((_Tp)0), ((_Tp)1) / d, ((_Tp)0)); }
20011998

2002-
#endif /* __CLING__ */
20031999

20042000
/* ******************* algebra3.h ends here ******************* */
20052001

@@ -2041,7 +2037,6 @@ namespace aux {
20412037
template<typename _Tp> mat3<_Tp> ExtractRotation(const mat4<_Tp>& pose); // extract rotation matrix from transformation matrix
20422038
template<typename _Tp> typename rtti<_Tp>::value_type PointToPlane(const vec3<_Tp>& point, const vec4<_Tp>& plane); // unsigned distance from a point to a plane (3D)
20432039

2044-
#ifndef __CLING__
20452040

20462041
//
20472042
// rotation2D -- convert 2x2 rotation matrix to 3x3
@@ -2176,7 +2171,6 @@ namespace aux {
21762171
return dist;
21772172
}
21782173

2179-
#endif /* __CLING__ */
21802174

21812175
#ifdef fmin
21822176
#undef fmin // allow as function names

roottest/cling/dict/runoperators.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if defined(__CLING__) && !defined(__ROOTCLING__)
1+
#if defined(__CLING__) && !defined(__ROOTCLING__) && !defined(ClingWorkAroundMissingSmartInclude)
22
#include "operators_dict.h+"
33
#else
44
#include "operators.h"

roottest/cling/function/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ ROOTTEST_ADD_TEST(runoverloadResolution
77
ROOTTEST_ADD_TEST(rundefaultParams
88
MACRO rundefaultParams.C
99
OUTREF defaultParams.ref
10-
WILLFAIL
1110
LABELS roottest regression cling)
1211

1312
ROOTTEST_ADD_TEST(execrefDefaultParams

roottest/cling/function/Params.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef PARAMS_H
2+
#define PARAMS_H
3+
14
int gCountingCalls = 0;
25

36
class Base {
@@ -6,7 +9,7 @@ class Base {
69
virtual ~Base(){};
710
virtual void FunctionX(int b=0, int c=5) {printf("%s: Base::FunctionX(int b=%d, int c=%d)\n", fMode, b, c);}
811

9-
void CINTCannotHandleDefaultArgThatsNotYetParsed(int a = GetCountingCalls()) {};
12+
void CINTCannotHandleDefaultArgThatsNotYetParsed(int a = GetCountingCalls()) {(void)a; };
1013
static int GetCountingCalls() {return ++fgCountingCalls;}
1114
virtual void FunctionY(int arg0 = ++gCountingCalls, float arg1 = Base::GetCountingCalls() ) {
1215
printf("%s: Base::FunctionY(int arg0=%d, float arg1=%d.)\n", fMode, arg0, (int)arg1);}
@@ -22,7 +25,9 @@ class Derived: public Base {
2225
public:
2326
Derived(const char* mode = ""): Base(mode){};
2427
virtual ~Derived(){};
25-
virtual void FunctionX(int b=1, int c=6) {printf("%s: Derived::FunctionX(int b=%d, int c=%d)\n", fMode, b, c);}
26-
virtual void FunctionY(int arg0 = ++gCountingCalls, float arg1 = Base::GetCountingCalls() ) {
28+
void FunctionX(int b=1, int c=6) override {printf("%s: Derived::FunctionX(int b=%d, int c=%d)\n", fMode, b, c);}
29+
void FunctionY(int arg0 = ++gCountingCalls, float arg1 = Base::GetCountingCalls() ) override {
2730
printf("%s: Derived::FunctionY(int arg0=%d, float arg1=%d.)\n", fMode, arg0, (int)arg1);}
2831
};
32+
33+
#endif

roottest/cling/function/testDefaultParams.C

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#ifndef __CLING__
21
#include "Params.h"
3-
#endif
42

53
void testDefaultParams(const char* mode) {
64
// One object of type Base and one of type derived

roottest/cling/operator/equal.C

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,16 @@ public:
5656
class withHiddenRef : public top {
5757
withHiddenRef &operator=(const withHiddenRef&); // intentionally NOT implemented
5858
int a;
59-
#ifndef __CLING__
59+
#ifdef __CLING__
60+
public:
61+
withHiddenRef(int &) {};
62+
#else
6063
const int &ref;
6164
int &ref2;
62-
#endif
6365
public:
6466
withHiddenRef(int &p) : ref(p),ref2(p) {};
67+
#endif
68+
6569
};
6670

6771
#ifdef __CLING__
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
gSystem->Setenv("LINES","-1");
33
gROOT->ProcessLine(".L operatorEqual.C+");
4-
#ifdef __CLING__
5-
gROOT->ProcessLine(".class StThreeVector");
6-
#else
74
gROOT->ProcessLine(".Class StThreeVector<>");
8-
#endif
95
}

roottest/root/fit/linear/runstoring.C

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
void writefitter()
88
{
9-
#ifdef __CLING__
10-
G__SetCatchException(0);
11-
#endif
129
Int_t npoints = 100;
1310
Int_t ndim = 3;
1411
TFormula *f = new TFormula("f", "x[0]++x[1]++x[2]");
@@ -43,9 +40,6 @@ void writefitter()
4340

4441
void readfitter()
4542
{
46-
#ifdef __CLING__
47-
// G__SetCatchException(0);
48-
#endif
4943
TVectorD vect;
5044
TFile *f = TFile::Open("linfitter.root");
5145
if (!f) return;
@@ -102,9 +96,6 @@ void readfitter()
10296

10397
void writeformula()
10498
{
105-
#ifdef __CLING__
106-
G__SetCatchException(0);
107-
#endif
10899
TFormula *f = new TFormula("ffffff", "x[0]++x[1]++x[2]");
109100

110101
TFile *file = TFile::Open("formula.root", "RECREATE");

roottest/root/io/buffer/runownership.C

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include "TString.h"
44
#include <exception>
55

6-
#ifndef __CLING__
76
class myexception
87
{
98
public:
@@ -15,7 +14,6 @@ class myexception
1514
return fMsg.Data();
1615
}
1716
};
18-
#endif
1917

2018
void NonDefaultErrorHandler(Int_t level, Bool_t abort_bool, const char *location, const char *msg)
2119
{

0 commit comments

Comments
 (0)