File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 21
21
// test was to do any of the above, there would be two copies of functions around (in libCling.so and the test binary)
22
22
// with not much guarantees which ones are called at which moment.
23
23
24
+ #include < DllImport.h>
24
25
#include < ROOT/FoundationUtils.hxx>
25
26
26
27
#include " gtest/gtest.h"
@@ -90,3 +91,13 @@ TEST(TClingUtilsTests, GetRealPath)
90
91
std::remove (" ./realfile2" );
91
92
#endif // not R__WIN32
92
93
}
94
+
95
+ // Forward-declare gCling to not include TInterpreter.h just for checking that the interpreter has not been initialized.
96
+ class TInterpreter ;
97
+ R__EXTERN TInterpreter *gCling ;
98
+
99
+ class InterpreterCheck : public testing ::Environment {
100
+ void TearDown () override { ASSERT_EQ (gCling , nullptr ); }
101
+ };
102
+
103
+ testing::Environment *gInterpreterCheck = testing::AddGlobalTestEnvironment(new InterpreterCheck);
You can’t perform that action at this time.
0 commit comments