@@ -55,14 +55,23 @@ 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 ()
65
- self .stepIn (threadId = tid , targetId = step_in_targets [ 1 ] ["id" ], waitForStop = True )
73
+ # Choose to step into second target and verify that we are in funcB ()
74
+ self .stepIn (threadId = tid , targetId = funcB_target ["id" ], waitForStop = True )
66
75
leaf_frame = self .dap_server .get_stackFrame ()
67
76
self .assertIsNotNone (leaf_frame , "expect a leaf frame" )
68
- self .assertEqual ( leaf_frame ["name" ], "bar2() " )
77
+ self .assertIn ( "funcB" , leaf_frame ["name" ], "expect funcB " )
0 commit comments