Skip to content

Commit

Permalink
[cling] add regression test for issue root-project#7955
Browse files Browse the repository at this point in the history
  • Loading branch information
silverweed committed Aug 16, 2024
1 parent a1310c3 commit 6e20bb8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/metacling/test/TClingTests.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "TInterpreter.h"
#include "TROOT.h"
#include "TSystem.h"
#include "TMethod.h"
#include "TMethodArg.h"

#include "gmock/gmock.h"

Expand Down Expand Up @@ -274,3 +276,13 @@ TEST_F(TClingTests, ROOT10499) {
EXPECT_EQ((void*)&errno, (void*)gInterpreter->Calc("&errno"));
#endif
}

// https://github.com/root-project/root/issues/7955
TEST(ClingAST, Issue7955)
{
auto cls = TClass::GetClass("std::vector<int>");
auto meth = cls->GetMethodWithPrototype("operator[]","int",true, ROOT::kConversionMatch);
auto args = meth->GetListOfMethodArgs();
auto methArg = dynamic_cast<TMethodArg*>(args->First());
EXPECT_STREQ(methArg->GetTypeName(), "vector<int>::size_type");
}

0 comments on commit 6e20bb8

Please sign in to comment.