@@ -102,36 +102,36 @@ func myRegexpMethodsTests() throws {
102102
103103 // --- Regex ---
104104
105- _ = try regex. firstMatch ( in: input)
106- _ = try regex. prefixMatch ( in: input)
107- _ = try regex. wholeMatch ( in: input)
105+ _ = try regex. firstMatch ( in: input) // $ regex=regex input=input
106+ _ = try regex. prefixMatch ( in: input) // $ regex=regex input=input
107+ _ = try regex. wholeMatch ( in: input) // $ regex=regex input=input
108108
109- // --- RangeReeplaceableCollection ---
109+ // --- RangeReplaceableCollection ---
110110
111111 var inputVar = input
112- inputVar. replace ( regex, with: " " ) Var
113- _ = input. replacing ( regex, with: " " )
114- inputVar. trimPrefix ( regex) Var
112+ inputVar. replace ( regex, with: " " ) // $ regex=regex input=&...
113+ _ = input. replacing ( regex, with: " " ) // $ regex=regex input=input
114+ inputVar. trimPrefix ( regex) // $ regex=regex input=&...
115115
116116 // --- StringProtocol ---
117117
118- _ = input. range ( of: " .* " , options: . regularExpression, range: nil , locale: nil )
119- _ = input. replacingOccurrences ( of: " .* " , with: " " , options: . regularExpression)
118+ _ = input. range ( of: " .* " , options: . regularExpression, range: nil , locale: nil ) // $ MISSING: regex=regex input=input
119+ _ = input. replacingOccurrences ( of: " .* " , with: " " , options: . regularExpression) // $ MISSING: regex=regex input=input
120120
121121 // --- NSRegularExpression ---
122122
123123 let nsregex = try NSRegularExpression ( pattern: " .* " )
124- _ = nsregex. numberOfMatches ( in: input, options: [ ] , range: NSRange ( location: 0 , length: input. utf16. count) )
125- nsregex. enumerateMatches ( in: input, range: NSMakeRange ( 0 , input. utf16. count) , using: { a, b, c in } )
126- _ = nsregex. matches ( in: input, range: NSMakeRange ( 0 , input. utf16. count) )
127- _ = nsregex. firstMatch ( in: input, range: NSMakeRange ( 0 , input. utf16. count) )
128- _ = nsregex. rangeOfFirstMatch ( in: input, range: NSMakeRange ( 0 , input. utf16. count) )
129- _ = nsregex. replaceMatches ( in: NSMutableString ( string: input) , range: NSMakeRange ( 0 , input. utf16. count) , withTemplate: " " )
130- _ = nsregex. stringByReplacingMatches ( in: input, range: NSMakeRange ( 0 , input. utf16. count) , withTemplate: " " )
124+ _ = nsregex. numberOfMatches ( in: input, options: [ ] , range: NSRange ( location: 0 , length: input. utf16. count) ) // $ regex=nsregex input=input
125+ nsregex. enumerateMatches ( in: input, range: NSMakeRange ( 0 , input. utf16. count) , using: { a, b, c in } ) // $ regex=nsregex input=input
126+ _ = nsregex. matches ( in: input, range: NSMakeRange ( 0 , input. utf16. count) ) // $ regex=nsregex input=input
127+ _ = nsregex. firstMatch ( in: input, range: NSMakeRange ( 0 , input. utf16. count) ) // $ regex=nsregex input=input
128+ _ = nsregex. rangeOfFirstMatch ( in: input, range: NSMakeRange ( 0 , input. utf16. count) ) // $ regex=nsregex input=input
129+ _ = nsregex. replaceMatches ( in: NSMutableString ( string: input) , range: NSMakeRange ( 0 , input. utf16. count) , withTemplate: " " ) // $ regex=nsregex input="call to NSString.init(string:)"
130+ _ = nsregex. stringByReplacingMatches ( in: input, range: NSMakeRange ( 0 , input. utf16. count) , withTemplate: " " ) // $ regex=nsregex input=input
131131
132132 // --- NSString ---
133133
134134 let inputNS = NSString ( string: " abcdef " )
135- _ = inputNS. range ( of: " * " , options: . regularExpression)
136- _ = inputNS. replacingOccurrences ( of: " .* " , with: " " , options: . regularExpression, range: NSMakeRange ( 0 , inputNS. length) )
135+ _ = inputNS. range ( of: " * " , options: . regularExpression) // $ MISSING: regex=nsregex input=inputNS
136+ _ = inputNS. replacingOccurrences ( of: " .* " , with: " " , options: . regularExpression, range: NSMakeRange ( 0 , inputNS. length) ) // $ MISSING: regex=nsregex input=inputNS
137137}
0 commit comments