Skip to content

Commit

Permalink
Fix suggestion tests
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Jul 29, 2019
1 parent f167d71 commit 5735953
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/fsharp/Compiler/ErrorMessages/ClassesTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/fsharp/Compiler/ErrorMessages/ConstructorTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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 (',')."
Expand Down
2 changes: 1 addition & 1 deletion tests/fsharp/Compiler/ErrorMessages/DontSuggestTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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"

[<Test>]
let ``Dont Suggest When Things Are Open``() =
Expand Down
10 changes: 5 additions & 5 deletions tests/fsharp/Compiler/ErrorMessages/NameResolutionTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ open NUnit.Framework
open FSharp.Compiler.SourceCodeServices

[<TestFixture>]
module NameResolutionTests =
module NameResolutionTests =

[<Test>]
let FieldNotInRecord () =
CompilerAssert.TypeCheckSingleError
Expand All @@ -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"

[<Test>]
let RecordFieldProposal () =
Expand All @@ -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."
"The record label 'Wall' is not defined. Maybe you want one of the following:\r\n Walls\r\n Wallis"

0 comments on commit 5735953

Please sign in to comment.