File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 7
7
8
8
from pygccxml import parser
9
9
from pygccxml import declarations
10
+ from pygccxml import utils
10
11
11
12
12
13
class tester_t (parser_test_case .parser_test_case_t ):
@@ -46,10 +47,18 @@ def test(self):
46
47
if isinstance (decl , declarations .calldef .constructor_t ):
47
48
ctors .append (decl )
48
49
50
+ # GCCXML and CastXML return the constructors in a different order.
51
+ # I hope this index inversion will cover the two cases. If different
52
+ # compilers give other orders, we will need to find a nicer solution.
53
+ if "CastXML" in utils .xml_generator :
54
+ positions = [0 , 1 ]
55
+ elif "GCC" in utils .xml_generator :
56
+ positions = [1 , 0 ]
57
+
49
58
# test2::test2() [constructor]
50
- self .assertFalse (ctors [0 ].is_copy_constructor )
59
+ self .assertFalse (ctors [positions [ 0 ] ].is_copy_constructor )
51
60
# test2::test2(test2 const & arg0) [copy constructor]
52
- self .assertTrue (ctors [1 ].is_copy_constructor )
61
+ self .assertTrue (ctors [positions [ 1 ] ].is_copy_constructor )
53
62
54
63
55
64
def create_suite ():
You can’t perform that action at this time.
0 commit comments