From 57359531fccd78b5eb00b2e89cd2b9e8164d764b Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Mon, 29 Jul 2019 08:28:47 +0200 Subject: [PATCH] Fix suggestion tests --- tests/fsharp/Compiler/ErrorMessages/ClassesTests.fs | 2 +- .../fsharp/Compiler/ErrorMessages/ConstructorTests.fs | 2 +- .../fsharp/Compiler/ErrorMessages/DontSuggestTests.fs | 2 +- .../Compiler/ErrorMessages/NameResolutionTests.fs | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/fsharp/Compiler/ErrorMessages/ClassesTests.fs b/tests/fsharp/Compiler/ErrorMessages/ClassesTests.fs index 1ce10cb7080..8fa8856d548 100644 --- a/tests/fsharp/Compiler/ErrorMessages/ClassesTests.fs +++ b/tests/fsharp/Compiler/ErrorMessages/ClassesTests.fs @@ -88,7 +88,7 @@ let x = } """ [| - FSharpErrorSeverity.Error, 767, (8, 14, 8, 34), "The member 'Function' does not correspond to any abstract or virtual method available to override or implement." + FSharpErrorSeverity.Error, 767, (8, 14, 8, 34), "The member 'Function' does not correspond to any abstract or virtual method available to override or implement. Maybe you want one of the following:\r\n MyFunction" FSharpErrorSeverity.Error, 17, (8, 19, 8, 27), "The member 'Function : 'a * 'b -> unit' does not have the correct type to override any given virtual method" FSharpErrorSeverity.Error, 366, (7, 3, 9, 4), "No implementation was given for those members: \r\n\t'abstract member IInterface.MyFunction : int32 * int32 -> unit'\r\n\t'abstract member IInterface.SomeOtherFunction : int32 * int32 -> unit'\r\nNote that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'." FSharpErrorSeverity.Error, 783, (7, 9, 7, 19), "At least one override did not correctly implement its corresponding abstract member" diff --git a/tests/fsharp/Compiler/ErrorMessages/ConstructorTests.fs b/tests/fsharp/Compiler/ErrorMessages/ConstructorTests.fs index 97aa66e60a4..d03747d8daf 100644 --- a/tests/fsharp/Compiler/ErrorMessages/ConstructorTests.fs +++ b/tests/fsharp/Compiler/ErrorMessages/ConstructorTests.fs @@ -47,7 +47,7 @@ let p = Age = 18) """ [| - FSharpErrorSeverity.Error, 39, (7, 12, 7, 16), "The value or constructor 'Name' is not defined." + FSharpErrorSeverity.Error, 39, (7, 12, 7, 16), "The value or constructor 'Name' is not defined. Maybe you want one of the following:\r\n nan" FSharpErrorSeverity.Warning, 20, (7, 12, 7, 25), "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'." FSharpErrorSeverity.Error, 39, (8, 12, 8, 15), "The value or constructor 'Age' is not defined." FSharpErrorSeverity.Error, 501, (7, 5, 8, 21), "The object constructor 'Person' takes 0 argument(s) but is here given 1. The required signature is 'new : unit -> Person'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (',')." diff --git a/tests/fsharp/Compiler/ErrorMessages/DontSuggestTests.fs b/tests/fsharp/Compiler/ErrorMessages/DontSuggestTests.fs index 0e5a4f19557..cf2e040fd26 100644 --- a/tests/fsharp/Compiler/ErrorMessages/DontSuggestTests.fs +++ b/tests/fsharp/Compiler/ErrorMessages/DontSuggestTests.fs @@ -17,7 +17,7 @@ let _ = Path.GetFullPath "images" FSharpErrorSeverity.Error 39 (2, 9, 2, 13) - "The value, namespace, type or module 'Path' is not defined." + "The value, namespace, type or module 'Path' is not defined. Maybe you want one of the following:\r\n Math" [] let ``Dont Suggest When Things Are Open``() = diff --git a/tests/fsharp/Compiler/ErrorMessages/NameResolutionTests.fs b/tests/fsharp/Compiler/ErrorMessages/NameResolutionTests.fs index 70def908d11..77ee538ec77 100644 --- a/tests/fsharp/Compiler/ErrorMessages/NameResolutionTests.fs +++ b/tests/fsharp/Compiler/ErrorMessages/NameResolutionTests.fs @@ -6,8 +6,8 @@ open NUnit.Framework open FSharp.Compiler.SourceCodeServices [] -module NameResolutionTests = - +module NameResolutionTests = + [] let FieldNotInRecord () = CompilerAssert.TypeCheckSingleError @@ -24,7 +24,7 @@ let r:F = { Size=3; Height=4; Wall=1 } FSharpErrorSeverity.Error 1129 (9, 31, 9, 35) - "The record type 'F' does not contain a label 'Wall'." + "The record type 'F' does not contain a label 'Wall'. Maybe you want one of the following:\r\n Wallis" [] let RecordFieldProposal () = @@ -36,10 +36,10 @@ type C = { Wheels:int } type D = { Size:int; Height:int; Walls:int } type E = { Unknown:string } type F = { Wallis:int; Size:int; Height:int; } - + let r = { Size=3; Height=4; Wall=1 } """ FSharpErrorSeverity.Error 39 (9, 29, 9, 33) - "The record label 'Wall' is not defined." \ No newline at end of file + "The record label 'Wall' is not defined. Maybe you want one of the following:\r\n Walls\r\n Wallis" \ No newline at end of file