Skip to content

Commit ec6ef3d

Browse files
Unit test simplification
Co-authored-by: Jannick Kremer <[email protected]>
1 parent 427c071 commit ec6ef3d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

clang/bindings/python/tests/cindex/test_type.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -549,11 +549,8 @@ class A : public home::Foo {
549549
};
550550
"""
551551
tu = get_tu(source, lang="cpp")
552-
c = get_cursor(tu, "A")
553-
pp = PrintingPolicy.create(c)
554-
base = list(c.get_children())[0].type.get_declaration()
555-
set_it = list(base.get_children())[1]
556-
arg = list(set_it.get_arguments())[0]
552+
arg = next(get_cursor(tu, "setIt").get_arguments())
553+
pp = PrintingPolicy.create(arg)
557554
self.assertEqual(arg.type.get_fully_qualified_name(pp), "home::Bar *")
558555
self.assertEqual(arg.type.get_fully_qualified_name(pp, True), "::home::Bar *")
559556

0 commit comments

Comments
 (0)