File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
clang/bindings/python/tests/cindex Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -69,14 +69,11 @@ def test_all_variants(self):
69
69
enum_variant_map = {}
70
70
# For all enums in self.enums, extract all enum variants defined in Index.h
71
71
for cursor in tu .cursor .walk_preorder ():
72
- type_class = cenum_to_pythonenum .get (cursor .type .spelling )
73
- if (
74
- cursor .kind == CursorKind .ENUM_CONSTANT_DECL
75
- and type_class in self .enums
76
- ):
77
- if type_class not in enum_variant_map :
78
- enum_variant_map [type_class ] = []
79
- enum_variant_map [type_class ].append (cursor .enum_value )
72
+ python_enum = cenum_to_pythonenum .get (cursor .type .spelling )
73
+ if cursor .kind == CursorKind .ENUM_CONSTANT_DECL :
74
+ if python_enum not in enum_variant_map :
75
+ enum_variant_map [python_enum ] = []
76
+ enum_variant_map [python_enum ].append (cursor .enum_value )
80
77
81
78
for enum in self .enums :
82
79
with self .subTest (enum ):
You can’t perform that action at this time.
0 commit comments