Skip to content

Commit

Permalink
Even more tests (#18197)
Browse files Browse the repository at this point in the history
Co-authored-by: Petr <psfinaki@users.noreply.github.com>
  • Loading branch information
KevinRansom and psfinaki authored Jan 8, 2025
1 parent a310d1d commit 26f710b
Show file tree
Hide file tree
Showing 148 changed files with 3,096 additions and 3,522 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,75 +17,81 @@ module AssemblyBoundary =


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

compilation
|> getCompilation
|> withReferences [lib01]
|> verifyCompileAndExecution

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

compilation
|> getCompilation
|> withReferences [lib02]
|> verifyCompileAndExecution

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

compilation
|> getCompilation
|> withReferences [lib03]
|> verifyCompileAndExecution

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

compilation
|> getCompilation
|> withReferences [lib04]
|> verifyCompileAndExecution


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

compilation
|> getCompilation
|> withReferences [typeLib01]
|> verifyCompileAndExecution

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

compilation
|> getCompilation
|> withReferences [typeLib02]
|> verifyCompileAndExecution

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,74 +17,38 @@ module AsyncExpressionStepping =
|> verifyBaseline
|> verifyILBaseline

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

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

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

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

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

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"AsyncExpressionSteppingTest3.fs"|])>]
let ``AsyncExpressionSteppingTest3_RealInternalSignatureOff_fs`` compilation =
[<Theory; FileInlineData("AsyncExpressionSteppingTest6.fs", Realsig=BooleanOptions.Both)>]
let ``AsyncExpressionSteppingTest6_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"AsyncExpressionSteppingTest4.fs"|])>]
let ``AsyncExpressionSteppingTest4_RealInternalSignatureOn_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"AsyncExpressionSteppingTest4.fs"|])>]
let ``AsyncExpressionSteppingTest4_RealInternalSignatureOff_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"AsyncExpressionSteppingTest5.fs"|])>]
let ``AsyncExpressionSteppingTest5_RealInternalSignatureOn_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"AsyncExpressionSteppingTest5.fs"|])>]
let ``AsyncExpressionSteppingTest5_RealInternalSignatureOff_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"AsyncExpressionSteppingTest6.fs"|])>]
let ``AsyncExpressionSteppingTest6_RealInternalSignatureOn_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"AsyncExpressionSteppingTest6.fs"|])>]
let ``AsyncExpressionSteppingTest6_RealInternalSignatureOff_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> getCompilation
|> verifyCompilation
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,20 @@ module AttributeTargets =
|> verifyBaseline
|> verifyILBaseline

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

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

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"Field.fs"|])>]
let ``Field_RealInternalSignatureOn_fs`` compilation =
[<Theory; FileInlineData("Property.fs", Realsig=BooleanOptions.Both)>]
let ``Property_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"Field.fs"|])>]
let ``Field_RealInternalSignatureOff_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"Property.fs"|])>]
let ``Property_RealInternalSignatureOn_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"Property.fs"|])>]
let ``Property_RealInternalSignatureOff_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> getCompilation
|> verifyCompilation
Original file line number Diff line number Diff line change
Expand Up @@ -17,74 +17,38 @@ module CCtorDUWithMember =
|> verifyBaseline
|> verifyILBaseline

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"CCtorDUWithMember01a.fs"|])>]
let ``CCtorDUWithMember01a_RealInternalSignatureOn_fs`` compilation =
[<Theory; FileInlineData("CCtorDUWithMember01a.fs", Realsig=BooleanOptions.Both)>]
let ``CCtorDUWithMember01a_fs`` compilation =
compilation
|> getCompilation
|> asFs
|> withRealInternalSignatureOn
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember01.fs"))
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"CCtorDUWithMember01a.fs"|])>]
let ``CCtorDUWithMember01a_RealInternalSignatureOff_fs`` compilation =
[<Theory; FileInlineData("CCtorDUWithMember02a.fs", Realsig=BooleanOptions.Both)>]
let ``CCtorDUWithMember02a_fs`` compilation =
compilation
|> asFs
|> withRealInternalSignatureOff
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember01.fs"))
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"CCtorDUWithMember02a.fs"|])>]
let ``CCtorDUWithMember02a_RealInternalSignatureOn_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> getCompilation
|> asFs
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember02.fs"))
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"CCtorDUWithMember02a.fs"|])>]
let ``CCtorDUWithMember02a_RealInternalSignatureOff_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> asFs
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember02.fs"))
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"CCtorDUWithMember03a.fs"|])>]
let ``CCtorDUWithMember03a_RealInternalSignatureOn_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> asFs
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember03.fs"))
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"CCtorDUWithMember03a.fs"|])>]
let ``CCtorDUWithMember03a_RealInternalSignatureOff_fs`` compilation =
[<Theory; FileInlineData("CCtorDUWithMember03a.fs", Realsig=BooleanOptions.Both)>]
let ``CCtorDUWithMember03a_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> getCompilation
|> asFs
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember03.fs"))
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[| "CCtorDUWithMember04a.fs" |])>]
let ``CCtorDUWithMember04a_RealInternalSignatureOn_fs`` compilation =
[<Theory; FileInlineData("CCtorDUWithMember04a.fs", Realsig=BooleanOptions.Both)>]
let ``CCtorDUWithMember04a_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> getCompilation
|> asFs
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember04.fs"))
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[| "CCtorDUWithMember04a.fs" |])>]
let ``CCtorDUWithMember04a_RealInternalSignatureOff_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> asFs
|> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember04.fs"))
|> verifyCompilation

let withRealInternalSignature realSig compilation =
compilation
|> withOptions [if realSig then "--realsig+" else "--realsig-" ]

[<InlineData(true)>] // RealSig
[<InlineData(false)>] // Regular
[<Theory>]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,34 @@ module CompiledNameAttribute =
|> verifyBaseline
|> verifyILBaseline

[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"CompiledNameAttribute01.fs"|])>]
[<Theory; FileInlineData("CompiledNameAttribute01.fs")>]
let ``CompiledNameAttribute01_fs`` compilation =
compilation
|> getCompilation
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"CompiledNameAttribute02.fs"|])>]
[<Theory; FileInlineData("CompiledNameAttribute02.fs")>]
let ``CompiledNameAttribute02_fs`` compilation =
compilation
|> getCompilation
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"CompiledNameAttribute03.fs"|])>]
[<Theory; FileInlineData("CompiledNameAttribute03.fs")>]
let ``CompiledNameAttribute03_fs`` compilation =
compilation
|> getCompilation
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"CompiledNameAttribute04_RealInternalSignatureOn.fs"|])>]
[<Theory; FileInlineData("CompiledNameAttribute04.fs", Realsig=BooleanOptions.Both)>]
let ``CompiledNameAttribute04_RealInternalSignatureOn_fs`` compilation =
compilation
|> withRealInternalSignatureOn
|> getCompilation
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"CompiledNameAttribute04_RealInternalSignatureOff.fs"|])>]
let ``CompiledNameAttribute04_RealInternalSignatureOff_fs`` compilation =
compilation
|> withRealInternalSignatureOff
|> verifyCompilation

[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"CompiledNameAttribute05.fs"|])>]
[<Theory; FileInlineData("CompiledNameAttribute05.fs")>]
let ``CompiledNameAttribute05_fs`` compilation =
compilation
|> getCompilation
|> asFs
|> asExe
|> withEmbeddedPdb
Expand Down
Loading

0 comments on commit 26f710b

Please sign in to comment.