Skip to content

Commit 5690885

Browse files
committed
Unit test for #9029
1 parent f49a2c9 commit 5690885

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

core/meta/test/testTClass.cxx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#include "TClass.h"
22
#include "THashTable.h"
33
#include "TInterpreter.h"
4+
#include "TSystem.h"
5+
6+
#include <ROOT/TSeq.hxx>
47

58
#include "gtest/gtest.h"
69

@@ -22,3 +25,24 @@ TEST(TClass, DictCheck)
2225

2326
EXPECT_STREQ(errMsg.c_str(), "Missing dictionary for C, ") << errMsg;
2427
}
28+
29+
// This test is for issue #9029
30+
TEST(TClass, GetClassWithFundType)
31+
{
32+
ProcInfo_t info;
33+
gSystem->GetProcInfo(&info);
34+
auto start_mem = info.fMemResident;
35+
36+
constexpr auto name = "std::vector<int>::value_type";
37+
TClass *cl = nullptr;
38+
for (auto i : ROOT::TSeqI(8192)) {
39+
cl = TClass::GetClass(name);
40+
i = (int)i; // avoids unused variable warning
41+
}
42+
43+
gSystem->GetProcInfo(&info);
44+
auto end_mem = info.fMemResident;
45+
46+
EXPECT_TRUE(nullptr == cl);
47+
EXPECT_NEAR(start_mem, end_mem, 16384);
48+
}

0 commit comments

Comments
 (0)