@@ -161,26 +161,23 @@ let main argv =
161161 0 // return an integer exit code"""
162162 this.VerifyBraceMatch( code, " (printfn" , " )endBrace" )
163163
164- [<TestCase( " let a1 = [ 0 .. 100 ]" , [| 9 ; 10 ; 20 ; 21 |]) >]
165- [<TestCase( " let a2 = [| 0 .. 100 |]" , [| 9 ; 10 ; 11 ; 21 ; 22 ; 23 |]) >]
166- [<TestCase( " let a3 = <@ 0 @>" , [| 9 ; 10 ; 11 ; 14 ; 15 ; 16 |]) >]
167- [<TestCase( " let a4 = <@@ 0 @@>" , [| 9 ; 10 ; 11 ; 12 ; 15 ; 15 ; 16 ; 17 |]) >]
168- [<TestCase( " let a6 = ( () )" , [| 9 ; 10 ; 16 ; 17 |]) >]
169- [<TestCase( " [<ReflectedDefinition>]\n let a7 = 70" , [| 0 ; 1 ; 2 ; 21 ; 22 ; 23 |]) >]
170- [<TestCase( " let a8 = seq { yield() }" , [| 13 ; 14 ; 23 ; 24 |]) >]
171- member this.BraceMatchingBothSides_Bug2092 ( fileContents : string , matchingPositions : int []) =
172- // https://github.com/Microsoft/visualfsharp/issues/2092
164+ [<TestCase( " let a1 = [ 0 .. 100 ]" , [| 9 ; 20 |]) >]
165+ [<TestCase( " let a2 = [| 0 .. 100 |]" , [| 9 ; 10 ; 22 |]) >]
166+ [<TestCase( " let a3 = <@ 0 @>" , [| 9 ; 10 ; 15 |]) >]
167+ [<TestCase( " let a4 = <@@ 0 @@>" , [| 9 ; 10 ; 11 ; 15 ; 16 |]) >]
168+ [<TestCase( " let a6 = ( () )" , [| 9 ; 16 |]) >]
169+ [<TestCase( " [<ReflectedDefinition>]\n let a7 = 70" , [| 0 ; 1 ; 22 |]) >]
170+ [<TestCase( " let a8 = seq { yield() }" , [| 13 ; 23 |]) >]
171+ member this.DoNotMatchOnInnerSide ( fileContents : string , matchingPositions : int []) =
173172let sourceText = SourceText.From( fileContents)
174-
175173let parsingOptions , _ = checker.GetParsingOptionsFromProjectOptions projectOptions
176- matchingPositions
177- |> Array.iter ( fun position ->
174+
175+ for position in matchingPositions do
178176match FSharpBraceMatchingService.GetBraceMatchingResult( checker, sourceText, fileName, parsingOptions, position, " UnitTest" ) |> Async.RunSynchronouslywith
179177| Some_ -> ()
180178| None->
181179match positionwith
182180| 0 -> " "
183181| _ -> fileContents.[ position- 1 ] |> sprintf" (previous character '%c ')"
184- |> sprintf" Didn't find a matching brace at position '%d ', character ' %c ' % s" position fileContents .[ position ]
182+ |> sprintf" Didn't find a matching brace at position '%d '% s" position
185183|> Assert.Fail
186- )