diff --git a/vsintegration/tests/unittests/SignatureHelpProviderTests.fs b/vsintegration/tests/unittests/SignatureHelpProviderTests.fs index 670851cb03d..5588dee1cb1 100644 --- a/vsintegration/tests/unittests/SignatureHelpProviderTests.fs +++ b/vsintegration/tests/unittests/SignatureHelpProviderTests.fs @@ -71,13 +71,13 @@ System.Console.WriteLine(format="Hello, {0}",arg0="World") [(".", None); ("System", None); ("WriteLine", None); - ("(", Some ("[5..62)", 0, 2, Some "format")); - ("format", Some ("[5..62)", 0, 2, Some "format")); + ("(", Some ("[7..64)", 0, 2, Some "format")); + ("format", Some ("[7..64)", 0, 2, Some "format")); (",", None); - ("""",""", Some ("[5..62)", 1, 2, Some "arg0")); - ("arg0", Some ("[5..62)", 1, 2, Some "arg0")); - ("arg0=", Some ("[5..62)", 1, 2, Some "arg0")); - ("World", Some ("[5..62)", 1, 2, Some "arg0")); + ("""",""", Some ("[7..64)", 1, 2, Some "arg0")); + ("arg0", Some ("[7..64)", 1, 2, Some "arg0")); + ("arg0=", Some ("[7..64)", 1, 2, Some "arg0")); + ("World", Some ("[7..64)", 1, 2, Some "arg0")); (")", None)]); ( """ //2 @@ -85,9 +85,9 @@ open System Console.WriteLine([(1,2)]) """, [ - ("WriteLine(", Some ("[17..42)", 0, 0, None)); + ("WriteLine(", Some ("[20..45)", 0, 0, None)); (",", None); - ("[(", Some ("[17..42)", 0, 1, None)) + ("[(", Some ("[20..45)", 0, 1, None)) ]); ( """ //3 @@ -97,21 +97,21 @@ type foo3 = N1.T type foo4 = N1.T type foo5 = N1.T """, - [("type foo = N1.T<", Some ("[16..22)", 0, 0, None)); - ("type foo2 = N1.T<", Some ("[37..50)", 0, 0, Some "Param1")); - ("type foo2 = N1.T | None -> None | Some (results,applicableSpan,argumentIndex,argumentCount,argumentName) -> Some (applicableSpan.ToString(),argumentIndex,argumentCount,argumentName) - if expected <> actual then Assert.Fail(sprintf "FSharpCompletionProvider.ProvideMethodsAsyncAux() gave unexpected results, expected %A, got %A" expected actual) - - yield (marker, actual) ] - () - // Use this to print out data to update the test cases, after uncommenting the assert - //printfn "(\"\"\"%s\n\"\"\",\n%s)" fileContents ((sprintf "%A" actual).Replace("null","None")) + if expected <> actual then + sb.AppendLine(sprintf "FSharpCompletionProvider.ProvideMethodsAsyncAux() gave unexpected results, expected %A, got %A" expected actual) |> ignore + yield (marker, actual) ] + printfn "(\"\"\"%s\n\"\"\",\n%s)" fileContents ((sprintf "%A" actual).Replace("null","None")) + + + match sb.ToString() with + | "" -> () + | errorText -> Assert.Fail errorText