@@ -26,23 +26,54 @@ def setUp(self):
26
26
self .main_source = "main.swift"
27
27
self .main_source_spec = lldb .SBFileSpec (self .main_source )
28
28
29
- @skipIf (bugnumber = "rdar://106107613" )
30
29
@swiftTest
31
- def test_swift_regex (self ):
32
- """Test Swift's regex support"""
30
+ @skipIf (macos_version = ["<" , "13" ])
31
+ def test_swift_regex_frame_var (self ):
32
+ """Test frame variable support for Swift regexes."""
33
33
self .build ()
34
34
lldbutil .run_to_source_breakpoint (
35
35
self , 'Set breakpoint here' , self .main_source_spec )
36
36
self .expect ('v regex' ,
37
37
substrs = ['_StringProcessing.Regex<(Substring, Substring, Substring, Substring)>) regex = {' ])
38
- self .expect ('po regex' ,
39
- substrs = ['Regex<(Substring, Substring, Substring, Substring)>' ])
40
-
41
38
self .expect ('v dslRegex' ,
42
39
substrs = ['(_StringProcessing.Regex<Substring>) dslRegex = {' ])
43
- self .expect ('po dslRegex' ,
40
+
41
+ @swiftTest
42
+ @skipIf (macos_version = ["<" , "13" ])
43
+ def test_swift_regex_expr_desc (self ):
44
+ """Test expression object description support for Swift regexes."""
45
+ self .build ()
46
+ lldbutil .run_to_source_breakpoint (
47
+ self , 'Set breakpoint here' , self .main_source_spec )
48
+ self .expect ('expr -O -- regex' ,
49
+ substrs = ['Regex<(Substring, Substring, Substring, Substring)>' ])
50
+ self .expect ('expr -O -- dslRegex' ,
44
51
substrs = ['Regex<Substring>' ])
45
52
53
+ @swiftTest
54
+ @skipIf (macos_version = ["<" , "13" ])
55
+ def test_swift_regex_frame_var_desc (self ):
56
+ """Test frame variable object description support for Swift regexes."""
57
+ self .build ()
58
+ lldbutil .run_to_source_breakpoint (
59
+ self , 'Set breakpoint here' , self .main_source_spec )
60
+ self .expect ('vo regex' ,
61
+ substrs = ['Regex<(Substring, Substring, Substring, Substring)>' ])
62
+ self .expect ('vo dslRegex' ,
63
+ substrs = ['Regex<Substring>' ])
64
+
65
+ @swiftTest
66
+ @skipIf (macos_version = ["<" , "13" ])
67
+ def test_swift_regex_expr (self ):
68
+ """Test expression support for Swift regexes."""
69
+ self .build ()
70
+ lldbutil .run_to_source_breakpoint (
71
+ self , 'Set breakpoint here' , self .main_source_spec )
72
+ self .expect ('expr regex' ,
73
+ substrs = ['_StringProcessing.Regex<(Substring, Substring, Substring, Substring)>) $R0 = {' ])
74
+ self .expect ('expr dslRegex' ,
75
+ substrs = ['(_StringProcessing.Regex<Substring>) $R1 = {' ])
76
+
46
77
@swiftTest
47
78
@skipIf (macos_version = ["<" , "13" ])
48
79
def test_swift_regex_in_exp (self ):
0 commit comments