-
Notifications
You must be signed in to change notification settings - Fork 840
Move ErrorMessages/NameResolution Tests to NUnit #7237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
bee8d13
7d0eb47
6a6acbf
f08b53d
938940d
9cc8864
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. | ||
|
|
||
| namespace FSharp.Compiler.UnitTests | ||
|
|
||
| open NUnit.Framework | ||
| open FSharp.Compiler.SourceCodeServices | ||
|
|
||
| [<TestFixture>] | ||
| module ``NameResolutionTests`` = | ||
|
|
||
| [<Test>] | ||
| let `` FieldNotInRecord `` () = | ||
| CompilerAssert.TypeCheckSingleError | ||
| """ | ||
| type A = { Hello:string; World:string } | ||
| type B = { Size:int; Height:int } | ||
| 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:F = { Size=3; Height=4; Wall=1 } | ||
| """ | ||
| FSharpErrorSeverity.Error | ||
| 1129 | ||
| (9, 31, 9, 35) | ||
| "The record type 'F' does not contain a label 'Wall'." | ||
|
|
||
| [<Test>] | ||
| let `` RecordFieldProposal `` () = | ||
cartermp marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| CompilerAssert.TypeCheckSingleError | ||
| """ | ||
| type A = { Hello:string; World:string } | ||
| type B = { Size:int; Height:int } | ||
| 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." | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,4 +3,4 @@ | |
|
|
||
| let x = global.System.String.Empty.global.System.String.Empty | ||
|
|
||
| exit 0 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you propose following up with a PR to migrate this test case? Feel free to add whatever is necessary to the CompilerAssert class. Thanks Kevin
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the new function is already coming in #7244 - so after merging that one @kMutagene can continue
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK the new assertion function is in.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks @forki |
||
| exit 0 | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1 @@ | ||
| SOURCE=E_RecordFieldProposal.fs # E_RecordFieldProposal | ||
| SOURCE=E_GlobalQualifierAfterDot.fs # E_GlobalQualifierAfterDot | ||
| SOURCE=E_FieldNotInRecord.fs # E_FieldNotInRecord | ||
| SOURCE=E_GlobalQualifierAfterDot.fs # E_GlobalQualifierAfterDot |
Uh oh!
There was an error while loading. Please reload this page.