Skip to content

Commit 05f93b1

Browse files
authored
Merge branch 'feature/lsp' into extension-config
2 parents 59cfe19 + 065096c commit 05f93b1

File tree

149 files changed

+3096
-3526
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+3096
-3526
lines changed

tests/FSharp.Compiler.ComponentTests/EmittedIL/AssemblyBoundary/AssemblyBoundary.fs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,75 +17,81 @@ module AssemblyBoundary =
1717

1818

1919
//NoMT SOURCE=test01.fs SCFLAGS="--optimize+ -r:lib01.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib01.fs" # test01.fs
20-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"test01.fs"|])>]
20+
[<Theory; FileInlineData("test01.fs")>]
2121
let ``test01_fs`` compilation =
2222
let lib01 =
2323
FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "lib01.fs"))
2424
|> withOptimize
2525
|> asLibrary
2626

2727
compilation
28+
|> getCompilation
2829
|> withReferences [lib01]
2930
|> verifyCompileAndExecution
3031

3132
//NoMT SOURCE=test01.fs SCFLAGS="--optimize+ -r:lib01.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib01.fs" # test01.fs
32-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"test02.fs"|])>]
33+
[<Theory; FileInlineData("test02.fs")>]
3334
let ``test02_fs`` compilation =
3435
let lib02 =
3536
FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "lib02.fs"))
3637
|> withOptimize
3738
|> asLibrary
3839

3940
compilation
41+
|> getCompilation
4042
|> withReferences [lib02]
4143
|> verifyCompileAndExecution
4244

4345
//NoMT SOURCE=test03.fs SCFLAGS="--optimize+ -r:lib03.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib03.fs" # test03.fs
44-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"test03.fs"|])>]
46+
[<Theory; FileInlineData("test03.fs")>]
4547
let ``test03_fs`` compilation =
4648
let lib03 =
4749
FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "lib03.fs"))
4850
|> withOptimize
4951
|> asLibrary
5052

5153
compilation
54+
|> getCompilation
5255
|> withReferences [lib03]
5356
|> verifyCompileAndExecution
5457

5558
//NoMT SOURCE=test04.fs SCFLAGS="--optimize+ -r:lib04.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib04.fs" # test04.fs
56-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"test04.fs"|])>]
59+
[<Theory; FileInlineData("test04.fs")>]
5760
let ``test04_fs`` compilation =
5861
let lib04 =
5962
FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "lib04.fs"))
6063
|> withOptimize
6164
|> asLibrary
6265

6366
compilation
67+
|> getCompilation
6468
|> withReferences [lib04]
6569
|> verifyCompileAndExecution
6670

6771

6872
// SOURCE=InlineWithPrivateValues01.fs SCFLAGS="-r:TypeLib01.dll" PRECMD="\$FSC_PIPE -a --optimize+ TypeLib01.fs" # InlineWithPrivateValuesStruct
69-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"InlineWithPrivateValues01.fs"|])>]
73+
[<Theory; FileInlineData("InlineWithPrivateValues01.fs")>]
7074
let ``InlineWithPrivateValues01_fs_TypeLib01_fs`` compilation =
7175
let typeLib01 =
7276
FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "TypeLib01.fs"))
7377
|> withOptimize
7478
|> asLibrary
7579

7680
compilation
81+
|> getCompilation
7782
|> withReferences [typeLib01]
7883
|> verifyCompileAndExecution
7984

8085
// SOURCE=InlineWithPrivateValues01.fs SCFLAGS="-r:TypeLib02.dll" PRECMD="\$FSC_PIPE -a --optimize+ TypeLib02.fs" # InlineWithPrivateValuesRef
81-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"InlineWithPrivateValues01.fs"|])>]
86+
[<Theory; FileInlineData("InlineWithPrivateValues01.fs")>]
8287
let ``InlineWithPrivateValues01_fs_TypeLib02_fs`` compilation =
8388
let typeLib02 =
8489
FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "TypeLib02.fs"))
8590
|> withOptimize
8691
|> asLibrary
8792

8893
compilation
94+
|> getCompilation
8995
|> withReferences [typeLib02]
9096
|> verifyCompileAndExecution
9197

tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionStepping.fs

Lines changed: 18 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -17,74 +17,38 @@ module AsyncExpressionStepping =
1717
|> verifyBaseline
1818
|> verifyILBaseline
1919

20-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"AsyncExpressionSteppingTest1.fs"|])>]
21-
let ``AsyncExpressionSteppingTest1_RealInternalSignatureOn_fs`` compilation =
20+
[<Theory; FileInlineData("AsyncExpressionSteppingTest1.fs", Realsig=BooleanOptions.Both)>]
21+
let ``AsyncExpressionSteppingTest1_fs`` compilation =
2222
compilation
23-
|> withRealInternalSignatureOn
23+
|> getCompilation
2424
|> verifyCompilation
2525

26-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"AsyncExpressionSteppingTest1.fs"|])>]
27-
let ``AsyncExpressionSteppingTest1_RealInternalSignatureOff_fs`` compilation =
26+
[<Theory; FileInlineData("AsyncExpressionSteppingTest2.fs", Realsig=BooleanOptions.Both)>]
27+
let ``AsyncExpressionSteppingTest2`` compilation =
2828
compilation
29-
|> withRealInternalSignatureOff
29+
|> getCompilation
3030
|> verifyCompilation
3131

32-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"AsyncExpressionSteppingTest2.fs"|])>]
33-
let ``AsyncExpressionSteppingTest2_RealInternalSignatureOnfs`` compilation =
32+
[<Theory; FileInlineData("AsyncExpressionSteppingTest3.fs", Realsig=BooleanOptions.Both)>]
33+
let ``AsyncExpressionSteppingTest3_fs`` compilation =
3434
compilation
35-
|> withRealInternalSignatureOn
35+
|> getCompilation
3636
|> verifyCompilation
3737

38-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"AsyncExpressionSteppingTest2.fs"|])>]
39-
let ``AsyncExpressionSteppingTest2_RealInternalSignatureOff_fs`` compilation =
38+
[<Theory; FileInlineData("AsyncExpressionSteppingTest4.fs", Realsig=BooleanOptions.Both)>]
39+
let ``AsyncExpressionSteppingTest4_fs`` compilation =
4040
compilation
41-
|> withRealInternalSignatureOff
41+
|> getCompilation
4242
|> verifyCompilation
4343

44-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"AsyncExpressionSteppingTest3.fs"|])>]
45-
let ``AsyncExpressionSteppingTest3_RealInternalSignatureOn_fs`` compilation =
44+
[<Theory; FileInlineData("AsyncExpressionSteppingTest5.fs", Realsig=BooleanOptions.Both)>]
45+
let ``AsyncExpressionSteppingTest5_fs`` compilation =
4646
compilation
47-
|> withRealInternalSignatureOn
47+
|> getCompilation
4848
|> verifyCompilation
4949

50-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"AsyncExpressionSteppingTest3.fs"|])>]
51-
let ``AsyncExpressionSteppingTest3_RealInternalSignatureOff_fs`` compilation =
50+
[<Theory; FileInlineData("AsyncExpressionSteppingTest6.fs", Realsig=BooleanOptions.Both)>]
51+
let ``AsyncExpressionSteppingTest6_fs`` compilation =
5252
compilation
53-
|> withRealInternalSignatureOff
54-
|> verifyCompilation
55-
56-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"AsyncExpressionSteppingTest4.fs"|])>]
57-
let ``AsyncExpressionSteppingTest4_RealInternalSignatureOn_fs`` compilation =
58-
compilation
59-
|> withRealInternalSignatureOn
60-
|> verifyCompilation
61-
62-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"AsyncExpressionSteppingTest4.fs"|])>]
63-
let ``AsyncExpressionSteppingTest4_RealInternalSignatureOff_fs`` compilation =
64-
compilation
65-
|> withRealInternalSignatureOff
66-
|> verifyCompilation
67-
68-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"AsyncExpressionSteppingTest5.fs"|])>]
69-
let ``AsyncExpressionSteppingTest5_RealInternalSignatureOn_fs`` compilation =
70-
compilation
71-
|> withRealInternalSignatureOn
72-
|> verifyCompilation
73-
74-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"AsyncExpressionSteppingTest5.fs"|])>]
75-
let ``AsyncExpressionSteppingTest5_RealInternalSignatureOff_fs`` compilation =
76-
compilation
77-
|> withRealInternalSignatureOff
78-
|> verifyCompilation
79-
80-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"AsyncExpressionSteppingTest6.fs"|])>]
81-
let ``AsyncExpressionSteppingTest6_RealInternalSignatureOn_fs`` compilation =
82-
compilation
83-
|> withRealInternalSignatureOn
84-
|> verifyCompilation
85-
86-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"AsyncExpressionSteppingTest6.fs"|])>]
87-
let ``AsyncExpressionSteppingTest6_RealInternalSignatureOff_fs`` compilation =
88-
compilation
89-
|> withRealInternalSignatureOff
53+
|> getCompilation
9054
|> verifyCompilation

tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/AttributeTargets.fs

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,20 @@ module AttributeTargets =
1717
|> verifyBaseline
1818
|> verifyILBaseline
1919

20-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"Default.fs"|])>]
21-
let ``Default_RealInternalSignatureOn_fs`` compilation =
20+
[<Theory; FileInlineData("Default.fs", Realsig=BooleanOptions.Both)>]
21+
let ``Default_fs`` compilation =
2222
compilation
23-
|> withRealInternalSignatureOn
23+
|> getCompilation
2424
|> verifyCompilation
2525

26-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"Default.fs"|])>]
27-
let ``Default_RealInternalSignatureOff_fs`` compilation =
26+
[<Theory; FileInlineData("Field.fs", Realsig=BooleanOptions.Both)>]
27+
let ``Field_fs`` compilation =
2828
compilation
29-
|> withRealInternalSignatureOff
29+
|> getCompilation
3030
|> verifyCompilation
3131

32-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"Field.fs"|])>]
33-
let ``Field_RealInternalSignatureOn_fs`` compilation =
32+
[<Theory; FileInlineData("Property.fs", Realsig=BooleanOptions.Both)>]
33+
let ``Property_fs`` compilation =
3434
compilation
35-
|> withRealInternalSignatureOn
36-
|> verifyCompilation
37-
38-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"Field.fs"|])>]
39-
let ``Field_RealInternalSignatureOff_fs`` compilation =
40-
compilation
41-
|> withRealInternalSignatureOff
42-
|> verifyCompilation
43-
44-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"Property.fs"|])>]
45-
let ``Property_RealInternalSignatureOn_fs`` compilation =
46-
compilation
47-
|> withRealInternalSignatureOn
48-
|> verifyCompilation
49-
50-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"Property.fs"|])>]
51-
let ``Property_RealInternalSignatureOff_fs`` compilation =
52-
compilation
53-
|> withRealInternalSignatureOff
35+
|> getCompilation
5436
|> verifyCompilation

tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs

Lines changed: 12 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -17,74 +17,38 @@ module CCtorDUWithMember =
1717
|> verifyBaseline
1818
|> verifyILBaseline
1919

20-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"CCtorDUWithMember01a.fs"|])>]
21-
let ``CCtorDUWithMember01a_RealInternalSignatureOn_fs`` compilation =
20+
[<Theory; FileInlineData("CCtorDUWithMember01a.fs", Realsig=BooleanOptions.Both)>]
21+
let ``CCtorDUWithMember01a_fs`` compilation =
2222
compilation
23+
|> getCompilation
2324
|> asFs
24-
|> withRealInternalSignatureOn
2525
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember01.fs"))
2626
|> verifyCompilation
2727

28-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"CCtorDUWithMember01a.fs"|])>]
29-
let ``CCtorDUWithMember01a_RealInternalSignatureOff_fs`` compilation =
28+
[<Theory; FileInlineData("CCtorDUWithMember02a.fs", Realsig=BooleanOptions.Both)>]
29+
let ``CCtorDUWithMember02a_fs`` compilation =
3030
compilation
31-
|> asFs
32-
|> withRealInternalSignatureOff
33-
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember01.fs"))
34-
|> verifyCompilation
35-
36-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"CCtorDUWithMember02a.fs"|])>]
37-
let ``CCtorDUWithMember02a_RealInternalSignatureOn_fs`` compilation =
38-
compilation
39-
|> withRealInternalSignatureOn
31+
|> getCompilation
4032
|> asFs
4133
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember02.fs"))
4234
|> verifyCompilation
4335

44-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"CCtorDUWithMember02a.fs"|])>]
45-
let ``CCtorDUWithMember02a_RealInternalSignatureOff_fs`` compilation =
46-
compilation
47-
|> withRealInternalSignatureOff
48-
|> asFs
49-
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember02.fs"))
50-
|> verifyCompilation
51-
52-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"CCtorDUWithMember03a.fs"|])>]
53-
let ``CCtorDUWithMember03a_RealInternalSignatureOn_fs`` compilation =
54-
compilation
55-
|> withRealInternalSignatureOn
56-
|> asFs
57-
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember03.fs"))
58-
|> verifyCompilation
59-
60-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"CCtorDUWithMember03a.fs"|])>]
61-
let ``CCtorDUWithMember03a_RealInternalSignatureOff_fs`` compilation =
36+
[<Theory; FileInlineData("CCtorDUWithMember03a.fs", Realsig=BooleanOptions.Both)>]
37+
let ``CCtorDUWithMember03a_fs`` compilation =
6238
compilation
63-
|> withRealInternalSignatureOff
39+
|> getCompilation
6440
|> asFs
6541
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember03.fs"))
6642
|> verifyCompilation
6743

68-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[| "CCtorDUWithMember04a.fs" |])>]
69-
let ``CCtorDUWithMember04a_RealInternalSignatureOn_fs`` compilation =
44+
[<Theory; FileInlineData("CCtorDUWithMember04a.fs", Realsig=BooleanOptions.Both)>]
45+
let ``CCtorDUWithMember04a_fs`` compilation =
7046
compilation
71-
|> withRealInternalSignatureOn
47+
|> getCompilation
7248
|> asFs
7349
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember04.fs"))
7450
|> verifyCompilation
7551

76-
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[| "CCtorDUWithMember04a.fs" |])>]
77-
let ``CCtorDUWithMember04a_RealInternalSignatureOff_fs`` compilation =
78-
compilation
79-
|> withRealInternalSignatureOff
80-
|> asFs
81-
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember04.fs"))
82-
|> verifyCompilation
83-
84-
let withRealInternalSignature realSig compilation =
85-
compilation
86-
|> withOptions [if realSig then "--realsig+" else "--realsig-" ]
87-
8852
[<InlineData(true)>] // RealSig
8953
[<InlineData(false)>] // Regular
9054
[<Theory>]

tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,34 @@ module CompiledNameAttribute =
1818
|> verifyBaseline
1919
|> verifyILBaseline
2020

21-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"CompiledNameAttribute01.fs"|])>]
21+
[<Theory; FileInlineData("CompiledNameAttribute01.fs")>]
2222
let ``CompiledNameAttribute01_fs`` compilation =
2323
compilation
24+
|> getCompilation
2425
|> verifyCompilation
2526

26-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"CompiledNameAttribute02.fs"|])>]
27+
[<Theory; FileInlineData("CompiledNameAttribute02.fs")>]
2728
let ``CompiledNameAttribute02_fs`` compilation =
2829
compilation
30+
|> getCompilation
2931
|> verifyCompilation
3032

31-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"CompiledNameAttribute03.fs"|])>]
33+
[<Theory; FileInlineData("CompiledNameAttribute03.fs")>]
3234
let ``CompiledNameAttribute03_fs`` compilation =
3335
compilation
36+
|> getCompilation
3437
|> verifyCompilation
3538

36-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"CompiledNameAttribute04_RealInternalSignatureOn.fs"|])>]
39+
[<Theory; FileInlineData("CompiledNameAttribute04.fs", Realsig=BooleanOptions.Both)>]
3740
let ``CompiledNameAttribute04_RealInternalSignatureOn_fs`` compilation =
3841
compilation
39-
|> withRealInternalSignatureOn
42+
|> getCompilation
4043
|> verifyCompilation
4144

42-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"CompiledNameAttribute04_RealInternalSignatureOff.fs"|])>]
43-
let ``CompiledNameAttribute04_RealInternalSignatureOff_fs`` compilation =
44-
compilation
45-
|> withRealInternalSignatureOff
46-
|> verifyCompilation
47-
48-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"CompiledNameAttribute05.fs"|])>]
45+
[<Theory; FileInlineData("CompiledNameAttribute05.fs")>]
4946
let ``CompiledNameAttribute05_fs`` compilation =
5047
compilation
48+
|> getCompilation
5149
|> asFs
5250
|> asExe
5351
|> withEmbeddedPdb

0 commit comments

Comments
 (0)