Skip to content

Commit 9f68acf

Browse files
sudo-pandavgvassilev
authored andcommitted
Add test for IsConstMethod
1 parent b6732fb commit 9f68acf

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

unittests/InterOp/FunctionReflectionTest.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,3 +602,20 @@ TEST(FunctionReflectionTest, GetFunctionCallWrapper) {
602602
EXPECT_EQ(ret, i * i);
603603
EXPECT_EQ(output, s);
604604
}
605+
606+
TEST(FunctionReflectionTest, DISABLED_IsConstMethod) {
607+
std::vector<Decl*> Decls, SubDecls;
608+
std::string code = R"(
609+
class C {
610+
void f1() const {}
611+
void f2() {}
612+
};
613+
)";
614+
615+
GetAllTopLevelDecls(code, Decls);
616+
GetAllSubDecls(Decls[0], SubDecls);
617+
618+
// EXPECT_TRUE(InterOp::IsConstMethod(SubDecls[1])); // f1
619+
// EXPECT_FALSE(InterOp::IsConstMethod(SubDecls[2])); // f2
620+
}
621+

0 commit comments

Comments
 (0)