@@ -55,14 +55,24 @@ def test_basic(self):
55
55
self .assertEqual (len (step_in_targets ), 3 , "expect 3 step in targets" )
56
56
57
57
# Verify the target names are correct.
58
- self .assertEqual (step_in_targets [0 ]["label" ], "bar()" , "expect bar()" )
59
- self .assertEqual (step_in_targets [1 ]["label" ], "bar2()" , "expect bar2()" )
60
- self .assertEqual (
61
- step_in_targets [2 ]["label" ], "foo(int, int)" , "expect foo(int, int)"
62
- )
58
+ # The order of funcA and funcB may change depending on the compiler ABI.
59
+ funcA_target = None
60
+ funcB_target = None
61
+ for target in step_in_targets [0 :2 ]:
62
+ if "funcB" in target ["label" ]:
63
+ funcB_target = target
64
+ elif "funcA" in target ["label" ]:
65
+ funcA_target = target
66
+ else :
67
+ self .fail (f"Unexpected step in target: { target } " )
68
+
69
+ self .assertIsNotNone (funcA_target , "expect funcA" )
70
+ self .assertIsNotNone (funcB_target , "expect funcB" )
71
+ self .assertIn ("foo" , step_in_targets [2 ]["label" ], "expect foo" )
63
72
64
- # Choose to step into second target and verify that we are in bar2()
73
+ # Choose to step into second target and verify that we are in the second target,
74
+ # be it funcA or funcB.
65
75
self .stepIn (threadId = tid , targetId = step_in_targets [1 ]["id" ], waitForStop = True )
66
76
leaf_frame = self .dap_server .get_stackFrame ()
67
77
self .assertIsNotNone (leaf_frame , "expect a leaf frame" )
68
- self .assertEqual (leaf_frame [ "name " ], "bar2()" )
78
+ self .assertEqual (step_in_targets [ 1 ][ "label " ], leaf_frame [ "name" ] )
0 commit comments