-
Notifications
You must be signed in to change notification settings - Fork 790
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved Don't Suggest Tests over to NUnit (#7288)
- Loading branch information
1 parent
8370ef6
commit 3ce8eb1
Showing
6 changed files
with
49 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// 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 ``Don't Suggest`` = | ||
|
||
[<Test>] | ||
let ``Dont Suggest Completely Wrong Stuff``() = | ||
CompilerAssert.TypeCheckSingleError | ||
""" | ||
let _ = Path.GetFullPath "images" | ||
""" | ||
FSharpErrorSeverity.Error | ||
39 | ||
(2, 9, 2, 13) | ||
"The value, namespace, type or module 'Path' is not defined." | ||
|
||
[<Test>] | ||
let ``Dont Suggest When Things Are Open``() = | ||
CompilerAssert.ParseWithErrors | ||
""" | ||
module N = | ||
let name = "hallo" | ||
type T = | ||
static member myMember = 1 | ||
let x = N. | ||
""" | ||
[| | ||
FSharpErrorSeverity.Error, 599, (8, 10, 8, 11), "Missing qualification after '.'" | ||
FSharpErrorSeverity.Error, 222, (2, 1, 3, 1), "Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error." | ||
|] | ||
|
||
[<Test>] | ||
let ``Dont Suggest Intentionally Unused Variables``() = | ||
CompilerAssert.TypeCheckSingleError | ||
""" | ||
let hober xy _xyz = xyz | ||
""" | ||
FSharpErrorSeverity.Error | ||
39 | ||
(2, 21, 2, 24) | ||
"The value or constructor 'xyz' is not defined." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
tests/fsharpqa/Source/Warnings/DontSuggestCompletelyWrongStuff.fs
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
tests/fsharpqa/Source/Warnings/DontSuggestIntentionallyUnusedVariables.fs
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
tests/fsharpqa/Source/Warnings/DontSuggestWhenThingsAreOpen.fs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters