@@ -11,43 +11,18 @@ def test(self):
11
11
target = lldbutil .run_to_breakpoint_make_target (self )
12
12
bp = target .BreakpointCreateForException (lldb .eLanguageTypeSwift , False , True )
13
13
14
- log_file = self .getBuildArtifact ("symbol.log" )
15
- self .runCmd (f"log enable lldb symbol -f { log_file } " )
16
-
17
14
# First breakpoint in an untyped throws function.
18
15
_ , process , _ , _ = lldbutil .run_to_breakpoint_do_run (self , target , bp )
19
16
thread = process .selected_thread
20
17
stop_desc = thread .GetStopDescription (128 )
21
- # self.assertEqual(stop_desc, "Swift exception breakpoint")
18
+ self .assertEqual (stop_desc , "Swift exception breakpoint" )
22
19
self .assertEqual (thread .frame [0 ].symbol .name , "swift_willThrow" )
23
- # self.assertEqual(thread.selected_frame.idx, 1)
24
- if thread .selected_frame .idx != 1 :
25
- r = lldb .SBCommandReturnObject ()
26
- self .ci .HandleCommand ("frame recognizer list" , r )
27
- info = r .GetOutput ()
28
- r = lldb .SBCommandReturnObject ()
29
- self .ci .HandleCommand ("frame recognizer info 0" , r )
30
- info += r .GetOutput ()
31
- with open (log_file ) as f :
32
- log_lines = f .readlines ()
33
- info += "" .join (line for line in log_lines if "recognize" in line )
34
- self .assertIn ("qowieoiuqweoiq" , info )
20
+ self .assertEqual (thread .selected_frame .idx , 1 )
35
21
36
22
# Second breakpoint in an typed throws function.
37
23
process .Continue ()
38
24
thread = process .selected_thread
39
25
stop_desc = thread .GetStopDescription (128 )
40
- # self.assertEqual(stop_desc, "Swift exception breakpoint")
26
+ self .assertEqual (stop_desc , "Swift exception breakpoint" )
41
27
self .assertEqual (thread .frame [0 ].symbol .name , "swift_willThrowTypedImpl" )
42
- # self.assertEqual(thread.selected_frame.idx, 2)
43
- if thread .selected_frame .idx != 2 :
44
- r = lldb .SBCommandReturnObject ()
45
- self .ci .HandleCommand ("frame recognizer list" , r )
46
- info = r .GetOutput ()
47
- r = lldb .SBCommandReturnObject ()
48
- self .ci .HandleCommand ("frame recognizer info 0" , r )
49
- info += r .GetOutput ()
50
- with open (log_file ) as f :
51
- log_lines = f .readlines ()
52
- info += "" .join (line for line in log_lines if "recognize" in line )
53
- self .assertIn ("qowieoiuqweoiq" , info )
28
+ self .assertEqual (thread .selected_frame .idx , 2 )
0 commit comments