forked from dotnet/fsharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract unit tests and add some basic regression tests.
- Loading branch information
Showing
14 changed files
with
956 additions
and
932 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
744 changes: 0 additions & 744 deletions
744
tests/ParallelTypeCheckingTests/Code/DependencyResolution.fs
Large diffs are not rendered by default.
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
8 changes: 0 additions & 8 deletions
8
tests/ParallelTypeCheckingTests/Code/TrieApproach/Continuation.fs
This file was deleted.
Oops, something went wrong.
122 changes: 0 additions & 122 deletions
122
tests/ParallelTypeCheckingTests/Code/TrieApproach/Types.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
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
43 changes: 43 additions & 0 deletions
43
tests/ParallelTypeCheckingTests/Tests/AlwaysLinkDetectionTests.fs
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,43 @@ | ||
module ParallelTypeCheckingTests.Tests.AlwaysLinkDetectionTests | ||
|
||
open NUnit.Framework | ||
open FSharp.Compiler.Service.Tests.Common | ||
open ParallelTypeCheckingTests.AlwaysLinkDetection | ||
|
||
[<Test>] | ||
let ``Detect top level auto open`` () = | ||
let fileContent = | ||
""" | ||
[<AutoOpen>] | ||
module internal Internal.Utilities.Library.Block | ||
open System.Collections.Immutable | ||
[<RequireQualifiedAccess>] | ||
module ImmutableArrayBuilder = | ||
val create: size: int -> ImmutableArray<'T>.Builder | ||
[<RequireQualifiedAccess>] | ||
module ImmutableArray = | ||
[<GeneralizableValue>] | ||
val empty<'T> : ImmutableArray<'T> | ||
val init: n: int -> f: (int -> 'T) -> ImmutableArray<'T> | ||
""" | ||
|
||
let ast = parseSourceCode ("ImmutableArray.fsi", fileContent) | ||
Assert.True(doesFileHasAutoOpenBehavior ast) | ||
|
||
[<Test>] | ||
let ``Detect global namespace`` () = | ||
let fileContent = | ||
""" | ||
namespace global | ||
type X = { Y: int } | ||
""" | ||
|
||
let ast = parseSourceCode ("Global.fsi", fileContent) | ||
Assert.True(doesFileHasAutoOpenBehavior ast) |
Oops, something went wrong.