diff --git a/temp.bat b/temp.bat new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/FSharp.Compiler.ComponentTests/AttributeUsage.fs b/tests/FSharp.Compiler.ComponentTests/AttributeUsage.fs deleted file mode 100644 index 1cd8ad68771..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/AttributeUsage.fs +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Conformance.Conformance.DeclarationElements.CustomAttributes.AttributeUsage - -open Xunit -open FSharp.Test -open FSharp.Test.Compiler - -module AttributeUsage = - - let verifyCompile compilation = - compilation - |> asExe - |> withOptions ["--nowarn:988"] - |> compile - - let verifyCompileAndRun compilation = - compilation - |> asExe - |> withOptions ["--nowarn:988"] - |> compileAndRun - - // SOURCE=AssemblyVersion01.fs # AssemblyVersion01.fs - [] - let ``AssemblyVersion01_fs`` compilation = - compilation - |> verifyCompileAndRun - |> shouldSucceed - - // SOURCE=AssemblyVersion02.fs # AssemblyVersion02.fs - [] - let ``AssemblyVersion02_fs`` compilation = - compilation - |> verifyCompileAndRun - |> shouldSucceed - - // SOURCE=AssemblyVersion03.fs # AssemblyVersion03.fs - [] - let ``AssemblyVersion03_fs`` compilation = - compilation - |> verifyCompileAndRun - |> shouldSucceed - - // SOURCE=AssemblyVersion04.fs # AssemblyVersion04.fs - [] - let ``AssemblyVersion04_fs`` compilation = - compilation - |> verifyCompileAndRun - |> shouldSucceed - - // SOURCE=AttributeTargetsIsCtor01.fs # AttributeTargetsIsCtor01.fs - [] - let ``AttributeTargetsIsCtor01_fs`` compilation = - compilation - |> verifyCompileAndRun - |> shouldSucceed - - // SOURCE=AttributeTargetsIsMethod01.fs # AttributeTargetsIsMethod01.fs - [] - let ``AttributeTargetsIsMethod01_fs`` compilation = - compilation - |> verifyCompileAndRun - |> shouldSucceed - - // SOURCE=ConditionalAttribute.fs # ConditionalAttribute.fs - [] - let ``ConditionalAttribute_fs`` compilation = - compilation - |> verifyCompileAndRun - |> shouldSucceed - - // SOURCE=E_AttributeTargets01.fs # E_AttributeTargets01.fs - [] - let ``E_AttributeTargets01_fs`` compilation = - compilation - |> verifyCompile - |> shouldFail - |> withDiagnostics [ - ] - - // SOURCE=E_AttributeTargets02.fs # E_AttributeTargets02.fs - [] - let ``E_AttributeTargets02_fs`` compilation = - compilation - |> verifyCompile - |> shouldFail - |> withDiagnostics [ - ] - - // SOURCE=E_ConditionalAttribute.fs SCFLAGS="--test:ErrorRanges" # E_ConditionalAttribute.fs - [] - let ``E_ConditionalAttribute_fs`` compilation = - compilation - |> verifyCompile - |> shouldFail - |> withDiagnostics [ - ] - - // SOURCE=E_RequiresExplicitTypeArguments01.fs SCFLAGS="--test:ErrorRanges" # E_RequiresExplicitTypeArguments01.fs - [] - let ``E_RequiresExplicitTypeArguments01_fs`` compilation = - compilation - |> verifyCompile - |> shouldFail - |> withDiagnostics [ - ] - - // SOURCE=E_RequiresExplicitTypeArguments02.fs SCFLAGS="--test:ErrorRanges" # E_RequiresExplicitTypeArguments02.fs - [] - let ``E_RequiresExplicitTypeArguments02_fs`` compilation = - compilation - |> verifyCompile - |> shouldFail - |> withDiagnostics [ - ] - - // # SOURCE=E_WithBitwiseAnd01.fsx SCFLAGS="--test:ErrorRanges -a" # E_WithBitwiseAnd01.fsx - [] - let ``E_WithBitwiseAnd01_fsx`` compilation = - compilation - |> verifyCompile - |> shouldFail - |> withDiagnostics [ - ] - - // SOURCE=E_WithBitwiseOr01.fsx SCFLAGS="--test:ErrorRanges -a" # E_WithBitwiseOr01.fsx - [] - let ``E_WithBitwiseOr01_fsx`` compilation = - compilation - |> verifyCompile - |> shouldFail - |> withDiagnostics [ - ] - - // SOURCE=MarshalAsAttribute.fs # MarshalAsAttribute.fs - [] - let ``MarshalAsAttribute_fs`` compilation = - compilation - |> verifyCompileAndRun - |> shouldSucceed - - // SOURCE=RequiresExplicitTypeArguments01.fs # RequiresExplicitTypeArguments01.fs - [] - let ``RequiresExplicitTypeArguments01_fs`` compilation = - compilation - |> verifyCompileAndRun - |> shouldSucceed - - // SOURCE=RequiresExplicitTypeArguments02.fs # RequiresExplicitTypeArguments02.fs - [] - let ``RequiresExplicitTypeArguments02_fs`` compilation = - compilation - |> verifyCompileAndRun - |> shouldSucceed - - // SOURCE=W_AssemblyVersion01.fs SCFLAGS="--test:ErrorRanges" # W_AssemblyVersion01.fs - [] - let ``W_AssemblyVersion01_fs`` compilation = - compilation - |> verifyCompile - |> shouldFail - |> withDiagnostics [ - ] - - // SOURCE=W_AssemblyVersion02.fs SCFLAGS="--test:ErrorRanges" # W_AssemblyVersion02.fs - [] - let ``W_AssemblyVersion02_fs`` compilation = - compilation - |> verifyCompile - |> shouldFail - |> withDiagnostics [ - ] - - // SOURCE=WithBitwiseOr02a.fsx SCFLAGS=-a # WithBitwiseOr02a.fsx - [] - let ``WithBitwiseOr02a_fsx`` compilation = - compilation - |> verifyCompileAndRun - |> shouldSucceed - - // SOURCE=WithBitwiseOr02b.fsx SCFLAGS=-a # WithBitwiseOr02b.fsx - [] - let ``WithBitwiseOr02b_fsx`` compilation = - compilation - |> verifyCompileAndRun - |> shouldSucceed - - // SOURCE=X_AssemblyVersion01.fs SCFLAGS="--test:ErrorRanges" # X_AssemblyVersion01.fs - [] - let ``X_AssemblyVersion01_fs`` compilation = - compilation - |> verifyCompileAndRun - |> shouldSucceed - - // SOURCE=X_AssemblyVersion02.fs SCFLAGS="--test:ErrorRanges" # X_AssemblyVersion02.fs - [] - let ``X_AssemblyVersion02_fs`` compilation = - compilation - |> verifyCompileAndRun - |> shouldSucceed - - diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/checked.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/checked.fs index 4e4902c63d3..8a0447a450e 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/checked.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/checked.fs @@ -9,71 +9,79 @@ open Xunit module Checked = // SOURCE=unchecked01.fs # fsc-default - [] - let ``fsc-unchecked - unchecked01_fs`` compilation = - compilation + [] + let ``fsc-unchecked - unchecked01_fs`` compilation = + compilation + |> getCompilation |> asFs |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked" # fsc-checked - [] - let ``fsc-unchecked - unchecked01_fs --checked`` compilation = - compilation + [] + let ``fsc-unchecked - unchecked01_fs --checked`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--checked"] |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked+" # fsc-checked+ - [] - let ``fsc-unchecked - unchecked01_fs --checked+`` compilation = - compilation + [] + let ``fsc-unchecked - unchecked01_fs --checked+`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--checked+"] |> compile |> shouldSucceed // SOURCE=unchecked01.fs SCFLAGS="--checked-" # fsc-checked- - [] - let ``fsc-unchecked - unchecked01_fs --checked-`` compilation = - compilation + [] + let ``fsc-unchecked - unchecked01_fs --checked-`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--checked-"] |> compile |> shouldSucceed // SOURCE=unchecked01.fs SCFLAGS="--checked-" # fsc-checked- - [] - let ``fsi-unchecked - unchecked01_fs --checked-`` compilation = - compilation + [] + let ``fsi-unchecked - unchecked01_fs --checked-`` compilation = + compilation + |> getCompilation |> asFsx |> withOptions["--checked-"] |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked" FSIMODE=EXEC COMPILE_ONLY=1 # fsi-checked - [] - let ``fsi-checked - checked01_fs --checked`` compilation = - compilation + [] + let ``fsi-checked - checked01_fs --checked`` compilation = + compilation + |> getCompilation |> asFsx |> withOptions["--checked"] |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked+" FSIMODE=EXEC COMPILE_ONLY=1 # fsi-checked+ - [] - let ``fsi-checked - checked01_fs --checked+`` compilation = - compilation + [] + let ``fsi-checked - checked01_fs --checked+`` compilation = + compilation + |> getCompilation |> asFsx |> withOptions["--checked+"] |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked-" FSIMODE=EXEC COMPILE_ONLY=1 # fsi-checked+ - [] - let ``fsi-checked - checked01_fs --checked-`` compilation = - compilation + [] + let ``fsi-checked - checked01_fs --checked-`` compilation = + compilation + |> getCompilation |> asFsx |> withOptions["--checked-"] |> compile @@ -83,54 +91,60 @@ module Checked = //# Last one wins // SOURCE=checked01.fs SCFLAGS="--checked --checked+" # fsc-checkedchecked+ - [] - let ``fsc-checked - checked01_fs --checked --checked+`` compilation = - compilation + [] + let ``fsc-checked - checked01_fs --checked --checked+`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--checked"; "--checked+"] |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked- --checked+" # fsc-checked-checked+ - [] - let ``fsc-checked - checked01_fs --checked- --checked+`` compilation = - compilation + [] + let ``fsc-checked - checked01_fs --checked- --checked+`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--checked-"; "--checked+"] |> compile |> shouldSucceed // SOURCE=unchecked01.fs SCFLAGS="--checked+ --checked-" # fsc-checked+checked- - [] - let ``fsc-checked - unchecked01_fs --checked+ --checked-`` compilation = - compilation + [] + let ``fsc-checked - unchecked01_fs --checked+ --checked-`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--checked+"; "--checked-"] |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked --checked+" # fsc-checkedchecked+ - [] - let ``fsi-checked - checked01_fs --checked --checked+`` compilation = - compilation + [] + let ``fsi-checked - checked01_fs --checked --checked+`` compilation = + compilation + |> getCompilation |> asFsx |> withOptions["--checked"; "--checked+"] |> compile |> shouldSucceed // SOURCE=checked01.fs SCFLAGS="--checked- --checked+" # fsc-checked-checked+ - [] - let ``fsi-checked - checked01_fs --checked- --checked+`` compilation = - compilation + [] + let ``fsi-checked - checked01_fs --checked- --checked+`` compilation = + compilation + |> getCompilation |> asFsx |> withOptions["--checked-"; "--checked+"] |> compile |> shouldSucceed // SOURCE=unchecked01.fs SCFLAGS="--checked+ --checked-" # fsc-checked+checked- - [] - let ``fsi-checked - unchecked01_fs --checked+ --checked-`` compilation = - compilation + [] + let ``fsi-checked - unchecked01_fs --checked+ --checked-`` compilation = + compilation + |> getCompilation |> asFsx |> withOptions["--checked+"; "--checked-"] |> compile @@ -138,9 +152,10 @@ module Checked = //# Unrecognized argument // SOURCE=unrecogarg.fs SCFLAGS="--Checked" # fsc--Checked - [] - let ``fsc-checked - unchecked01_fs Checked`` compilation = - compilation + [] + let ``fsc-checked - unchecked01_fs Checked`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--Checked"] |> compile @@ -150,9 +165,10 @@ module Checked = ] // SOURCE=unrecogarg.fs SCFLAGS="--checked*" # fsc--checked* - [] - let ``fsc-checked - unchecked01_fs --checked-star`` compilation = - compilation + [] + let ``fsc-checked - unchecked01_fs --checked-star`` compilation = + compilation + |> getCompilation |> asFs |> withOptions["--checked*"] |> compile @@ -162,9 +178,10 @@ module Checked = ] // SOURCE=unrecogarg.fs SCFLAGS="--checked*" # fsc--checked* - [] - let ``fsc-checked - UncheckedDefaultOf01`` compilation = - compilation + [] + let ``fsc-checked - UncheckedDefaultOf01`` compilation = + compilation + |> getCompilation |> asFs |> asExe |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/codepage/codepage.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/codepage/codepage.fs index 536083be938..6321b99fd07 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/codepage/codepage.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/codepage/codepage.fs @@ -8,22 +8,22 @@ open FSharp.Test.Compiler open System open System.IO -module codepage = +module Codepage = let libCodepage1250 = - FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "libCodepage.fs")) + FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "libCodepage.fs")) |> withCodepage "1250" |> withName "libCodepage1250" |> asLibrary let libCodepage1251 = - FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "libCodepage.fs")) + FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "libCodepage.fs")) |> withCodepage "1251" |> withName "libCodepage1251" |> asLibrary let secondLibCodepage1250 = - FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "libCodepage.fs")) + FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "libCodepage.fs")) |> withCodepage "1250" |> withName "secondLibCodepage1250" |> asLibrary @@ -31,9 +31,10 @@ module codepage = #if NETFRAMEWORK - [] + [] let ``Reference assembly compiled with same codepages`` compilation = compilation + |> getCompilation |> asExe |> withReferences [ libCodepage1250; secondLibCodepage1250 ] |> compile @@ -42,9 +43,10 @@ module codepage = (Error 39, Line 11, Col 13, Line 11, Col 14, "The value, constructor, namespace or type 'б' is not defined.") ] - [] + [] let ``Reference assembly compiled with different codepages`` compilation = compilation + |> getCompilation |> asExe |> withReferences [ libCodepage1250; libCodepage1251 ] |> compileAndRun @@ -53,9 +55,10 @@ module codepage = //# Boundary case // SOURCE=E_NoDataForEncoding65535.fs SCFLAGS="--codepage:65535" # E_NoDataForEncoding65535.fs - [] + [] let ``Reference assembly compiled with no data for codepage`` compilation = compilation + |> getCompilation |> withCodepage "65535" |> asExe |> compile @@ -66,9 +69,10 @@ module codepage = //# Boundary case // SOURCE=Zero.fs SCFLAGS="--codepage:0x0" # Zero.fs - [] + [] let ``Reference assembly compiled with zero for codepage`` compilation = compilation + |> getCompilation |> withNoWarn 52 |> withCodepage "0x0" |> asExe @@ -78,9 +82,10 @@ module codepage = //# Negative cases // SOURCE=E_OutOfRangeArgument01.fs SCFLAGS="--codepage:65536" # E_OutOfRangeArgument01.fs - [] + [] let ``OutOfRangeArgument01_fs`` compilation = compilation + |> getCompilation |> asExe |> withCodepage "65536" |> compile @@ -95,9 +100,10 @@ Parameter name: codepage") ] // SOURCE=E_OutOfRangeArgument01.fs SCFLAGS="--codepage:65536" FSIMODE=EXEC # E_OutOfRangeArgument01.fs-fsi - [] + [] let ``E_OutOfRangeArgument01_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withCodepage "65536" |> compile @@ -112,9 +118,10 @@ Parameter name: codepage") ] // SOURCE=E_NegativeArgument01.fs SCFLAGS="--codepage:-1" # E_NegativeArgument01.fs - [] + [] let ``E_NegativeArgument01_fs`` compilation = compilation + |> getCompilation |> asExe |> withCodepage "-1" |> compile @@ -129,9 +136,10 @@ Parameter name: codepage") ] // SOURCE=E_NegativeArgument01.fs SCFLAGS="--codepage:-1" FSIMODE=EXEC # E_NegativeArgument01.fs-fsi - [] + [] let ``E_NegativeArgument01_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withCodepage "-1" |> compile @@ -146,9 +154,10 @@ Parameter name: codepage") ] // SOURCE=E_NotAValidInteger01.fs SCFLAGS="--codepage:invalidinteger" # E_NotAValidInteger01.fs - [] + [] let ``E_NotAValidInteger01_fs`` compilation = compilation + |> getCompilation |> asExe |> withCodepage "invalidinteger" |> compile @@ -158,9 +167,10 @@ Parameter name: codepage") ] // SOURCE=E_NotAValidInteger01.fs SCFLAGS="--codepage:invalidinteger" FSIMODE=EXEC # E_NotAValidInteger01.fs-fsi - [] + [] let ``E_NotAValidInteger01_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withCodepage "invalidinteger" |> compile @@ -170,9 +180,10 @@ Parameter name: codepage") ] // SOURCE=E_RequiresParameter01.fs TAILFLAGS="--codepage" # E_RequiresParameter01.fs - [] + [] let ``E_RequiresParameter01_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--codepage"] |> compile @@ -182,9 +193,10 @@ Parameter name: codepage") ] // SOURCE=E_RequiresParameter01.fs TAILFLAGS="--codepage" FSIMODE=EXEC # E_RequiresParameter01.fs-fsi - [] + [] let ``E_RequiresParameter01_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--codepage"] |> compile @@ -194,9 +206,10 @@ Parameter name: codepage") ] // SOURCE=E_DefaultCodePage02.fsx COMPILE_ONLY=1 # E_DefaultCodePage02.fsx - [] + [] let ``libCodepage_fs`` compilation = compilation + |> getCompilation |> asLibrary |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework/noframework.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework/noframework.fs index 7847debd5a7..4b046928e9d 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework/noframework.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/noframework/noframework.fs @@ -6,13 +6,14 @@ open Xunit open FSharp.Test open FSharp.Test.Compiler -module noframework = +module Noframework = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/noframework) // - [] + [] let ``noframework - noframework02_fs - --noframework`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--noframework"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/platform.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/platform.fs index 9b320af3d8a..e52f293e8cf 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/platform.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/platform/platform.fs @@ -6,13 +6,14 @@ open Xunit open FSharp.Test open FSharp.Test.Compiler -module platform = +module Platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_16_fs - --target:library --platform:anycpu32bitpreferred`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--target:library"; "--platform:anycpu32bitpreferred"] |> compile @@ -23,9 +24,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_01_fs - --PLATFORM:anycpu`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--PLATFORM:anycpu"] |> compile @@ -36,9 +38,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_02_fs - --PlatForm:anycpu`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--PlatForm:anycpu"] |> compile @@ -49,9 +52,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_03_fs - --platform:ITANIUM`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:ITANIUM"] |> compile @@ -62,9 +66,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_04_fs - --platform:ANYCPU`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:ANYCPU"] |> compile @@ -75,9 +80,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_05_fs - --platform:X86`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:X86"] |> compile @@ -88,9 +94,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_06_fs - --platform:X64`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:X64"] |> compile @@ -101,9 +108,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_07_fs - --platform:IA64`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:IA64"] |> compile @@ -114,9 +122,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_08_fs - --platform:i386`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:i386"] |> compile @@ -127,9 +136,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_09_fs - --platform:AMD64`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:AMD64"] |> compile @@ -140,9 +150,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_10_fs - --platform:PPC`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:PPC"] |> compile @@ -153,9 +164,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_15_fs - --platform:ARM`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform:ARM"] |> compile @@ -166,9 +178,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_11_fs - --platform-:anycpu`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--platform-:anycpu"] |> compile @@ -179,9 +192,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_12_fs - --PLATFORM+:anycpu`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--PLATFORM+:anycpu"] |> compile @@ -192,9 +206,10 @@ module platform = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/platform) - [] + [] let ``platform - error_13_fs - ---platform:anycpu`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["---platform:anycpu"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/times.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/times.fs index 7b137c24c15..6e4847ee498 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/times.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/times/times.fs @@ -10,13 +10,14 @@ open System.IO // reportTime uses global state. [] -module times = +module Times = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/times) - [] + [] let ``times - error_01_fs - --Times`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--Times"] |> typecheck @@ -27,9 +28,10 @@ module times = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/times) - [] + [] let ``times - error_02_fs - --times-`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--times-"] |> typecheck @@ -40,9 +42,10 @@ module times = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/times) - [] + [] let ``times - error_03_fs - --times+`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--times+"] |> typecheck @@ -51,9 +54,10 @@ module times = |> withDiagnosticMessageMatches "Unrecognized option: '--times\+'" |> ignore - [] + [] let ``times - to console`` compilation = compilation + |> getCompilation |> asFsx |> withBufferWidth 120 |> withOptions ["--times"] @@ -66,13 +70,15 @@ module times = "Duration"|] - [] + [] + [] let ``times - to csv file`` compilation = let tempPath = Path.Combine(Path.GetTempPath(),Guid.NewGuid().ToString() + ".csv") use _ = {new IDisposable with member this.Dispose() = File.Delete(tempPath) } compilation + |> getCompilation |> asFsx |> withOptions ["--times:"+tempPath] |> ignoreWarnings diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn.fs index 9dd6dea0e91..153bff74a70 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warn/warn.fs @@ -6,11 +6,12 @@ open Xunit open FSharp.Test open FSharp.Test.Compiler -module TestCompilerWarningLevel = +module CompilerWarningLevel = - [] + [] let ``warn_level0_fs --warn:0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> asExe |> withOptions ["--warn:0"] @@ -18,41 +19,46 @@ module TestCompilerWarningLevel = |> shouldSucceed |> withDiagnostics [] - [] + [] let ``warn_level1_fs --warn:1 --warnaserror:52`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:1"; "--warnaserror:52"] |> compile |> shouldSucceed - [] + [] let ``warn_level2_fs --warn:2 --warnaserror:52`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:2"; "--warnaserror:52"] |> compile |> shouldSucceed - [] + [] let ``warn_level3_fs --warn:3 --warnaserror:52`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:3"; "--warnaserror:52"] |> compile |> shouldSucceed - [] + [] let ``warn_level4_fs --warn:4 --warnaserror:52`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:4"; "--warnaserror:52"] |> compile |> shouldSucceed - [] + [] let ``warn_level5_fs --warn:5 --warnaserror:52`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:5"; "--warnaserror:52"] |> compile @@ -61,9 +67,10 @@ module TestCompilerWarningLevel = |> withDiagnosticMessageMatches "The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed$" |> ignore - [] + [] let ``warn_level5_fs --warn:5`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:5"] |> compile @@ -74,9 +81,10 @@ module TestCompilerWarningLevel = #if NETSTANDARD // This test works with KeyValuePair, which is not a 'readonly struct' in net472 - [] + [] let ``no error 52 with readonly struct`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:5"; "--warnaserror:52"] |> compile @@ -84,9 +92,10 @@ module TestCompilerWarningLevel = |> ignore #endif - [] + [] let ``warn_level6_fs --warn:6`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warn:6"] |> compile @@ -95,18 +104,20 @@ module TestCompilerWarningLevel = |> withDiagnosticMessageMatches "Invalid warning level '6'" |> ignore - [] + [] let ``nowarn_fs --warnaserror`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror"] |> compileAndRun |> shouldSucceed |> ignore - [] + [] let ``warn40_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -117,9 +128,10 @@ module TestCompilerWarningLevel = ] |> ignore - [] + [] let ``warn40_fs --warnaserror`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror"] |> compile @@ -131,27 +143,30 @@ module TestCompilerWarningLevel = ] |> ignore - [] + [] let ``warn40_fs --nowarn:40;21`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:40;21"] |> compileAndRun |> shouldSucceed |> ignore - [] + [] let ``warn40_fs --nowarn:NU0000;FS40;NU0001`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:NU0000;FS40;NU0001;FS21"] |> compileAndRun |> shouldSucceed |> ignore - [] + [] let ``warn40_fs --nowarn:FS0040`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:FS0040"; "--nowarn:FS0021"] |> compileAndRun diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon/warnon.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon/warnon.fs index 130c7058c6f..c726ecbde87 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon/warnon.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/warnon/warnon.fs @@ -6,13 +6,14 @@ open Xunit open FSharp.Test open FSharp.Test.Compiler -module warnon = +module CompilerWarnOn = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/warnon) //The value 'n' is unused$ - [] + [] let ``warnon - warnon01_fs - --warnon:1182 --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnon:1182"; "--test:ErrorRanges"] |> compile @@ -23,9 +24,10 @@ module warnon = // This test was automatically generated (moved from FSharpQA suite - CompilerOptions/fsc/warnon) //The value 'n' is unused$ - [] + [] let ``warnon - warnon01_fs - --warnon:NU0001;FS1182;NU0001 --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnon:NU0001;FS1182;NU0001"; "--test:ErrorRanges"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/Basic/Basic.fs index 869e4ba9930..01072db0902 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/Basic/Basic.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/Basic/Basic.fs @@ -6,7 +6,7 @@ open Xunit open FSharp.Test open FSharp.Test.Compiler -module AccessibilityAnnotations_Basic = +module AccessibilityBasic = let verifyCompile compilation = compilation @@ -21,9 +21,10 @@ module AccessibilityAnnotations_Basic = |> compileAndRun //SOURCE=E_ExposeLessVisible01.fs # E_ExposeLessVisible01.fs - [] + [] let ``E_ExposeLessVisible01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -31,9 +32,10 @@ module AccessibilityAnnotations_Basic = ] //SOURCE=E_BaseIFaceLessAccessible01.fs SCFLAGS="-a --test:ErrorRanges" # E_BaseIFaceLessAccessible01.fs - [] + [] let ``E_BaseIFaceLessAccessible01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -41,9 +43,10 @@ module AccessibilityAnnotations_Basic = ] //SOURCE=E_LocalLetBinding02.fs SCFLAGS="--test:ErrorRanges" # E_LocalLetBinding02.fs - [] + [] let ``E_LocalLetBinding02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -51,9 +54,10 @@ module AccessibilityAnnotations_Basic = ] //SOURCE=E_privateThingsInaccessible.fs # E_privateThingsInaccessible.fs - [] + [] let ``E_privateThingsInaccessible_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -63,9 +67,10 @@ module AccessibilityAnnotations_Basic = ] //SOURCE=E_privateThingsInaccessible02.fs SCFLAGS="--test:ErrorRanges" # E_privateThingsInaccessible02.fs - [] + [] let ``E_PrivateThingsInaccessible02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -78,9 +83,10 @@ module AccessibilityAnnotations_Basic = ] //SOURCE=E_privateThingsInaccessible03.fs SCFLAGS="--test:ErrorRanges" # E_privateThingsInaccessible03.fs - [] + [] let ``E_PrivateThingsInaccessible03_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -90,9 +96,10 @@ module AccessibilityAnnotations_Basic = ] //SOURCE=E_privateThingsInaccessible04.fs SCFLAGS="--test:ErrorRanges" # E_privateThingsInaccessible04.fs - [] + [] let ``E_PrivateThingsInaccessible04_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -103,9 +110,10 @@ module AccessibilityAnnotations_Basic = ] //SOURCE=E_privateThingsInaccessible05.fs SCFLAGS="--test:ErrorRanges" # E_privateThingsInaccessible05.fs - [] + [] let ``E_PrivateThingsInaccessible05_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -113,9 +121,10 @@ module AccessibilityAnnotations_Basic = ] //SOURCE=E_PrivateImplicitCtor01.fs SCFLAGS="--test:ErrorRanges" # E_PrivateImplicitCtor01.fs - [] + [] let ``E_PrivateImplicitCtor01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -123,9 +132,10 @@ module AccessibilityAnnotations_Basic = ] //SOURCE=E_ProtectedThingsInaccessible01.fs SCFLAGS="--test:ErrorRanges" # E_ProtectedThingsInaccessible01.fs - [] + [] let ``E_ProtectedThingsInaccessible01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -133,9 +143,10 @@ module AccessibilityAnnotations_Basic = ] //SOURCE=E_MoreAccessibleBaseClass01.fs # E_MoreAccessibleBaseClass01.fs - [] + [] let ``E_MoreAccessibleBaseClass01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -143,9 +154,10 @@ module AccessibilityAnnotations_Basic = ] //SOURCE=E_MoreAccessibleBaseClass02.fs # E_MoreAccessibleBaseClass02.fs - [] + [] let ``E_MoreAccessibleBaseClass02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -154,38 +166,43 @@ module AccessibilityAnnotations_Basic = ] //SOURCE=InterfaceImplementationVisibility.fs # InterfaceImplementationVisibility.fs - [] + [] let ``InterfaceImplementationVisibility_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=InternalizedIFaces02.fs SCFLAGS="-a --warnaserror" # InternalizedIFaces02.fs - [] + [] let ``InternalizedIFaces02_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:1178";] |> verifyCompileAndRun |> shouldSucceed //SOURCE=internalMethodsWorkCorrectly.fs # InternalMethodsWorkCorrectly.fs - [] + [] let ``InternalMethodsWorkCorrectly_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=LessOrMoreAccessibleCode01.fs # LessOrMoreAccessibleCode01.fs - [] + [] let ``LessOrMoreAccessibleCode01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=LocalLetBinding01.fs SCFLAGS="-a --test:ErrorRanges" # LocalLetBinding01.fs - [] + [] let ``LocalLetBinding01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_InterfaceImpl01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverrides/E_InterfaceImpl01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_InterfaceImpl01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverrides/E_InterfaceImpl01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverrides/E_OnOverrides01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverrides/E_OnOverrides01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverrides/E_OnOverrides02.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverrides/E_OnOverrides02.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides03.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverrides/E_OnOverrides03.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides03.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverrides/E_OnOverrides03.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides04.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverrides/E_OnOverrides04.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides04.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverrides/E_OnOverrides04.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides05.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverrides/E_OnOverrides05.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides05.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverrides/E_OnOverrides05.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/OnOverridesAndIFaceImpl.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverrides/OnOverrides.fs similarity index 88% rename from tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/OnOverridesAndIFaceImpl.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverrides/OnOverrides.fs index d60a82f8f62..729adc6159e 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/OnOverridesAndIFaceImpl.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnOverrides/OnOverrides.fs @@ -6,7 +6,7 @@ open Xunit open FSharp.Test open FSharp.Test.Compiler -module AccessibilityAnnotations_OnOverridesAndIFaceImpl = +module OnOverrides = let verifyCompile compilation = compilation @@ -21,9 +21,10 @@ module AccessibilityAnnotations_OnOverridesAndIFaceImpl = |> compileAndRun // SOURCE=E_InterfaceImpl01.fs SCFLAGS="--test:ErrorRanges" # E_InterfaceImpl01.fs - [] + [] let ``E_InterfaceImpl01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -33,9 +34,10 @@ module AccessibilityAnnotations_OnOverridesAndIFaceImpl = ] // SOURCE=E_OnOverrides01.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides01.fs - [] + [] let ``E_OnOverrides01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -45,9 +47,10 @@ module AccessibilityAnnotations_OnOverridesAndIFaceImpl = ] // SOURCE=E_OnOverrides02.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides02.fs - [] + [] let ``E_OnOverrides02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -57,9 +60,10 @@ module AccessibilityAnnotations_OnOverridesAndIFaceImpl = ] // SOURCE=E_OnOverrides03.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides03.fs - [] + [] let ``E_OnOverrides03_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -69,9 +73,10 @@ module AccessibilityAnnotations_OnOverridesAndIFaceImpl = ] // SOURCE=E_OnOverrides04.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides04.fs - [] + [] let ``E_OnOverrides04_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -81,9 +86,10 @@ module AccessibilityAnnotations_OnOverridesAndIFaceImpl = ] // SOURCE=E_OnOverrides05.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides05.fs - [] + [] let ``E_OnOverrides05_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnTypeMembers/OnTypeMembers.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnTypeMembers/OnTypeMembers.fs index 49c79c2600d..9d8b4f134ec 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnTypeMembers/OnTypeMembers.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/OnTypeMembers/OnTypeMembers.fs @@ -6,7 +6,7 @@ open Xunit open FSharp.Test open FSharp.Test.Compiler -module AccessibilityAnnotations_OnTypeMembers = +module OnTypeMembers = let verifyCompile compilation = compilation @@ -21,33 +21,36 @@ module AccessibilityAnnotations_OnTypeMembers = |> compileAndRun // SOURCE=AccessProtectedStatic01.fs SCFLAGS="-r:BaseClass.dll" PRECMD="\$CSC_PIPE /target:library BaseClass.cs" # AccessProtectedStatic01.fs - [] + [] let ``AccessProtectedStatic01_fs`` compilation = let lib = CSharpFromPath (__SOURCE_DIRECTORY__ ++ "BaseClass.cs") |> withName "ReadWriteLib" compilation + |> getCompilation |> withReferences [lib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=E_AccessProtectedInstance01.fs SCFLAGS="-r:BaseClass.dll --test:ErrorRanges" PRECMD="\$CSC_PIPE /target:library BaseClass.cs" # AccessProtectedInstance01.fs - [] + [] let ``AccessProtectedInstance01_fs`` compilation = let lib = CSharpFromPath (__SOURCE_DIRECTORY__ ++ "BaseClass.cs") |> withName "ReadWriteLib" compilation + |> getCompilation |> withReferences [lib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=E_AccessPrivateMember01.fs SCFLAGS="--test:ErrorRanges" # E_AccessPrivateMember01.fs - [] + [] let ``E_AccessPrivateMember01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -56,9 +59,10 @@ module AccessibilityAnnotations_OnTypeMembers = ] // SOURCE=E_OnProperty01.fs # E_OnProperty01.fs - [] + [] let ``E_OnProperty01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -77,9 +81,10 @@ module AccessibilityAnnotations_OnTypeMembers = ] // SOURCE=E_OnProperty02.fs SCFLAGS="--test:ErrorRanges" # E_OnProperty02.fs - [] + [] let ``E_OnProperty02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -94,8 +99,9 @@ module AccessibilityAnnotations_OnTypeMembers = ] // SOURCE=OnProperty01.fs # OnProperty01.fs - [] + [] let ``OnProperty01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/PermittedLocations/PermittedLocations.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/PermittedLocations/PermittedLocations.fs index 7f4c02ab56f..c1bf3a09460 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/PermittedLocations/PermittedLocations.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/AccessibilityAnnotations/PermittedLocations/PermittedLocations.fs @@ -21,9 +21,10 @@ module AccessibilityAnnotations_PermittedLocations = |> compileAndRun // SOURCE=E_accessibilityOnInterface.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface.fs - [] + [] let ``E_accessibilityOnInterface_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -39,9 +40,10 @@ module AccessibilityAnnotations_PermittedLocations = ] // SOURCE=E_accessibilityOnInterface01.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface01.fs - [] + [] let ``E_accessibilityOnInterface01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -50,9 +52,10 @@ module AccessibilityAnnotations_PermittedLocations = ] // SOURCE=E_accessibilityOnInterface02.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface02.fs - [] + [] let ``E_accessibilityOnInterface02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -61,9 +64,10 @@ module AccessibilityAnnotations_PermittedLocations = ] // SOURCE=E_accessibilityOnInterface03.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface03.fs - [] + [] let ``E_accessibilityOnInterface03_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -72,9 +76,10 @@ module AccessibilityAnnotations_PermittedLocations = ] // SOURCE=E_accessibilityOnInterface04.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface04.fs - [] + [] let ``E_accessibilityOnInterface04_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -82,9 +87,10 @@ module AccessibilityAnnotations_PermittedLocations = ] // SOURCE=E_accessibilityOnInterface05.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface05.fs - [] + [] let ``E_accessibilityOnInterface05_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -92,9 +98,10 @@ module AccessibilityAnnotations_PermittedLocations = ] // SOURCE=E_accessibilityOnInterface06.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface06.fs - [] + [] let ``E_accessibilityOnInterface06_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -102,9 +109,10 @@ module AccessibilityAnnotations_PermittedLocations = ] // SOURCE=E_accessibilityOnRecords.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnRecords.fs - [] + [] let ``E_accessibilityOnRecords_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -114,9 +122,10 @@ module AccessibilityAnnotations_PermittedLocations = ] // SOURCE=E_accessibilityOnRecords02.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnRecords02.fs - [] + [] let ``E_accessibilityOnRecords02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -124,9 +133,10 @@ module AccessibilityAnnotations_PermittedLocations = ] // SOURCE=E_orderingOfAccessibilityKeyword_let01.fs SCFLAGS="--test:ErrorRanges" # E_orderingOfAccessibilityKeyword_let01.fs - [] + [] let ``E_orderingOfAccessibilityKeyword_let01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -138,9 +148,10 @@ module AccessibilityAnnotations_PermittedLocations = ] // SOURCE=E_orderingOfAccessibilityKeyword_member01.fs SCFLAGS="--test:ErrorRanges" # E_orderingOfAccessibilityKeyword_member01.fs - [] + [] let ``E_orderingOfAccessibilityKeyword_member01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -148,9 +159,10 @@ module AccessibilityAnnotations_PermittedLocations = ] // SOURCE=E_orderingOfAccessibilityKeyword_module01.fs SCFLAGS="--test:ErrorRanges" # E_orderingOfAccessibilityKeyword_module01.fs - [] + [] let ``E_orderingOfAccessibilityKeyword_module01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -158,9 +170,10 @@ module AccessibilityAnnotations_PermittedLocations = ] // SOURCE=E_orderingOfAccessibilityKeyword_type01.fs SCFLAGS="--test:ErrorRanges" # E_orderingOfAccessibilityKeyword_type01.fs - [] + [] let ``E_orderingOfAccessibilityKeyword_type01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/ArgumentsOfAllTypes/ArgumentsOfAllTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/ArgumentsOfAllTypes/ArgumentsOfAllTypes.fs index 0441cec5f39..f6b2dc08db1 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/ArgumentsOfAllTypes/ArgumentsOfAllTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/ArgumentsOfAllTypes/ArgumentsOfAllTypes.fs @@ -26,7 +26,7 @@ module CustomAttributes_ArgumentsOfAllTypes = |> compileAndRun // SOURCE=System_Int16_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Int16.dll" # System_Int16_Consumer.fsx - [] + [] let ``System_Int16_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_Int16.fsx") @@ -34,12 +34,13 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=System_Int32_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Int32.dll" # System_Int32_Consumer.fsx - [] + [] let ``System_Int32_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_Int32.fsx") @@ -47,12 +48,13 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=System_Int64_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Int64.dll" # System_Int64_Consumer.fsx - [] + [] let ``System_Int64_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_Int64.fsx") @@ -60,12 +62,13 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=System_UInt16_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_UInt16.dll" # System_UInt16_Consumer.fsx - [] + [] let ``System_UInt16_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_UInt16.fsx") @@ -73,12 +76,13 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=System_UInt32_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_UInt32.dll" # System_UInt32_Consumer.fsx - [] + [] let ``System_UInt32_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_UInt32.fsx") @@ -86,12 +90,13 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=System_UInt64_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_UInt64.dll" # System_UInt64_Consumer.fsx - [] + [] let ``System_UInt64_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_UInt64.fsx") @@ -99,12 +104,13 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=System_Char_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Char.dll" # System_Char_Consumer.fsx - [] + [] let ``System_Char_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_Char.fsx") @@ -112,12 +118,13 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=System_Byte_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Byte.dll" # System_Byte_Consumer.fsx - [] + [] let ``System_Byte_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_Byte.fsx") @@ -125,12 +132,13 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=System_SByte_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_SByte.dll" # System_SByte_Consumer.fsx - [] + [] let ``System_SByte_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_SByte.fsx") @@ -138,12 +146,13 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=System_Single_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Single.dll" # System_Single_Consumer.fsx - [] + [] let ``System_Single_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_Single.fsx") @@ -151,12 +160,13 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=System_Double_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Double.dll" # System_Double_Consumer.fsx - [] + [] let ``System_Double_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_Double.fsx") @@ -164,12 +174,13 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=System_String_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_String.dll" # System_String_Consumer.fsx - [] + [] let ``System_String_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_String.fsx") @@ -177,12 +188,13 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=System_DateTimeKind_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_DateTimeKind.dll" # System_DateTimeKind_Consumer.fsx - [] + [] let ``System_DateTimeKind_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_DateTimeKind.fsx") @@ -190,12 +202,13 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=System_Type_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Type.dll" # System_Type_Consumer.fsx - [] + [] let ``System_Type_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_Type.fsx") @@ -203,12 +216,13 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=System_Object_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_Object.dll" # System_Object_Consumer.fsx - [] + [] let ``System_Object_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_Object.fsx") @@ -216,12 +230,13 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=System_TypeArray_Consumer.fsx SCFLAGS="-r CSLibraryWithAttributes.dll -r System_TypeArray.dll" # System_TypeArray_Consumer.fsx - [] + [] let ``System_TypeArray_Consumer_fsx`` compilation = let fslib = FsFromPath (__SOURCE_DIRECTORY__ ++ "System_TypeArray.fsx") @@ -229,6 +244,7 @@ module CustomAttributes_ArgumentsOfAllTypes = |> withReferences [csLibraryWithAttributes] compilation + |> getCompilation |> withReferences [fslib] |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeInheritance/AttributeInheritance.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeInheritance/AttributeInheritance.fs index b8da6bc61b2..9b70f19c8d8 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeInheritance/AttributeInheritance.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeInheritance/AttributeInheritance.fs @@ -21,17 +21,19 @@ module CustomAttributes_AttributeInheritance = |> compileAndRun // SOURCE=InheritedAttribute_001.fs SCFLAGS="--target:library --warnaserror:3242" # InheritedAttribute_001.fs - [] + [] let ``InheritedAttribute_001_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:3242"] |> verifyCompile |> shouldSucceed // SOURCE=InheritedAttribute_002.fs SCFLAGS="--target:library" # InheritedAttribute_002.fs - [] + [] let ``InheritedAttribute_002_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:3242"] |> verifyCompile |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs index 9b7cdc5a053..0700514d912 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. namespace Conformance.BasicGrammarElements @@ -21,83 +21,94 @@ module CustomAttributes_AttributeUsage = |> compileAndRun // SOURCE=AssemblyVersion01.fs # AssemblyVersion01.fs - [] + [] let ``AssemblyVersion01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=AssemblyVersion02.fs # AssemblyVersion02.fs - [] + [] let ``AssemblyVersion02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=AssemblyVersion03.fs # AssemblyVersion03.fs - [] + [] let ``AssemblyVersion03_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:52"] |> verifyCompileAndRun |> shouldSucceed // SOURCE=AssemblyVersion04.fs # AssemblyVersion04.fs - [] + [] let ``AssemblyVersion04_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:52"] |> verifyCompileAndRun |> shouldSucceed // SOURCE=AttributeTargetsIsCtor01.fs # AttributeTargetsIsCtor01.fs - [] + [] let ``AttributeTargetsIsCtor01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=AttributeTargetsIsMethod01.fs # AttributeTargetsIsMethod01.fs - [] + [] let ``AttributeTargetsIsMethod01_fs 8.0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompileAndRun |> shouldSucceed // SOURCE=AttributeTargetsIsMethod01.fs # AttributeTargetsIsMethod01.fs - [] + [] let ``AttributeTargetsIsMethod01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=AttributeTargetsIsProperty.fs # AttributeTargetsIsProperty.fs - [] + [] let ``AttributeTargetsIsProperty_fs 8.0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=AttributeTargetsIsProperty.fs # AttributeTargetsIsProperty.fs - [] + [] let ``AttributeTargetsIsProperty_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldSucceed // SOURCE=ConditionalAttribute.fs # ConditionalAttribute.fs - [] + [] let ``ConditionalAttribute_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=E_AttributeTargets01.fs # E_AttributeTargets01.fs - [] + [] let ``E_AttributeTargets01_fs`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -109,9 +120,10 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=E_AttributeTargets02.fs # E_AttributeTargets02.fs - [] + [] let ``E_AttributeTargets02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -121,18 +133,20 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=E_AttributeTargetIsField01.fs # E_AttributeTargetIsField01.fs - [] + [] let ``E_AttributeTargetIsField01_fs 8_0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> withOptions ["--nowarn:25"] |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsField01.fs # E_AttributeTargetIsField01.fs - [] + [] let ``E_AttributeTargetIsField01_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:25"] |> withLangVersion90 |> verifyCompile @@ -158,35 +172,39 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=E_AttributeTargetIsField02.fs # E_AttributeTargetIsField02.fs - [] + [] let ``E_AttributeTargetIsField02_fs 8.0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> withOptions ["--nowarn:25"] |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsField02.fs # E_AttributeTargetIsField02.fs - [] + [] let ``E_AttributeTargetIsField02_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:25"] |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsMethod02.fs # E_AttributeTargetIsMethod02.fs - [] + [] let ``E_AttributeTargetIsMethod02_fs 8_0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> withOptions ["--nowarn:25"] |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsMethod02.fs # E_AttributeTargetIsMethod02.fs - [] + [] let ``E_AttributeTargetIsMethod02_fs`` compilation = compilation + |> getCompilation |> withLangVersion90 |> withOptions ["--nowarn:25"] |> verifyCompile @@ -206,18 +224,20 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=E_AttributeTargetIsMethod03.fs # E_AttributeTargetIsMethod03.fs - [] + [] let ``E_AttributeTargetIsMethod03_fs 8_0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> withOptions ["--nowarn:25"] |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsMethod03.fs # E_AttributeTargetIsMethod03.fs - [] + [] let ``E_AttributeTargetIsMethod03_fs`` compilation = compilation + |> getCompilation |> withLangVersion90 |> withOptions ["--nowarn:25"] |> verifyCompile @@ -241,9 +261,10 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=E_AttributeTargetIsMethod04.fs # E_AttributeTargetIsMethod04.fs - [] + [] let ``E_AttributeTargetIsMethod04_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:25"] |> verifyCompile |> shouldFail @@ -253,9 +274,10 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=E_ConditionalAttribute.fs SCFLAGS="--test:ErrorRanges" # E_ConditionalAttribute.fs - [] + [] let ``E_ConditionalAttribute_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -263,9 +285,10 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=E_RequiresExplicitTypeArguments01.fs SCFLAGS="--test:ErrorRanges" # E_RequiresExplicitTypeArguments01.fs - [] + [] let ``E_RequiresExplicitTypeArguments01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -275,9 +298,10 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=E_RequiresExplicitTypeArguments02.fs SCFLAGS="--test:ErrorRanges" # E_RequiresExplicitTypeArguments02.fs - [] + [] let ``E_RequiresExplicitTypeArguments02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -285,9 +309,10 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=E_WithBitwiseOr01.fsx SCFLAGS="--test:ErrorRanges -a" # E_WithBitwiseOr01.fsx - [] + [] let ``E_WithBitwiseOr01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -295,47 +320,53 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=AttributeTargetIsStruct.fs # AttributeTargetIsStruct.fs - [] + [] let ``AttributeTargetIsStruct_fs 8.0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=AttributeTargetIsStruct.fs # AttributeTargetIsStruct.fs - [] + [] let ``AttributeTargetIsStruct_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldSucceed // SOURCE=AttributeTargetIsClass.fs # AttributeTargetIsClass.fs - [] + [] let ``AttributeTargetIsClass_fs 8.0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=AttributeTargetIsClass.fs # AttributeTargetIsClass.fs - [] + [] let ``AttributeTargetIsClass_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsStruct.fs # E_AttributeTargetIsStruct.fs - [] + [] let ``E_AttributeTargetIsStruct_fs 8.0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsStruct.fs # E_AttributeTargetIsStruct.fs - [] + [] let ``E_AttributeTargetIsStruct_fs`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -355,17 +386,19 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=E_AttributeTargetIsClass.fs # E_AttributeTargetIsClass.fs - [] + [] let ``E_AttributeTargetIsClass_fs 8_0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsClass.fs # E_AttributeTargetIsClass.fs - [] + [] let ``E_AttributeTargetIsClass_fs`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -376,17 +409,19 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=E_AttributeTargetIsClass01.fs # E_AttributeTargetIsClass01.fs - [] + [] let ``E_AttributeTargetIsClass01_fs 8_0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsClass01.fs # E_AttributeTargetIsClass01.fs - [] + [] let ``E_AttributeTargetIsClass01_fs`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -396,30 +431,34 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=MarshalAsAttribute.fs # MarshalAsAttribute.fs - [] + [] let ``MarshalAsAttribute_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=RequiresExplicitTypeArguments01.fs # RequiresExplicitTypeArguments01.fs - [] + [] let ``RequiresExplicitTypeArguments01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=RequiresExplicitTypeArguments02.fs # RequiresExplicitTypeArguments02.fs - [] + [] let ``RequiresExplicitTypeArguments02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=W_AssemblyVersion01.fs SCFLAGS="--test:ErrorRanges" # W_AssemblyVersion01.fs - [] + [] let ``W_AssemblyVersion01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -427,9 +466,10 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=W_AssemblyVersion02.fs SCFLAGS="--test:ErrorRanges" # W_AssemblyVersion02.fs - [] + [] let ``W_AssemblyVersion02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -437,23 +477,26 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=WithBitwiseOr02a.fsx SCFLAGS=-a # WithBitwiseOr02a.fsx - [] + [] let ``WithBitwiseOr02a_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=WithBitwiseOr02b.fsx SCFLAGS=-a # WithBitwiseOr02b.fsx - [] + [] let ``WithBitwiseOr02b_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=X_AssemblyVersion01.fs SCFLAGS="--test:ErrorRanges" # X_AssemblyVersion01.fs - [] + [] let ``X_AssemblyVersion01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -461,9 +504,10 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=X_AssemblyVersion02.fs SCFLAGS="--test:ErrorRanges" # X_AssemblyVersion02.fs - [] + [] let ``X_AssemblyVersion02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -471,9 +515,10 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=E_AttributeTargetIsField03.fs # E_AttributeTargetIsField03.fs - [] + [] let ``E_AttributeTargetIsField03_fs 8_0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldFail @@ -482,9 +527,10 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=E_AttributeTargetIsField03.fs # E_AttributeTargetIsField03.fs - [] + [] let ``E_AttributeTargetIsField03_fs`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -494,17 +540,19 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=E_AttributeTargetIsProperty01.fs # E_AttributeTargetIsField03.fs - [] + [] let ``E_AttributeTargetIsProperty01_fs 8_0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsProperty01.fs # E_AttributeTargetIsField03.fs - [] + [] let ``E_AttributeTargetIsProperty01_fs`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -514,17 +562,19 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=E_AttributeTargetIsCtor01.fs # E_AttributeTargetIsCtor01.fs - [] + [] let ``E_AttributeTargetIsCtor01_fs 8_0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsCtor01.fs # E_AttributeTargetIsCtor01.fs - [] + [] let ``E_AttributeTargetIsCtor01_fs`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -536,32 +586,36 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=AttributeTargetsIsEnum01.fs # AttributeTargetsIsEnum01.fs - [] + [] let ``AttributeTargetsIsEnum01_fs 8.0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=AttributeTargetsIsEnum01.fs # AttributeTargetsIsEnum01.fs - [] + [] let ``AttributeTargetsIsEnum01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsEnum01.fs # E_AttributeTargetIsEnum01.fs - [] + [] let ``E_AttributeTargetIsEnum01_fs 8_0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsEnum01.fs # E_AttributeTargetIsEnum01.fs - [] + [] let ``E_AttributeTargetIsEnum01_fs`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -573,32 +627,36 @@ module CustomAttributes_AttributeUsage = ] // SOURCE=AttributeTargetsIsDelegate01.fs # AttributeTargetsIsDelegate01.fs - [] + [] let ``AttributeTargetsIsDelegate01_fs 8.0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=AttributeTargetsIsDelegate01.fs # AttributeTargetsIsDelegate01.fs - [] + [] let ``AttributeTargetsIsDelegate01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsDelegate01.fs # E_AttributeTargetIsDelegate01.fs - [] + [] let ``E_AttributeTargetIsDelegate01_fs 8.0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsDelegate01.fs # E_AttributeTargetIsDelegate01.fs - [] + [] let ``E_AttributeTargetsIsDelegate01_fs`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -621,33 +679,37 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = |> shouldSucceed // SOURCE=AttributeTargetsIsInterface.fs # AttributeTargetsIsInterface.fs - [] + [] let ``AttributeTargetsIsInterface_fs 8.0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=AttributeTargetsIsInterface.fs # AttributeTargetsIsInterface.fs - [] + [] let ``AttributeTargetsIsInterface_fs`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsInterface.fs # E_AttributeTargetIsInterface.fs - [] + [] let ``E_AttributeTargetIsInterface_fs 8_0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsInterface.fs # E_AttributeTargetIsInterface.fs - [] + [] let ``E_AttributeTargetIsInterface_fs`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -659,17 +721,19 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = ] // SOURCE= E_AttributeTargetIsClass02.fs # E_AttributeTargetIsClass02.fs - [] + [] let ``E_AttributeTargetIsClass02_fs 8.0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=E_AttributeTargetIsClass02.fs # E_AttributeTargetIsClass02.fs - [] + [] let ``E_AttributeTargetIsClass02_fs`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -689,25 +753,28 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = ] // SOURCE= CLIMutableAttribute01.fs # CLIMutableAttribute01.fs - [] + [] let ``CLIMutableAttribute01 8.0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=CLIMutableAttribute01.fs # CLIMutableAttribute01.fs - [] + [] let ``CLIMutableAttribute01 90`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldSucceed // SOURCE= E_CLIMutableAttribute.fs # E_CLIMutableAttribute.fs - [] + [] let ``E_CLIMutableAttribute 8.0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldFail @@ -723,9 +790,10 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = ] // SOURCE=E_CLIMutableAttribute.fs # E_CLIMutableAttribute.fs - [] + [] let ``E_CLIMutableAttribute 90`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -741,9 +809,10 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = ] // SOURCE= E_AllowNullLiteral.fs # E_AllowNullLiteral.fs - [] + [] let ``E_AllowNullLiteral 8.0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldFail @@ -760,9 +829,10 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = ] // SOURCE=E_AllowNullLiteral.fs # E_AllowNullLiteral.fs - [] + [] let ``E_AllowNullLiteral 90`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -779,25 +849,28 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = ] // SOURCE= AllowNullLiteral01.fs # AllowNullLiteral01.fs - [] + [] let ``AllowNullLiteral01 8.0`` compilation = compilation + |> getCompilation |> withLangVersion80 |> verifyCompile |> shouldSucceed // SOURCE=AllowNullLiteral01.fs # AllowNullLiteral01.fs - [] + [] let ``AllowNullLiteral01 90`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldSucceed // SOURCE= E_VolatileField.fs # E_VolatileField.fs - [] + [] let ``E_VolatileField 9.0`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -815,9 +888,10 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = ] // SOURCE=E_VolatileField.fs # E_VolatileField.fs - [] + [] let ``E_VolatileField 90`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -835,25 +909,28 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = ] // SOURCE= VolatileField01.fs # VolatileField01.fs - [] + [] let ``VolatileField01 9.0`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldSucceed // SOURCE=VolatileField01.fs # VolatileField01.fs - [] + [] let ``VolatileField01 90`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldSucceed // SOURCE= E_SealedAttribute01.fs # E_SealedAttribute01.fs - [] + [] let ``E_SealedAttribute01 9.0`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -864,9 +941,10 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = ] // SOURCE=E_SealedAttribute01.fs # E_SealedAttribute01.fs - [] + [] let ``E_SealedAttribute01 90`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -877,9 +955,10 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = ] // SOURCE= E_StructLayout01.fs # E_StructLayout01.fs - [] + [] let ``E_StructLayout01 9.0`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail @@ -892,9 +971,10 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = ] // SOURCE=E_StructLayout01.fs # E_StructLayout01.fs - [] + [] let ``E_StructLayout01 90`` compilation = compilation + |> getCompilation |> withLangVersion90 |> verifyCompile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs index 1e3c99dc8a5..112a3b3772f 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs @@ -21,23 +21,26 @@ module CustomAttributes_Basic = |> compileAndRun // SOURCE=ArrayParam.fs # ArrayParam.fs - [] + [] let ``ArrayParam_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=AttribWithEnumFlags01.fs # AttribWithEnumFlags01.fs - [] + [] let ``AttribWithEnumFlags01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=E_AttributeApplication01.fs # E_AttributeApplication01.fs - [] + [] let ``E_AttributeApplication01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -45,9 +48,10 @@ module CustomAttributes_Basic = ] // SOURCE=E_AttributeApplication02.fs SCFLAGS="--test:ErrorRanges" # E_AttributeApplication02.fs - [] + [] let ``E_AttributeApplication02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -55,9 +59,10 @@ module CustomAttributes_Basic = ] // SOURCE=E_AttributeApplication03.fs SCFLAGS="--test:ErrorRanges" # E_AttributeApplication03.fs - [] + [] let ``E_AttributeApplication03_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -65,9 +70,10 @@ module CustomAttributes_Basic = ] // SOURCE=E_AttributeApplication04.fs SCFLAGS="--test:ErrorRanges" # E_AttributeApplication04.fs - [] + [] let ``E_AttributeApplication04_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -75,9 +81,10 @@ module CustomAttributes_Basic = ] // SOURCE=E_AttributeApplication05.fs SCFLAGS="--test:ErrorRanges" # E_AttributeApplication05.fs - [] + [] let ``E_AttributeApplication05_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -86,9 +93,10 @@ module CustomAttributes_Basic = ] // SOURCE=E_AttributeApplication06.fs SCFLAGS="--test:ErrorRanges" # E_AttributeApplication06.fs - [] + [] let ``E_AttributeApplication06_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -100,9 +108,10 @@ module CustomAttributes_Basic = ] // SOURCE=E_AttributeApplication07.fs # E_AttributeApplication07.fs - [] + [] let ``E_AttributeApplication07_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -114,9 +123,10 @@ module CustomAttributes_Basic = ] // SOURCE=E_AttributeTargetSpecifications.fs # E_AttributeTargetSpecifications.fs - [] + [] let ``E_AttributeTargetSpecifications_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -124,9 +134,10 @@ module CustomAttributes_Basic = ] // SOURCE=E_StructLayout.fs SCFLAGS="-a --test:ErrorRanges --flaterrors --nowarn:9" # E_StructLayout.fs - [] + [] let ``E_StructLayout_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -136,9 +147,10 @@ module CustomAttributes_Basic = ] // SOURCE=E_StructLayoutSequentialNeg_AbstractClass.fs SCFLAGS="--test:ErrorRanges" # E_StructLayoutSequentialNeg_AbstractClass.fs - [] + [] let ``E_StructLayoutSequentialNeg_AbstractClass_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -146,9 +158,10 @@ module CustomAttributes_Basic = ] // SOURCE=E_StructLayoutSequentialNeg_DU1.fs SCFLAGS="--test:ErrorRanges" # E_StructLayoutSequentialNeg_DU1.fs - [] + [] let ``E_StructLayoutSequentialNeg_DU1_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -156,9 +169,10 @@ module CustomAttributes_Basic = ] // SOURCE=E_StructLayoutSequentialNeg_DU2.fs SCFLAGS="--test:ErrorRanges" # E_StructLayoutSequentialNeg_DU2.fs - [] + [] let ``E_StructLayoutSequentialNeg_DU2_fs`` compilation = compilation + |> getCompilation |> withLangVersionPreview |> verifyCompile |> shouldFail @@ -167,9 +181,10 @@ module CustomAttributes_Basic = ] // SOURCE=E_StructLayoutSequentialNeg_Delegate.fs SCFLAGS="--test:ErrorRanges" # E_StructLayoutSequentialNeg_Delegate.fs - [] + [] let ``E_StructLayoutSequentialNeg_Delegate_fs`` compilation = compilation + |> getCompilation |> withLangVersionPreview |> verifyCompile |> shouldFail @@ -178,9 +193,10 @@ module CustomAttributes_Basic = ] // SOURCE=E_StructLayoutSequentialNeg_Interface.fs SCFLAGS="--test:ErrorRanges" # E_StructLayoutSequentialNeg_Interface.fs - [] + [] let ``E_StructLayoutSequentialNeg_Interface_fs`` compilation = compilation + |> getCompilation |> withLangVersionPreview |> verifyCompile |> shouldFail @@ -189,9 +205,10 @@ module CustomAttributes_Basic = ] // SOURCE=E_UseNullAsTrueValue01.fs SCFLAGS="--test:ErrorRanges" # E_UseNullAsTrueValue01.fs - [] + [] let ``E_UseNullAsTrueValue01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -205,9 +222,10 @@ module CustomAttributes_Basic = ] // SOURCE=FreeTypeVariable01.fs # FreeTypeVariable01.fs - [] + [] let ``FreeTypeVariable01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -215,66 +233,75 @@ module CustomAttributes_Basic = ] // SOURCE=Function01.fs # Function01.fs - [] + [] let ``Function01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=FunctionArg01.fs # FunctionArg01.fs - [] + [] let ``FunctionArg01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=InExternDecl.fs SCFLAGS="-a --warnaserror+" # InExternDecl.fs - [] + [] let ``InExternDecl_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=ParamArrayAttrUsage.fs # ParamArrayAttrUsage.fs - [] + [] let ``ParamArrayAttrUsage_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed // SOURCE=ReturnType01.fs # ReturnType01.fs - [] + [] let ``ReturnType01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=ReturnType02.fs # ReturnType02.fs - [] + [] let ``ReturnType02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=ReturnType03.fs # ReturnType03.fs - [] + [] let ``ReturnType03_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=SanityCheck01.fs # SanityCheck01.fs - [] + [] let ``SanityCheck01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=StructLayout.fs SCFLAGS="-a --nowarn:9 --warnaserror" # StructLayout.fs - [] + [] let ``StructLayout_fs`` compilation = compilation + |> getCompilation |> asLibrary |> withOptions ["--nowarn:988"] |> compile @@ -284,30 +311,34 @@ module CustomAttributes_Basic = ] // SOURCE=StructLayoutSequentialPos_Exception.fs # StructLayoutSequentialPos_Exception.fs - [] + [] let ``StructLayoutSequentialPos_Exception_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=TypeofTypedefofInAttribute.fs # TypeofTypedefofInAttribute.fs - [] + [] let ``TypeofTypedefofInAttribute_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=TypesAsAttrArgs01.fs # TypesAsAttrArgs01 - [] + [] let ``TypesAsAttrArgs01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=W_ReturnType03b.fs SCFLAGS="--test:ErrorRanges" # W_ReturnType03b.fs - [] + [] let ``W_ReturnType03b_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -315,9 +346,10 @@ module CustomAttributes_Basic = ] // SOURCE=W_StructLayoutExplicit01.fs SCFLAGS="--test:ErrorRanges" PEVER="/Exp_Fail" # W_StructLayoutExplicit01.fs - [] + [] let ``W_StructLayoutExplicit01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -325,29 +357,33 @@ module CustomAttributes_Basic = ] // SOURCE=W_StructLayoutSequentialPos_AbstractClass.fs SCFLAGS="--test:ErrorRanges --warnaserror+" # W_StructLayoutSequentialPos_AbstractClass.fs - [] + [] let ``W_StructLayoutSequentialPos_AbstractClass_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldSucceed // SOURCE=W_StructLayoutSequentialPos_ClassnoCtr.fs SCFLAGS="--test:ErrorRanges --warnaserror+" # W_StructLayoutSequentialPos_ClassnoCtr.fs - [] + [] let ``W_StructLayoutSequentialPos_ClassnoCtr_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldSucceed // SOURCE=W_StructLayoutSequentialPos_Record.fs SCFLAGS="--test:ErrorRanges --warnaserror+" # W_StructLayoutSequentialPos_Record.fs - [] + [] let ``W_StructLayoutSequentialPos_Record_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldSucceed - [] + [] let ``EnsureValidCustomAttributeBlob_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/ImportedAttributes/ImportedAttributes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/ImportedAttributes/ImportedAttributes.fs index 96ad0bbd722..e7127d07802 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/ImportedAttributes/ImportedAttributes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/ImportedAttributes/ImportedAttributes.fs @@ -21,9 +21,10 @@ module CustomAttributes_ImportedAttributes = |> compileAndRun // SOURCE=FieldOffset01.fs SCFLAGS="" PEVER=/MD # FieldOffset01.fs - [] + [] let ``FieldOffset01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/EntryPoint/EntryPoint.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/EntryPoint/EntryPoint.fs index ce51bcf6c14..3e5d4485090 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/EntryPoint/EntryPoint.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/EntryPoint/EntryPoint.fs @@ -9,43 +9,48 @@ open FSharp.Test.Compiler module EntryPoint = // SOURCE=behavior001.fs # noarguments001.fs - [] + [] let ``behavior001_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=noarguments001.fs # noarguments001.fs - [] + [] let ``noarguments001_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed //NoMT SOURCE="twofiles_001a.fs twofiles_001b.fs" # twofiles_001a/b - [] + [] let ``twofiles_001a_fs_twofiles_001b_fs`` compilation = compilation + |> getCompilation |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "twofiles_001b.fs")) |> asExe |> compile |> shouldSucceed //NoMT SOURCE=inamodule001.fs # inamodule001.fs - [] + [] let ``inamodule001_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=E_twoentrypoints001.fs SCFLAGS="--test:ErrorRanges" # E_twoentrypoints001.fs - [] + [] let ``E_twoentrypoints001_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions [ "--test:ErrorRanges" ] |> compile @@ -55,9 +60,10 @@ module EntryPoint = ] // SOURCE="E_twofiles_002b.fs E_twofiles_002a.fs" SCFLAGS="--test:ErrorRanges" # E_twofiles_002b/a - [] + [] let ``E_twofiles_002b_fs_E_twofiles_002a_fs`` compilation = compilation + |> getCompilation |> asExe |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "E_twofiles_002a.fs")) |> withOptions [ "--test:ErrorRanges" ] @@ -68,9 +74,10 @@ module EntryPoint = ] // SOURCE=E_oninvalidlanguageelement001.fs SCFLAGS="--test:ErrorRanges" # E_oninvalidlanguageelement001.fs - [] + [] let ``E_oninvalidlanguageelement001_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -79,9 +86,10 @@ module EntryPoint = ] // SOURCE=E_twoattributesonsamefunction001.fs SCFLAGS="--test:ErrorRanges" # E_twoattributesonsamefunction001.fs - [] + [] let ``E_twoattributesonsamefunction001_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -90,17 +98,19 @@ module EntryPoint = ] // SOURCE=entrypointfunctionnotmain001.fs # entrypointfunctionnotmain001.fs - [] + [] let ``entrypointfunctionnotmain001_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=E_invalidsignature001.fs SCFLAGS="--test:ErrorRanges" # E_invalidsignature001.fs - [] + [] let ``E_invalidsignature001_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -112,9 +122,10 @@ but here has type ] // SOURCE=E_InvalidSignature02.fs SCFLAGS="--test:ErrorRanges" # E_InvalidSignature02 - [] + [] let ``E_InvalidSignature02_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -126,51 +137,57 @@ but here has type ] //NoMT SOURCE=entrypointandFSI.fs SCFLAGS="--multiemit-" FSIMODE=PIPE COMPILE_ONLY=1 # entrypointandFSI.fs - [] + [] let ``entrypointandFSI_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed //NoMT SOURCE=entrypointandFSI02.fsx SCFLAGS="--multiemit-" FSIMODE=EXEC COMPILE_ONLY=1 # entrypointandFSI02.fsx - [] + [] let ``entrypointandFSI02_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=E_CompilingToALibrary01.fs SCFLAGS="--test:ErrorRanges --target:library" # E_CompilingToALibrary01.fs - [] + [] let ``CompilingToALibrary01_fs`` compilation = compilation + |> getCompilation |> asLibrary |> withOptions [ "--test:ErrorRanges" ] |> compile |> shouldSucceed // SOURCE=E_CompilingToAModule01.fs SCFLAGS="--test:ErrorRanges --target:module" # E_CompilingToAModule01.fs - [] + [] let ``CompilingToAModule01_fs`` compilation = compilation + |> getCompilation |> asModule |> withOptions [ "--test:ErrorRanges" ] |> compile |> shouldSucceed // SOURCE=EntryPointAndAssemblyCulture.fs # EntryPointAndAssemblyCulture.fs - [] + [] let ``EntryPointAndAssemblyCulture_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=W_NoEntryPointInLastModuleInsideMultipleNamespace.fs SCFLAGS="--test:ErrorRanges" # W_NoEntryPointInLastModuleInsideMultipleNamespace.fs - [] + [] let ``W_NoEntryPointInLastModuleInsideMultipleNamespace_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -179,9 +196,10 @@ but here has type ] // SOURCE=W_NoEntryPointModuleInNamespace.fs SCFLAGS="--test:ErrorRanges" # W_NoEntryPointModuleInNamespace.fs - [] + [] let ``W_NoEntryPointModuleInNamespace_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -190,9 +208,10 @@ but here has type ] // SOURCE=W_NoEntryPointMultipleModules.fs SCFLAGS="--test:ErrorRanges" # W_NoEntryPointMultipleModules.fs - [] + [] let ``W_NoEntryPointMultipleModules_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -201,9 +220,10 @@ but here has type ] // SOURCE=W_NoEntryPointTypeInNamespace.fs SCFLAGS="--test:ErrorRanges" # W_NoEntryPointTypeInNamespace.fs - [] + [] let ``W_NoEntryPointTypeInNamespace_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/Events/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/Events/Basic/Basic.fs index caede79cd6b..2be990f6989 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/Events/Basic/Basic.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/Events/Basic/Basic.fs @@ -22,76 +22,86 @@ module Events = |> compileAndRun // SOURCE=CLIEvent01.fs # CLIEvent01.fs - [] + [] let ``CLIEvent01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=EventWithGenericTypeAsUnit01.fs # EventWithGenericTypeAsUnit01.fs - [] + [] let ``EventWithGenericTypeAsUnit01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=EventsOnInterface01.fs # EventsOnInterface01.fs - [] + [] let ``EventsOnInterface01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Regression01.fs # Regression01.fs - [] + [] let ``Regression01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Regression02.fs # Regression02.fs - [] + [] let ``Regression02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Regression02b.fs # Regression02b.fs - [] + [] let ``Regression02b_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed #if !NETSTANDARD && !NETCOREAPP // NoMT SOURCE=Regression03.fsx COMPILE_ONLY=1 FSIMODE=PIPE SCFLAGS="--nologo" # Regression03.fsx - [] + [] let ``Regression03_fsx`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompile |> shouldSucceed #endif // SOURCE=SanityCheck.fs # SanityCheck.fs - [] + [] let ``SanityCheck_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // NoMT SOURCE=SanityCheck02.fs # SanityCheck02.fs - [] + [] let ``SanityCheck02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed #if false && !NETCOREAPP && !NETSTANDARD // SOURCE=SanityCheck02.fs PEVER=/MD # SanityCheck02.fs - /MD - [] + [] let ``SanityCheck02_fs_peverify`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:988"] |> PEVerifier.verifyPEFile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ExceptionDefinitions/ExceptionDefinitions.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ExceptionDefinitions/ExceptionDefinitions.fs index 1ec630b6e98..ec61b82baf5 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ExceptionDefinitions/ExceptionDefinitions.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ExceptionDefinitions/ExceptionDefinitions.fs @@ -9,27 +9,30 @@ open FSharp.Test.Compiler module ExceptionDefinition = // SOURCE=Abbreviation01.fsx # Abbreviation01.fsx - [] + [] let``Abbreviation01_fsx`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=AbbreviationForSystemException.fsx # AbbreviationForSystemException.fsx - [] + [] let``AbbreviationForSystemException_fsx`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=Abbreviation_SampleCodeFromSpec01.fsx # Abbreviation_SampleCodeFromSpec01.fsx - [] + [] let``Abbreviation_SampleCodeFromSpec01_fsx`` compilation = compilation + |> getCompilation |> asFsx |> asExe |> withOptions ["--nowarn:52"; "--nowarn:988"] @@ -37,45 +40,50 @@ module ExceptionDefinition = |> shouldSucceed // SOURCE=ActiveRecognizer.fsx # ActiveRecognizer.fsx - [] + [] let``ActiveRecognizer_fsx`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=AddMethsProps01.fs # AddMethsProps01 - [] + [] let``AddMethsProps01_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=AddMessageProperty.fs # AddMessageProperty - [] + [] let``AddMessageProperty`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=ManualMessagePropertyWinsOverAutomaticOne.fs # ManualMessagePropertyWinsOverAutomaticOne - [] + [] let``ManualMessagePropertyWinsOverAutomaticOne`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=PrivateMessagePropertyIsNotReplacingBuiltinMessage.fs # PrivateMessagePropertyIsNotReplacingBuiltinMessage - [] + [] let``PrivateMessagePropertyIsNotReplacingBuiltinMessage`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:988"] |> ignoreWarnings @@ -83,45 +91,50 @@ module ExceptionDefinition = |> shouldSucceed // SOURCE=CatchWOTypecheck01.fs # CatchWOTypeCheck01 - [] + [] let``CatchWOTypecheck01_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=EqualAndBoxing01.fs # EqualAndBoxing01.fs - [] + [] let``EqualAndBoxing01_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=ExceptionAsDerivedFromSystemException01.fsx # ExceptionAsDerivedFromSystemException01.fsx - [] + [] let``ExceptionAsDerivedFromSystemException01_fsx`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=ExnAsDiscriminatedUnion01.fsx # ExnAsDiscriminatedUnion01.fsx - [] + [] let``ExnAsDiscriminatedUnion01_fsx`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=E_Abbreviation_NonMatchingObjConstructor.fsx SCFLAGS="--test:ErrorRanges" # E_Abbreviation_NonMatchingObjConstructor.fsx - [] + [] let``E_Abbreviation_NonMatchingObjConstructor_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -129,9 +142,10 @@ module ExceptionDefinition = (Error 920, Line 8, Col 1, Line 8, Col 28, "Abbreviations for Common IL exception types must have a matching object constructor") ] // SOURCE=E_AssertionFailureExn.fs SCFLAGS="--test:ErrorRanges" # E_AssertionFailureExn.fs - [] + [] let``E_AssertionFailureExn_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -140,9 +154,10 @@ module ExceptionDefinition = ] // SOURCE=E_BeginWithUppercase01.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase01.fsx - [] + [] let``E_BeginWithUppercase01_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -152,9 +167,10 @@ module ExceptionDefinition = ] // SOURCE=E_BeginWithUppercase02.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase02.fsx - [] + [] let``E_BeginWithUppercase02_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -163,9 +179,10 @@ module ExceptionDefinition = ] // SOURCE=E_BeginWithUppercase03.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase03.fsx - [] + [] let``E_BeginWithUppercase03_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -174,9 +191,10 @@ module ExceptionDefinition = ] // SOURCE=E_BeginWithUppercase04.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase04.fsx - [] + [] let``E_BeginWithUppercase04_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -185,9 +203,10 @@ module ExceptionDefinition = ] // SOURCE=E_DynamicInvocationNotSupported.fsx SCFLAGS=--test:ErrorRanges # E_DynamicInvocationNotSupported.fsx - [] + [] let``E_DynamicInvocationNotSupported_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -196,9 +215,10 @@ module ExceptionDefinition = ] // SOURCE=E_ExnAsDiscriminatedUnion01.fsx SCFLAGS="--test:ErrorRanges" # E_ExnAsDiscriminatedUnion01.fsx - [] + [] let``E_ExnAsDiscriminatedUnion01_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -207,9 +227,10 @@ module ExceptionDefinition = ] // SOURCE=E_ExnConstructorBadFieldName.fs SCFLAGS="--test:ErrorRanges" # E_ExnConstructorBadFieldName.fs - [] + [] let``E_ExnConstructorBadFieldName_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -219,9 +240,10 @@ module ExceptionDefinition = ] // SOURCE=E_ExnFieldConflictingName.fs SCFLAGS="--test:ErrorRanges" # E_ExnFieldConflictingName.fs - [] + [] let``E_ExnFieldConflictingName_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -233,9 +255,10 @@ module ExceptionDefinition = ] // SOURCE=E_FieldNameUsedMulti.fs SCFLAGS="--test:ErrorRanges" # E_FieldNameUsedMulti.fs - [] + [] let``E_FieldNameUsedMulti_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -245,9 +268,10 @@ module ExceptionDefinition = ] // SOURCE=E_FieldMemberClash.fs SCFLAGS="--test:ErrorRanges" # E_FieldMemberClash.fs - [] + [] let``E_FieldMemberClash_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -258,9 +282,10 @@ module ExceptionDefinition = ] // SOURCE=E_GeneratedTypeName01.fsx SCFLAGS="--test:ErrorRanges" # E_GeneratedTypeName01.fsx - [] + [] let``E_GeneratedTypeName01_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -271,9 +296,10 @@ module ExceptionDefinition = ] // SOURCE=E_GeneratedTypeNameClash02.fsx SCFLAGS="--test:ErrorRanges" # E_GeneratedTypeNameClash02.fsx - [] + [] let``E_GeneratedTypeNameClash02_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -282,9 +308,10 @@ module ExceptionDefinition = ] // SOURCE=E_InheritException.fs SCFLAGS="--test:ErrorRanges" # E_InheritException.fs - [] + [] let``E_InheritException_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -294,9 +321,10 @@ module ExceptionDefinition = ] // SOURCE=E_MatchFailure.fsx SCFLAGS=--test:ErrorRanges # E_MatchFailure.fsx - [] + [] let``E_MatchFailure_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -305,9 +333,10 @@ module ExceptionDefinition = ] // SOURCE=E_MustStartWithCap01.fs # E_MustStartWithCap01 - [] + [] let``E_MustStartWithCap01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -316,9 +345,10 @@ module ExceptionDefinition = ] // SOURCE=E_Undefined.fsx SCFLAGS=--test:ErrorRanges # E_Undefined.fsx - [] + [] let``E_Undefined_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -327,16 +357,17 @@ module ExceptionDefinition = ] // SOURCE=GeneratedTypeNameNoClash01.fsx SCFLAGS="--test:ErrorRanges" # GeneratedTypeNameNoClash01.fsx - [] + [] let``GeneratedTypeNameNoClash01_fsx`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=ImportCSharpException01.fsx # ImportCSharpException01.fsx - [] + [] let``ImportCSharpException01_fsx`` compilation = let cSharpException = @@ -344,6 +375,7 @@ module ExceptionDefinition = |> withName "CSharpException" compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> withReferences [cSharpException] @@ -351,36 +383,40 @@ module ExceptionDefinition = |> shouldSucceed // SOURCE=LowercaseIdentifier01.fsx # LowercaseIdentifier01.fsx - [] + [] let``LowercaseIdentifier01_fsx`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=NamedFields01.fsx # NamedFields01.fsx - [] + [] let``NamedFields01_fsx`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"; "--nowarn:25"] |> compileExeAndRun |> shouldSucceed // SOURCE=PatternMatch_SampleCodeFromSpec01.fsx # PatternMatch_SampleCodeFromSpec01.fsx - [] + [] let``PatternMatch_SampleCodeFromSpec01_fsx`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=ReflectionAPI.fsx # ReflectionAPI.fsx - [] + [] let``ReflectionAPI_fsx`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ExplicitObjectConstructors/ExplicitObjectConstructors.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ExplicitObjectConstructors/ExplicitObjectConstructors.fs index e61dacdbc26..32fdf28fea0 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ExplicitObjectConstructors/ExplicitObjectConstructors.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ExplicitObjectConstructors/ExplicitObjectConstructors.fs @@ -9,9 +9,10 @@ open FSharp.Test.Compiler module ExplicitObjectConstructors = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ExplicitObjectConstructors) - [] + [] let ``new_while_01_fs`` compilation = compilation + |> getCompilation |> asFsx |> typecheck |> shouldSucceed @@ -19,9 +20,10 @@ module ExplicitObjectConstructors = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ExplicitObjectConstructors) - [] + [] let ``WithAttribute01_fs`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["-a"; "--test:ErrorRanges"] |> compile @@ -32,9 +34,10 @@ module ExplicitObjectConstructors = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ExplicitObjectConstructors) - [] + [] let ``WithAttribute02_fs`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["-a"; "--test:ErrorRanges"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/FieldMembers/FieldMembers.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/FieldMembers/FieldMembers.fs index 70e859d8da6..624bdee6c1f 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/FieldMembers/FieldMembers.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/FieldMembers/FieldMembers.fs @@ -21,16 +21,18 @@ module FieldMembers = |> compileAndRun // SOURCE=DefaultValue01.fs # DefaultValue01.fs - [] + [] let ``DefaultValue01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=E_StaticField01.fs # E_StaticField01.fs - [] + [] let ``E_StaticField01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -39,9 +41,10 @@ module FieldMembers = ] // SOURCE=E_StaticField02a.fs # E_StaticField02a.fs - [] + [] let ``E_StaticField02a_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -50,23 +53,26 @@ module FieldMembers = ] // SOURCE=StaticField01.fs # StaticField01.fs - [] + [] let ``StaticField01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=StaticField02.fs # StaticField02.fs - [] + [] let ``StaticField02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Staticfield03.fs # Staticfield03.fs - [] + [] let ``StaticField03_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ImplicitObjectConstructors/ImplicitObjectConstructors.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ImplicitObjectConstructors/ImplicitObjectConstructors.fs index 3e4eebe7de1..4b927099115 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ImplicitObjectConstructors/ImplicitObjectConstructors.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ImplicitObjectConstructors/ImplicitObjectConstructors.fs @@ -10,9 +10,10 @@ module ImplicitObjectConstructors = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ImplicitObjectConstructors) - [] + [] let ``WithAttribute_fs`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["-a"; "--test:ErrorRanges"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ImportDeclarations/ImportDeclarations.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ImportDeclarations/ImportDeclarations.fs index 449fb5bd9d3..2a544c4d2e9 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ImportDeclarations/ImportDeclarations.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ImportDeclarations/ImportDeclarations.fs @@ -21,9 +21,10 @@ module ImportDeclarations = |> compileAndRun // SOURCE=E_OpenTwice.fs SCFLAGS="--warnaserror+ --test:ErrorRanges" # E_OpenTwice.fs - [] + [] let ``E_OpenTwice_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -32,9 +33,10 @@ module ImportDeclarations = ] // SOURCE=E_OpenUnknownNS.fs # E_OpenUnknownNS.fs - [] + [] let ``E_OpenUnknownNS_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -42,9 +44,10 @@ module ImportDeclarations = ] // SOURCE=E_openEnum.fs SCFLAGS="--test:ErrorRanges" # E_openEnum.fs - [] + [] let ``E_openEnum_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -54,9 +57,10 @@ module ImportDeclarations = ] // SOURCE=E_openInTypeDecl.fs SCFLAGS="--test:ErrorRanges" # E_openInTypeDecl.fs - [] + [] let ``E_openInTypeDecl_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -64,9 +68,10 @@ module ImportDeclarations = ] // SOURCE=E_openModInFun.fs SCFLAGS="--test:ErrorRanges" # E_openModInFun.fs - [] + [] let ``E_openModInFun_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -77,16 +82,18 @@ module ImportDeclarations = ] // SOURCE=OpenNestedModule01.fs # OpenNestedModule01.fs - [] + [] let ``OpenNestedModule01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=W_OpenUnqualifiedNamespace01.fs # W_OpenUnqualifiedNamespace01.fs - [] + [] let ``W_OpenUnqualifiedNamespace01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -94,16 +101,18 @@ module ImportDeclarations = ] // SOURCE=openDU.fs # openDU.fs - [] + [] let ``openDU_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=openSystem01.fs # openSystem01.fs - [] + [] let ``openSystem01_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/InterfaceSpecificationsAndImplementations/InterfaceSpecificationsAndImplementations.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/InterfaceSpecificationsAndImplementations/InterfaceSpecificationsAndImplementations.fs index fd591472bac..a1aa4564c51 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/InterfaceSpecificationsAndImplementations/InterfaceSpecificationsAndImplementations.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/InterfaceSpecificationsAndImplementations/InterfaceSpecificationsAndImplementations.fs @@ -21,23 +21,26 @@ module InterfaceSpecificationsAndImplementations = |> compileAndRun // SOURCE=ConcreteUnitOnInterface01.fs # ConcreteUnitOnInterface01.fs - [] + [] let ``ConcreteUnitOnInterface01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=GenericMethodsOnInterface01.fs # GenericMethodsOnInterface01.fs - [] + [] let ``GenericMethodsOnInterface01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=GenericMethodsOnInterface02.fs # GenericMethodsOnInterface02.fs - [] + [] let ``GenericMethodsOnInterface02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/ActivePatternBindings/ActivePatternBindings.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/ActivePatternBindings/ActivePatternBindings.fs index 141975790a6..110a6c1208c 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/ActivePatternBindings/ActivePatternBindings.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/ActivePatternBindings/ActivePatternBindings.fs @@ -21,26 +21,29 @@ module LetBindings_ActivePatternBindings = |> compileAndRun //SOURCE=SanityCheck.fs SCFLAGS="" # SanityCheck.fs - [] + [] let ``SanityCheck_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:52"] |> asFsx |> verifyCompileAndRun |> shouldSucceed //SOURCE=parameterizedActivePattern.fs # parameterizedActivePattern.fs - [] + [] let ``parameterizedActivePattern_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed //SOURCE=partialActivePattern.fs # partialActivePattern.fs - [] + [] let ``partialActivePattern1_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/Basic/Basic.fs index c0a19c9ad3e..dc38abd24e1 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/Basic/Basic.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/Basic/Basic.fs @@ -21,24 +21,27 @@ module LetBindings_Basic = |> compileAndRun // SOURCE=AsPat01.fs # AsPat01.fs - [] + [] let ``AsPat01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=AsPat02.fs # AsPat02.fs - [] + [] let ``AsPat02_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:25";] |> verifyCompileAndRun |> shouldSucceed // SOURCE=E_AsPat01.fs # E_AsPat01.fs - [] + [] let ``E_AsPat01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -46,9 +49,10 @@ module LetBindings_Basic = ] // SOURCE=E_AttributesOnLet01.fs SCFLAGS="--test:ErrorRanges" # E_AttributesOnLet01.fs - [] + [] let ``E_AttributesOnLet01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -59,9 +63,10 @@ module LetBindings_Basic = ] // SOURCE=E_ErrorsForInlineValue.fs SCFLAGS="--test:ErrorRanges" # E_ErrorsForInlineValue.fs - [] + [] let ``E_ErrorsForInlineValue_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -70,9 +75,10 @@ module LetBindings_Basic = ] // SOURCE=E_ErrorsforIncompleteTryWith.fs SCFLAGS="--test:ErrorRanges" # E_ErrorsforIncompleteTryWith.fs - [] + [] let ``E_ErrorsforIncompleteTryWith_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -83,9 +89,10 @@ module LetBindings_Basic = ] // SOURCE=E_GenericTypeAnnotations01.fs SCFLAGS="--test:ErrorRanges" # E_GenericTypeAnnotations01.fs - [] + [] let ``E_GenericTypeAnnotations01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -94,9 +101,10 @@ module LetBindings_Basic = ] // SOURCE=E_InvalidInnerRecursiveBinding.fs SCFLAGS="--test:ErrorRanges" # E_InvalidInnerRecursiveBinding.fs - [] + [] let ``E_InvalidInnerRecursiveBinding_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -104,9 +112,10 @@ module LetBindings_Basic = ] // SOURCE=E_InvalidInnerRecursiveBinding2.fs SCFLAGS="--test:ErrorRanges" # E_InvalidInnerRecursiveBinding2.fs - [] + [] let ``E_InvalidInnerRecursiveBinding2_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -114,9 +123,10 @@ module LetBindings_Basic = ] // SOURCE="E_Literals02.fsi E_Literals02.fs" # E_Literals02.fsi - [] + [] let ``E_Literals02_fsi`` compilation = compilation + |> getCompilation |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++"E_Literals02.fs")) |> typecheck |> shouldFail @@ -126,9 +136,10 @@ module LetBindings_Basic = ] // SOURCE="E_Literals03.fsi E_Literals03.fs" # E_Literals03.fsi - [] + [] let ``E_Literals03_fsi`` compilation = compilation + |> getCompilation |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++"E_Literals03.fs")) |> verifyCompile |> shouldFail @@ -138,9 +149,10 @@ module LetBindings_Basic = ] // // // SOURCE="E_Literals04.fs" # E_Literals04.fs - [] + [] let ``E_Literals04_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -153,9 +165,10 @@ module LetBindings_Basic = ] // SOURCE=E_Pathological01.fs SCFLAGS=--test:ErrorRanges # E_Pathological01.fs - [] + [] let ``E_Pathological01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -163,9 +176,10 @@ module LetBindings_Basic = ] // SOURCE=E_Pathological03.fs SCFLAGS=--test:ErrorRanges # E_Pathological03.fs - [] + [] let ``E_Pathological03_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -173,9 +187,10 @@ module LetBindings_Basic = ] // SOURCE=E_Pathological05.fs SCFLAGS=--test:ErrorRanges # E_Pathological05.fs - [] + [] let ``E_Pathological05_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -183,9 +198,10 @@ module LetBindings_Basic = ] // SOURCE=E_Pathological06.fs SCFLAGS=--test:ErrorRanges # E_Pathological06.fs - [] + [] let ``E_Pathological06_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -193,14 +209,15 @@ module LetBindings_Basic = ] // SOURCE=Literals01.fs # Literals01.fs - [] + [] let ``Literals01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //// SOURCE=ManyLetBindings.fs SCFLAGS="--debug:full --optimize-" # Full ManyLetBindings.fs - //[] + //[] //let ``ManyLetBindings_fs_Full_pdbs`` compilation = // compilation // |> withFullPdb @@ -209,48 +226,54 @@ module LetBindings_Basic = // |> shouldSucceed // SOURCE=ManyLetBindings.fs SCFLAGS="--debug:portable --optimize-" # Portable ManyLetBindings.fs - [] + [] let ``ManyLetBindings_fs_PortablePdbs`` compilation = compilation + |> getCompilation |> withPortablePdb |> withNoOptimize |> verifyCompileAndRun |> shouldSucceed // SOURCE=nestedLetBindings.fs # nestedLetBindings.fs - [] + [] let ``nestedLetBindings_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Pathological02.fs SCFLAGS=-a # Pathological02.fs - [] + [] let ``Pathological02_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:193"] |> verifyCompileAndRun |> shouldSucceed // SOURCE=Pathological04.fs SCFLAGS=-a # Pathological04.fs - [] + [] let ``Pathological04_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:193"] |> verifyCompileAndRun |> shouldSucceed // SOURCE=SanityCheck.fs # SanityCheck.fs - [] + [] let ``SanityCheck_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=W_DoBindingsNotUnit01.fs # W_DoBindingsNotUnit01.fs - [] + [] let ``W_DoBindingsNotUnit01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -258,16 +281,18 @@ module LetBindings_Basic = ] // SOURCE=W_DoBindingsNotUnit02.fsx SCFLAGS="--warnaserror" # W_DoBindingsNotUnit02.fsx - [] + [] let ``W_DoBindingsNotUnit02_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=RecursiveBindingGroup.fs SCFLAGS="" # RecursiveBindingGroup.fs - [] + [] let ``RecursiveBindingGroup_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/ExplicitTypeParameters/ExplicitTypeParameters.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/ExplicitTypeParameters/ExplicitTypeParameters.fs index 53c618c99ea..160f9906add 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/ExplicitTypeParameters/ExplicitTypeParameters.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/ExplicitTypeParameters/ExplicitTypeParameters.fs @@ -21,25 +21,28 @@ module LetBindings_ExplicitTypeParameters = |> compileAndRun //SOURCE=SanityCheck.fs # SanityCheck.fs - [] + [] let ``SanityCheck_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed //SOURCE=SanityCheck2.fs # SanityCheck2.fs - [] + [] let ``SanityCheck2_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed //SOURCE=W_TypeParamsWhenNotNeeded.fs # W_TypeParamsWhenNotNeeded.fs - [] + [] let ``W_TypeParamsWhenNotNeeded_fs_warning`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompile |> shouldFail @@ -48,9 +51,10 @@ module LetBindings_ExplicitTypeParameters = ] //SOURCE=W_TypeParamsWhenNotNeeded.fs # W_TypeParamsWhenNotNeeded.fs - [] + [] let ``W_TypeParamsWhenNotNeeded_fs_execute`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--nowarn:686"] |> verifyCompileAndRun diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/TypeFunctions/TypeFunctions.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/TypeFunctions/TypeFunctions.fs index 3754e59055c..cddbede4b7c 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/TypeFunctions/TypeFunctions.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/TypeFunctions/TypeFunctions.fs @@ -21,25 +21,28 @@ module LetBindings_TypeFunctions = |> compileAndRun //SOURCE=typeofBasic001.fs # typeofBasic001.fs - [] + [] let ``typeofBasic001_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed // - [] + [] let ``typeofInCustomAttributes001_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed - [] + [] let ``E_typeof_measure_01_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompile |> shouldFail @@ -48,9 +51,10 @@ module LetBindings_TypeFunctions = ] //SOURCE=E_NoTypeFuncsInTypes.fs # E_NoTypeFuncsInTypes.fs - [] + [] let ``E_NoTypeFuncsInTypes_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompile |> shouldFail @@ -60,9 +64,10 @@ module LetBindings_TypeFunctions = ] - [] + [] let ``E_typeof_undefined_01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -70,49 +75,55 @@ module LetBindings_TypeFunctions = ] // - [] + [] let ``typeof_anonymous_01_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/DeclarationElements/LetBindings/TypeFunctions) - [] + [] let ``typeof_class_01_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/DeclarationElements/LetBindings/TypeFunctions) - [] + [] let ``typeof_interface_01_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/DeclarationElements/LetBindings/TypeFunctions) - [] + [] let ``typeof_struct_01_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed //SOURCE=SizeOf01.fs # SizeOf01.fs - [] + [] let ``SizeOf01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed //SOURCE=typeofAsArgument.fs # typeofAsArgument.fs - [] + [] let ``typeofAsArgument_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/ImplementingDispatchSlots/ImplementingDispatchSlots.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/ImplementingDispatchSlots/ImplementingDispatchSlots.fs index 2b0a31608da..59b5c1dcd1b 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/ImplementingDispatchSlots/ImplementingDispatchSlots.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/ImplementingDispatchSlots/ImplementingDispatchSlots.fs @@ -21,9 +21,10 @@ module MemberDefinitions_ImplementingDispatchSlots = |> compileAndRun // SOURCE=SanityCheck.fs - [] + [] let ``SanityCheck_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MemberDefinitions.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MemberDefinitions.fs index c34ea1101c8..92f4784168c 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MemberDefinitions.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MemberDefinitions.fs @@ -21,9 +21,10 @@ module MemberDefinitionsModule = |> compileAndRun // SOURCE="BasicMembers.fs" # BasicMembers - [] + [] let ``BasicMembers_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MethodsAndProperties/MethodsAndProperties.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MethodsAndProperties/MethodsAndProperties.fs index 6f5331abcbb..8bd5008bd51 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MethodsAndProperties/MethodsAndProperties.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MethodsAndProperties/MethodsAndProperties.fs @@ -17,25 +17,28 @@ module MemberDefinitions_MethodsAndProperties = let verifyCompileAndRun = verifyCompile >> run // SOURCE=PartiallyOverriddenProperty.fs - [] + [] let ``Partially Overridden Property`` compilation = compilation + |> getCompilation |> withCheckNulls |> typecheck |> shouldSucceed // SOURCE=AbstractProperties01.fs # AbstractProperties01.fs - [] + [] let ``AbstractProperties01_fs`` compilation = compilation + |> getCompilation |> withCheckNulls |> verifyCompileAndRun |> shouldSucceed // SOURCE=E_AbstractAndConcreteProp.fs SCFLAGS="--test:ErrorRanges" # E_AbstractAndConcreteProp.fs - [] + [] let ``E_AbstractAndConcreteProp_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -43,9 +46,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_AbstractProperties02.fs SCFLAGS="--test:ErrorRanges --flaterrors" # E_AbstractProperties02.fs - [] + [] let ``E_AbstractProperties02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -54,9 +58,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_AbstractProperties03.fs SCFLAGS="--test:ErrorRanges" # E_AbstractProperties03.fs - [] + [] let ``E_AbstractProperties03_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -64,9 +69,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_ActivePatternMember01.fs SCFLAGS="--test:ErrorRanges" # E_ActivePatternMember01.fs - [] + [] let ``E_ActivePatternMember01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -75,9 +81,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_ActivePatternMember02.fs SCFLAGS="--test:ErrorRanges" # E_ActivePatternMember02.fs - [] + [] let ``E_ActivePatternMember02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -89,9 +96,10 @@ module MemberDefinitions_MethodsAndProperties = // SOURCE=E_ActivePatternMember03.fs SCFLAGS="--test:ErrorRanges" # E_ActivePatternMember03.fs - [] + [] let ``E_ActivePatternMember03_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -101,9 +109,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_DuplicateProperty01.fs SCFLAGS="--test:ErrorRanges" # E_DuplicateProperty01.fs - [] + [] let ``E_DuplicateProperty01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -112,9 +121,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_IndexerArityMismatch01.fs SCFLAGS="--test:ErrorRanges --flaterrors" # E_IndexerArityMismatch01.fs - [] + [] let ``E_IndexerArityMismatch01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -125,9 +135,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_IndexerArityMismatch02.fs SCFLAGS="--test:ErrorRanges --flaterrors" # E_IndexerArityMismatch02.fs - [] + [] let ``E_IndexerArityMismatch02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -138,9 +149,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_IndexerIndeterminateType01.fs SCFLAGS=--test:ErrorRanges # E_IndexerIndeterminateType01.fs - [] + [] let ``E_IndexerIndeterminateType01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -148,9 +160,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_IndexerNotSpecified01.fs # E_IndexerNotSpecified01.fs - [] + [] let ``E_IndexerNotSpecified01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -158,9 +171,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_OutscopeThisPtr01.fs SCFLAGS="--test:ErrorRanges" # E_OutscopeThisPtr01.fs - [] + [] let ``E_OutscopeThisPtr01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -168,9 +182,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_Properties02.fs SCFLAGS="--test:ErrorRanges" # E_Properties02.fs - [] + [] let ``E_Properties02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -178,9 +193,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_Properties06.fs SCFLAGS="--test:ErrorRanges --flaterrors" # E_Properties06.fs - [] + [] let ``E_Properties06_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -188,9 +204,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_SettersMustHaveUnit01.fs # E_SettersMustHaveUnit01.fs - [] + [] let ``E_SettersMustHaveUnit01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -198,9 +215,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_SettersMustHaveUnit02.fs SCFLAGS="--test:ErrorRanges --flaterrors" # E_SettersMustHaveUnit02.fs - [] + [] let ``E_SettersMustHaveUnit02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -208,9 +226,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_UndefinedThisVariable.fs # E_UndefinedThisVariable.fs - [] + [] let ``E_UndefinedThisVariable_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -218,9 +237,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_UndefinedThisVariable02.fs # E_UndefinedThisVariable02.fs - [] + [] let ``E_UndefinedThisVariable02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -228,9 +248,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_useInstMethodThroughStatic.fs # E_useInstMethodThroughStatic.fs - [] + [] let ``E_UseInstMethodThroughStatic_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -238,9 +259,10 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=E_useStaticMethodThroughInstance.fs # E_useStaticMethodThroughInstance.fs - [] + [] let ``E_useStaticMethodThroughInstance_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -248,190 +270,216 @@ module MemberDefinitions_MethodsAndProperties = ] // SOURCE=genericGenericClass.fs # genericGenericClass.fs - [] + [] let ``genericGenericClass_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=GetAndSetKeywords01.fs # GetAndSetKeywords01.fs - [] + [] let ``GetAndSetKeywords01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=GetterSetterDiff01.fs # GetterSetterDiff01.fs - [] + [] let ``GetterSetterDiff01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Indexer01.fs # Indexer01.fs - [] + [] let ``Indexer01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Indexer02.fs # Indexer02.fs - [] + [] let ``Indexer02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Indexer02.fs SCFLAGS=-a # Indexer03.fs - [] + [] let ``Indexer03_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=instMembers-class.fs # instMembers-class.fs - [] + [] let ``instMembers-class_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:221"] |> verifyCompileAndRun |> shouldSucceed // SOURCE=instMembers-DU.fs # instMembers-DU.fs - [] + [] let ``InstMembers-DU_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:221"] |> verifyCompileAndRun |> shouldSucceed // SOURCE=instMembers-Records.fs # InstMembers-Records.fs - [] + [] let ``InstMembers-Records_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:221"] |> verifyCompileAndRun |> shouldSucceed // SOURCE=multiParamIndexer.fs # MultiParamIndexer.fs - [] + [] let ``MultiParamIndexer_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Properties01.fs # Properties01.fs - [] + [] let ``Properties01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Properties02.fs # Properties02.fs - [] + [] let ``Properties02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Properties03.fs # Properties03.fs - [] + [] let ``Properties03_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Properties04.fs # Properties04.fs - [] + [] let ``Properties04_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Properties05.fs # Properties05.fs - [] + [] let ``Properties05_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=RecursiveLetValues.fs # RecursiveLetValues.fs - [] + [] let ``RecursiveLetValues_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=StaticGenericField01.fs # StaticGenericField01 - [] + [] let ``StaticGenericField01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=staticMembers-class.fs # StaticMembers-Class.fs - [] + [] let ``StaticMembers-Class_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:221"] |> verifyCompileAndRun |> shouldSucceed // SOURCE=staticMembers-DU.fs # StaticMembers-DU.fs - [] + [] let ``StaticMembers-DU_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:221"] |> verifyCompileAndRun |> shouldSucceed // SOURCE=staticMembers-Records.fs # StaticMembers-Record.fs - [] + [] let ``staticMembers-Records_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:221"] |> verifyCompileAndRun |> shouldSucceed // SOURCE=staticMembers-instance.fs # StaticMembers-instance.fs - [] + [] let ``StaticMembers-instance_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=tupesAndFuncsAsArgs.fs # TupesAndFuncsAsArgs.fs - [] + [] let ``TupesAndFuncsAsArgs_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=TupledIndexer.fs # TupledIndexer.fs - [] + [] let ``TupledIndexer_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=typeMethodsCurrable.fs # TypeMethodsCurrable.fs - [] + [] let ``TypeMethodsCurrable_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=tupledValueProperties01.fs # tupledValueProperties01.fs - [] + [] let ``tupledValueProperties01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=tupledValueProperties02.fsx SCFLAGS="--nologo" FSIMODE=PIPE COMPILE_ONLY=1 # tupledValueProperties02.fsx - [] + [] let ``tupledValueProperties02_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed @@ -595,9 +643,10 @@ type I = (Error 3550, Line 7, Col 5, Line 7, Col 54, "Duplicate parameter. The parameter 'j' has been used more that once in this method.") ] - [] + [] let ``IndexedPropertiesSameType_fs`` compilation = compilation + |> getCompilation |> withLangVersion70 |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/NamedArguments/NamedArguments.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/NamedArguments/NamedArguments.fs index 21176ac005c..2c4b9ec5b63 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/NamedArguments/NamedArguments.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/NamedArguments/NamedArguments.fs @@ -21,9 +21,10 @@ module MemberDefinitions_NamedArguments = |> compileAndRun // SOURCE=E_MisspeltParam01.fs # E_MisspeltParam01.fs - [] + [] let ``E_MisspeltParam01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -31,9 +32,10 @@ module MemberDefinitions_NamedArguments = ] // SOURCE=E_MustBePrefix.fs # E_MustBePrefix.fs - [] + [] let ``E_MustBePrefix_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -41,9 +43,10 @@ module MemberDefinitions_NamedArguments = ] // SOURCE=E_NonNamedAfterNamed.fs # E_NonNamedAfterNamed.fs - [] + [] let ``E_NonNamedAfterNamed_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -51,9 +54,10 @@ module MemberDefinitions_NamedArguments = ] // SOURCE=E_NumParamMismatch01.fs # E_NumParamMismatch01.fs - [] + [] let ``E_NumParamMismatch01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -63,9 +67,10 @@ module MemberDefinitions_NamedArguments = ] // SOURCE=E_ReusedParam.fs # E_ReusedParam.fs - [] + [] let ``E_ReusedParam_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -74,9 +79,10 @@ module MemberDefinitions_NamedArguments = ] // SOURCE=E_SyntaxErrors01.fs SCFLAGS="--test:ErrorRanges" # E_SyntaxErrors01.fs - [] + [] let ``E_SyntaxErrors01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -86,72 +92,82 @@ module MemberDefinitions_NamedArguments = ] // SOURCE=genericNamedParams.fs # genericNamedParams.fs - [] + [] let ``genericNamedParams_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=mixNamedNonNamed.fs # mixNamedNonNamed.fs - [] + [] let ``mixNamedNonNamed_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=PropSetAfterConstrn01.fs # PropSetAfterConstrn01.fs - [] + [] let ``PropertySetterAfterConstruction01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=PropertySetterAfterConstruction01NamedExtensions.fs # PropertySetterAfterConstruction01NamedExtensions.fs - [] + [] let ``PropertySetterAfterConstruction01NamedExtensions_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=PropSetAfterConstrn01NamedExtInherit.fs # PropSetAfterConstrn01NamedExtInherit.fs - [] + [] let ``PropertySetterAfterConstruction01NamedExtensionsInheritance_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=PropertySetterAfterConstruction01NamedExtensionsOptional.fs # PropSetAfterConstrn01NamedExtOpt.fs - [] + [] let ``PropertySetterAfterConstruction01NamedExtensionsOptional_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCEPropSetAfterConstrn02.fs # PropSetAfterConstrn02.fs - [] + [] let ``PropertySetterAfterConstruction02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=PropSetAfterConstrn02NamedExt.fs # PropSetAfterConstrn02NamedExt.fs - [] + [] let ``PropertySetterAfterConstruction02NamedExtensions_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=refLibsHaveNamedParams.fs # refLibsHaveNamedParams.fs - [] + [] let ``refLibsHaveNamedParams_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed // SOURCE=SanityCheck.fs # SanityCheck.fs - [] + [] let ``SanityCheck_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OptionalArguments/OptionalArguments.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OptionalArguments/OptionalArguments.fs index 48cbd63e1e2..54a11db3814 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OptionalArguments/OptionalArguments.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OptionalArguments/OptionalArguments.fs @@ -25,9 +25,10 @@ module MemberDefinitions_OptionalArguments = |> compileAndRun // SOURCE=E_OptionalNamedArgs.fs SCFLAGS="-r:TestLib.dll" PRECMD="\$CSC_PIPE /t:library TestLib.cs" # E_OptionalNamedArgs.fs - [] + [] let ``E_OptionalNamedArgs_fs`` compilation = compilation + |> getCompilation |> withReferences [csTestLib] |> verifyCompile |> shouldFail @@ -36,39 +37,43 @@ module MemberDefinitions_OptionalArguments = ] // SOURCE=NullOptArgsFromCS.fs SCFLAGS="-r:TestLib.dll" PRECMD="\$CSC_PIPE /t:library TestLib.cs" # NullOptArgsFromCS.fs - [] + [] let ``NullOptArgsFromCS_fs`` compilation = compilation + |> getCompilation |> withReferences [csTestLib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=NullOptArgsFromVB.fs SCFLAGS="-r:TestLibVB.dll" PRECMD="\$VBC_PIPE /t:library TestLibVB.vb" # NullOptArgsFromVB.fs - //[] + //[] //let ``NullOptArgsFromVB_fs`` compilation = // compilation // |> verifyCompileAndRun // |> shouldSucceed // SOURCE=OptionalArgOnAbstract01.fs # OptionalArgOnAbstract01.fs - [] + [] let ``OptionalArgOnAbstract01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=SanityOptArgsFromCS.fs SCFLAGS="-r:TestLib.dll" PRECMD="\$CSC_PIPE /t:library TestLib.cs" # SanityOptArgsFromCS.fs - [] + [] let ``SanityOptArgsFromCS_fs`` compilation = compilation + |> getCompilation |> withReferences [csTestLib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=E_SanityCheck.fs - [] + [] let ``E_SanityCheck_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -77,9 +82,10 @@ module MemberDefinitions_OptionalArguments = ] // SOURCE=E_SanityCheck02.fs - [] + [] let ``E_SanityCheck02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -88,30 +94,34 @@ module MemberDefinitions_OptionalArguments = ] // SOURCE=optionalOfOptOptA.fs - [] + [] let ``optionalOfOptOptA_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=SanityCheck.fs - [] + [] let ``SanityCheck_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=SanityCheck02.fs - [] + [] let ``SanityCheck02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=SanityCheck03.fs - [] + [] let ``SanityCheck03_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OptionalDefaultParamArgs/OptionalDefaultParamArgs.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OptionalDefaultParamArgs/OptionalDefaultParamArgs.fs index ae25dc72198..13d2b188fe2 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OptionalDefaultParamArgs/OptionalDefaultParamArgs.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OptionalDefaultParamArgs/OptionalDefaultParamArgs.fs @@ -30,9 +30,10 @@ module MemberDefinitions_OptionalDefaultParamArgs = |> compileAndRun // SOURCE=E_OnlyDefault.fs - [] + [] let ``E_OnlyDefault_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -40,39 +41,44 @@ module MemberDefinitions_OptionalDefaultParamArgs = ] // SOURCE=InterfaceMethod.fs - [] + [] let ``InterfaceMethod_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //// SOURCE=Library.fs POSTCMD="\$CSC_PIPE -r:Library.dll CallFSharpMethods.cs && CallFSharpMethods.exe" SCFLAGS=-a - //[] + //[] //let ``CallFSharpMethods_cs`` _compilation = // compilation + // |> getCompilation // |> withReferences [fsLibrary] // |> verifyCompileAndRun // |> shouldSucceed // SOURCE=Library.fs POSTCMD="\$FSC_PIPE -r:Library.dll CallMethods.fs && CallMethods.exe" SCFLAGS=-a - [] + [] let ``CallMethods_fs`` compilation = compilation + |> getCompilation |> withReferences [fsLibrary] |> verifyCompileAndRun |> shouldSucceed // SOURCE=Sanity.fs - [] + [] let ``Sanity_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=W_WrongDefaultType.fs - [] + [] let ``W_WrongDefaultType_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OverloadingMembers/OverloadingMembers.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OverloadingMembers/OverloadingMembers.fs index e0b4c824187..21f7a03b2fc 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OverloadingMembers/OverloadingMembers.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/OverloadingMembers/OverloadingMembers.fs @@ -21,7 +21,7 @@ module MemberDefinitions_OverloadingMembers = |> compileAndRun // NOMONO,NoMT SOURCE=ConsumeOverloadGenericMethods.fs SCFLAGS="-r:lib.dll" PRECMD="\$CSC_PIPE /t:library /reference:System.Core.dll lib.cs" # ConsumeOverloadGenericMethods.fs - [] + [] let ``ConsumeOverloadGenericMethods_fs`` compilation = let lib = @@ -29,21 +29,24 @@ module MemberDefinitions_OverloadingMembers = |> withName "Library" compilation + |> getCompilation |> withReferences [lib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=diffNumArguments.fs # diffNumArguments.fs - [] + [] let ``diffNumArguments_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=E_InferredTypeNotUnique01.fs SCFLAGS="--test:ErrorRanges" # E_InferredTypeNotUnique01.fs - [] + [] let ``E_InferredTypeNotUnique01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -52,9 +55,10 @@ module MemberDefinitions_OverloadingMembers = ] // SOURCE=E_OperatorOverloading01.fs SCFLAGS="--test:ErrorRanges" # E_OperatorOverloading01.fs - [] + [] let ``E_OperatorOverloading01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -68,9 +72,10 @@ module MemberDefinitions_OverloadingMembers = ] // SOURCE=E_OverloadCurriedFunc.fs # E_OverloadCurriedFunc.fs - [] + [] let ``E_OverloadCurriedFunc_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -82,9 +87,10 @@ module MemberDefinitions_OverloadingMembers = ] // SOURCE=E_OverloadMismatch.fs # E_OverloadMismatch.fs - [] + [] let ``E_OverloadMismatch_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -92,9 +98,10 @@ module MemberDefinitions_OverloadingMembers = ] // SOURCE=E_ReturnGenericUnit01.fs # E_ReturnGenericUnit01.fs - [] + [] let ``E_ReturnGenericUnit01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -102,136 +109,155 @@ module MemberDefinitions_OverloadingMembers = ] //// SOURCE=E_UnsolvableConstraints01.fs SCFLAGS="--test:ErrorRanges" # E_UnsolvableConstraints01.fs - //[] + //[] //let ``E_UnsolvableConstraints01_fs`` compilation = // compilation + // |> getCompilation // |> verifyCompile // |> shouldFail // |> withDiagnostics [ // ] // SOURCE=InferenceForLambdaArgs.fs # InferenceForLambdaArgs.fs - [] + [] let ``InferenceForLambdaArgs_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=NoOverloadIDSpecified.fs # NoOverloadIDSpecified.fs - [] + [] let ``NoOverloadIDSpecified_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=NoWarningWhenDoingDispatchSlotInference01.fs SCFLAGS="--warnaserror+" COMPILE_ONLY=1 # NoWarningWhenDoingDispatchSlotInference01.fs - [] + [] let ``NoWarningWhenDoingDispatchSlotInference01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=NoWarningWhenOverloadingInSubClass01.fs SCFLAGS="--warnaserror" # NoWarningWhenOverloadingInSubClass01.fs - [] + [] let ``NoWarningWhenOverloadingInSubClass01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=OnAllOverloads01.fs # OnAllOverloads01.fs - [] + [] let ``OnAllOverloads01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=OperatorOverloading01.fs # OperatorOverloading01.fs - [] + [] let ``OperatorOverloading01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=OperatorOverloading02.fs # OperatorOverloading02.fs - [] + [] let ``OperatorOverloading02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=OperatorOverloading03.fs # OperatorOverloading03.fs - [] + [] let ``OperatorOverloading03_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=OperatorOverloading04.fs # OperatorOverloading04.fs - [] + [] let ``OperatorOverloading04_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // NoMT SOURCE=OverloadingAndExtensionMethodsForGenericTypes.fs # OverloadingAndExtensionMethodsForGenericTypes.fs - [] + [] let ``OverloadingAndExtensionMethodsForGenericTypes_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=reuseOverloadIDs.fs # reuseOverloadIDs.fs - [] + [] let ``reuseOverloadIDs_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=SanityCheck.fs # SanityCheck.fs - [] + [] let ``SanityCheck_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=TieBreakerRule01a.fs # TieBreakerRule01a.fs - [] + [] let ``TieBreakerRule01a_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=TieBreakerRule01b.fs # TieBreakerRule01b.fs - [] + [] let ``TieBreakerRule01b_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=TieBreakerRule02.fs # TieBreakerRule02.fs - [] + [] let ``TieBreakerRule02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=TieBreakerRule03.fs # TieBreakerRule03.fs - [] + [] let ``TieBreakerRule03_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=TooGeneric.fs SCFLAGS="--define:TOO_GENERIC" # TooGeneric.fs - [] + [] let ``TooGeneric_fs`` compilation = compilation + |> getCompilation |> withDefines ["TOO_GENERIC"] |> verifyCompileAndRun |> shouldSucceed - [] + [] let ``OverloadResolutionUsingFunction_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution.fs deleted file mode 100644 index f6145c01abc..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution.fs +++ /dev/null @@ -1,485 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Conformance.BasicGrammarElements - -open Xunit -open FSharp.Test.Compiler - -module MethodResolution = - - [] - let ``Method with optional and out parameters resolves correctly (sanity test)`` () = - FSharp """ -open System.Runtime.InteropServices - -type Thing = - static member Do(o: outref, []i: int) = - o <- i - i = 7 - -// We expect return value to be false, and out value to be 42 here. -let returnvalue1, value1 = Thing.Do(i = 42) -// Have explicit boolean check for readability here: -if returnvalue1 <> false && value1 <> 42 then - failwith "Mismatch: Return value should be false, and out value should be 42" - -// Here, we expect return value to be true, and out value to be 7 -let returnvalue2, value2 = Thing.Do() -// Have explicit boolean check for readability here: -if returnvalue2<> true && value2 <> 7 then - failwith "Mismatch: Return value should be true, and out value should be 7" - """ - |> typecheck - |> shouldSucceed - |> ignore - - [] - let ``Method with optional and out parameters resolves correctly withRealInternalSignatureOff (verify IL)`` () = - FSharp """ -module OutOptionalTests -open System.Runtime.InteropServices - -type Thing = - static member Do(o: outref, []i: int) = - o <- i - i = 7 -let (_:bool), (_:int) = Thing.Do(i = 42) -let (_:bool), (_:int) = Thing.Do() - """ - |> ignoreWarnings - |> withRealInternalSignatureOff - |> compile - |> shouldSucceed - |> verifyIL [ - """ -.class public abstract auto ansi sealed OutOptionalTests -extends [runtime]System.Object -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable nested public Thing - extends [runtime]System.Object - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) - .method public static bool Do([out] int32& o, - [opt] int32 i) cil managed - { - .param [2] = int32(0x00000001) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stobj [runtime]System.Int32 - IL_0007: ldarg.1 - IL_0008: ldc.i4.7 - IL_0009: ceq - IL_000b: ret - } - - } - - .method assembly specialname static class [runtime]System.Tuple`2 get_patternInput@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::patternInput@9 - IL_0005: ret - } - - .method assembly specialname static int32 get_outArg@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$OutOptionalTests::outArg@9 - IL_0005: ret - } - - .method assembly specialname static void set_outArg@9(int32 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 ''.$OutOptionalTests::outArg@9 - IL_0006: ret - } - - .method assembly specialname static class [runtime]System.Tuple`2 'get_patternInput@10-1'() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::'patternInput@10-1' - IL_0005: ret - } - - .method assembly specialname static int32 'get_outArg@10-1'() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$OutOptionalTests::'outArg@10-1' - IL_0005: ret - } - - .method assembly specialname static void 'set_outArg@10-1'(int32 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 ''.$OutOptionalTests::'outArg@10-1' - IL_0006: ret - } - - .property class [runtime]System.Tuple`2 - patternInput@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get class [runtime]System.Tuple`2 OutOptionalTests::get_patternInput@9() - } - .property int32 outArg@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void OutOptionalTests::set_outArg@9(int32) - .get int32 OutOptionalTests::get_outArg@9() - } - .property class [runtime]System.Tuple`2 - 'patternInput@10-1'() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get class [runtime]System.Tuple`2 OutOptionalTests::'get_patternInput@10-1'() - } - .property int32 'outArg@10-1'() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void OutOptionalTests::'set_outArg@10-1'(int32) - .get int32 OutOptionalTests::'get_outArg@10-1'() - } -} - """ - """ -.class private abstract auto ansi sealed ''.$OutOptionalTests -extends [runtime]System.Object -{ - .field static assembly initonly class [runtime]System.Tuple`2 patternInput@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 outArg@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly initonly class [runtime]System.Tuple`2 'patternInput@10-1' - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 'outArg@10-1' - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 init@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 4 - .locals init (int32& V_0) - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$OutOptionalTests::outArg@9 - IL_0006: ldsflda int32 ''.$OutOptionalTests::outArg@9 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.s 42 - IL_000f: stobj [runtime]System.Int32 - IL_0014: ldc.i4.0 - IL_0015: call int32 OutOptionalTests::get_outArg@9() - IL_001a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_001f: stsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::patternInput@9 - IL_0024: ldc.i4.0 - IL_0025: stsfld int32 ''.$OutOptionalTests::'outArg@10-1' - IL_002a: ldsflda int32 ''.$OutOptionalTests::'outArg@10-1' - IL_002f: stloc.0 - IL_0030: ldloc.0 - IL_0031: ldc.i4.1 - IL_0032: stobj [runtime]System.Int32 - IL_0037: ldc.i4.0 - IL_0038: call int32 OutOptionalTests::'get_outArg@10-1'() - IL_003d: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_0042: stsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::'patternInput@10-1' - IL_0047: ret - } - -} - """] - - [] - let ``Method with optional and out parameters resolves correctly withRealInternalSignatureOn (verify IL)`` () = - FSharp """ -module OutOptionalTests -open System.Runtime.InteropServices - -type Thing = - static member Do(o: outref, []i: int) = - o <- i - i = 7 -let (_:bool), (_:int) = Thing.Do(i = 42) -let (_:bool), (_:int) = Thing.Do() - """ - |> ignoreWarnings - |> withRealInternalSignatureOn - |> compile - |> shouldSucceed - |> verifyIL [ - """ -.class public abstract auto ansi sealed OutOptionalTests - extends [runtime]System.Object -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable nested public Thing - extends [runtime]System.Object - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) - .method public static bool Do([out] int32& o, - [opt] int32 i) cil managed - { - .param [2] = int32(0x00000001) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: stobj [runtime]System.Int32 - IL_0007: ldarg.1 - IL_0008: ldc.i4.7 - IL_0009: ceq - IL_000b: ret - } - - } - - .field static assembly class [runtime]System.Tuple`2 patternInput@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 outArg@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [runtime]System.Tuple`2 'patternInput@10-1' - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 'outArg@10-1' - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method assembly specialname static class [runtime]System.Tuple`2 get_patternInput@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`2 OutOptionalTests::patternInput@9 - IL_0005: ret - } - - .method assembly specialname static int32 get_outArg@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 OutOptionalTests::outArg@9 - IL_0005: ret - } - - .method assembly specialname static void set_outArg@9(int32 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 OutOptionalTests::outArg@9 - IL_0006: ret - } - - .method assembly specialname static class [runtime]System.Tuple`2 'get_patternInput@10-1'() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`2 OutOptionalTests::'patternInput@10-1' - IL_0005: ret - } - - .method assembly specialname static int32 'get_outArg@10-1'() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 OutOptionalTests::'outArg@10-1' - IL_0005: ret - } - - .method assembly specialname static void 'set_outArg@10-1'(int32 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 OutOptionalTests::'outArg@10-1' - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$OutOptionalTests::init@ - IL_0006: ldsfld int32 ''.$OutOptionalTests::init@ - IL_000b: pop - IL_000c: ret - } - - .method assembly specialname static void staticInitialization@() cil managed - { - - .maxstack 4 - .locals init (int32& V_0) - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 OutOptionalTests::outArg@9 - IL_0006: ldsflda int32 OutOptionalTests::outArg@9 - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.s 42 - IL_000f: stobj [runtime]System.Int32 - IL_0014: ldc.i4.0 - IL_0015: call int32 OutOptionalTests::get_outArg@9() - IL_001a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_001f: stsfld class [runtime]System.Tuple`2 OutOptionalTests::patternInput@9 - IL_0024: ldc.i4.0 - IL_0025: stsfld int32 OutOptionalTests::'outArg@10-1' - IL_002a: ldsflda int32 OutOptionalTests::'outArg@10-1' - IL_002f: stloc.0 - IL_0030: ldloc.0 - IL_0031: ldc.i4.1 - IL_0032: stobj [runtime]System.Int32 - IL_0037: ldc.i4.0 - IL_0038: call int32 OutOptionalTests::'get_outArg@10-1'() - IL_003d: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, - !1) - IL_0042: stsfld class [runtime]System.Tuple`2 OutOptionalTests::'patternInput@10-1' - IL_0047: ret - } - - .property class [runtime]System.Tuple`2 - patternInput@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get class [runtime]System.Tuple`2 OutOptionalTests::get_patternInput@9() - } - .property int32 outArg@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void OutOptionalTests::set_outArg@9(int32) - .get int32 OutOptionalTests::get_outArg@9() - } - .property class [runtime]System.Tuple`2 - 'patternInput@10-1'() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get class [runtime]System.Tuple`2 OutOptionalTests::'get_patternInput@10-1'() - } - .property int32 'outArg@10-1'() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void OutOptionalTests::'set_outArg@10-1'(int32) - .get int32 OutOptionalTests::'get_outArg@10-1'() - } -} - -.class private abstract auto ansi sealed ''.$OutOptionalTests - extends [runtime]System.Object -{ - .field static assembly int32 init@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: call void OutOptionalTests::staticInitialization@() - IL_0005: ret - } - -} - """] - - [] - let ``Method with optional and out parameters resolves correctly (examples from original issue: https://github.com/dotnet/fsharp/issues/12515)`` () = - Fsx """ -open System.Runtime.InteropServices; - -// Define a member with both outref and default parameters. The compiler's implicit outref handling can handle this -// if required and optional parameters are provided, but not if the default parameters are left out - -type Thing = - static member Do(x: int, - fast: outref, - think: outref, - [] - token: System.Threading.CancellationToken - ) : bool = - true - static member Also(x: int, - [] - token: System.Threading.CancellationToken, - fast: outref, - think: outref - ) : bool = true - -// Works, was error because we can't strip the default `token` parameter for some reason -let ok, fast, think = Thing.Do(1) - -// works because the outrefs are detected and provided by the compiler -let ok2, fast2, think2 = Thing.Do(1, token = System.Threading.CancellationToken.None) - -// Works, was error because we can't strip the default `token` parameter for some reason -let ok3, fast3, think3 = Thing.Also(1) - -// works because the outrefs are detected and provided by the compiler -let ok4, fast4, think4 = Thing.Also(1, token = System.Threading.CancellationToken.None) - -// works but requires a lot of work for the user -let mutable fast5 = Unchecked.defaultof -let mutable think5 = Unchecked.defaultof - -let ok5 = Thing.Do(1, &fast5, &think5) - """ - - [] - let ``Method with same optional and out parameter does not resolve`` () = - Fsx """ -open System.Runtime.InteropServices - -type Thing = - static member Do([]i: outref) = true -let _, _ = Thing.Do() - """ - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Error 501, Line 6, Col 12, Line 6, Col 22, "The member or object constructor 'Do' takes 1 argument(s) but is here given 0. The required signature is 'static member Thing.Do: [] i: outref -> bool'.") - ] - - [] - let ``optional and ParamArray parameter resolves correctly `` () = - Fsx """ -open System.Runtime.InteropServices - -type Thing = - static member Do( - [] something: string, - [] args: obj[]) = something, args - static member Do2( - [] something: string, - outvar: outref, - [] args: obj[]) = - - outvar <- 1 - something, args -let _, _ = Thing.Do() -let _, _ = Thing.Do("123") -let _, _ = Thing.Do("123", 1, 2, 3, 4) - -let _, _ = Thing.Do2() -let _, _ = Thing.Do2("123") -let _ = - let mutable x = 0 - Thing.Do2("123", &x) -let _ = - let mutable x = 0 - Thing.Do2("123", &x, 1, 2, 3, 4) - """ - |> typecheck - |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/MethodResolution.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/MethodResolution.fs new file mode 100644 index 00000000000..74713d082ac --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/MethodResolution.fs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Conformance.BasicGrammarElements + +open FSharp.Test +open FSharp.Test.Compiler +open Xunit + +module MethodResolution = + + [] + let ``Method with optional and out parameters resolves correctly (sanity test)`` () = + FSharp """ +open System.Runtime.InteropServices + +type Thing = + static member Do(o: outref, []i: int) = + o <- i + i = 7 + +// We expect return value to be false, and out value to be 42 here. +let returnvalue1, value1 = Thing.Do(i = 42) +// Have explicit boolean check for readability here: +if returnvalue1 <> false && value1 <> 42 then + failwith "Mismatch: Return value should be false, and out value should be 42" + +// Here, we expect return value to be true, and out value to be 7 +let returnvalue2, value2 = Thing.Do() +// Have explicit boolean check for readability here: +if returnvalue2<> true && value2 <> 7 then + failwith "Mismatch: Return value should be true, and out value should be 7" + """ + |> typecheck + |> shouldSucceed + |> ignore + + [] + let ``OptionalAndOutParameters_fs`` compilation = + compilation + |> getCompilation + |> ignoreWarnings + |> verifyILBaseline + + [] + let ``Method with optional and out parameters resolves correctly (examples from original issue: https://github.com/dotnet/fsharp/issues/12515)`` () = + Fsx """ +open System.Runtime.InteropServices; + +// Define a member with both outref and default parameters. The compiler's implicit outref handling can handle this +// if required and optional parameters are provided, but not if the default parameters are left out + +type Thing = + static member Do(x: int, + fast: outref, + think: outref, + [] + token: System.Threading.CancellationToken + ) : bool = + true + static member Also(x: int, + [] + token: System.Threading.CancellationToken, + fast: outref, + think: outref + ) : bool = true + +// Works, was error because we can't strip the default `token` parameter for some reason +let ok, fast, think = Thing.Do(1) + +// works because the outrefs are detected and provided by the compiler +let ok2, fast2, think2 = Thing.Do(1, token = System.Threading.CancellationToken.None) + +// Works, was error because we can't strip the default `token` parameter for some reason +let ok3, fast3, think3 = Thing.Also(1) + +// works because the outrefs are detected and provided by the compiler +let ok4, fast4, think4 = Thing.Also(1, token = System.Threading.CancellationToken.None) + +// works but requires a lot of work for the user +let mutable fast5 = Unchecked.defaultof +let mutable think5 = Unchecked.defaultof + +let ok5 = Thing.Do(1, &fast5, &think5) + """ + + [] + let ``Method with same optional and out parameter does not resolve`` () = + Fsx """ +open System.Runtime.InteropServices + +type Thing = + static member Do([]i: outref) = true +let _, _ = Thing.Do() + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 501, Line 6, Col 12, Line 6, Col 22, "The member or object constructor 'Do' takes 1 argument(s) but is here given 0. The required signature is 'static member Thing.Do: [] i: outref -> bool'.") + ] + + [] + let ``optional and ParamArray parameter resolves correctly `` () = + Fsx """ +open System.Runtime.InteropServices + +type Thing = + static member Do( + [] something: string, + [] args: obj[]) = something, args + static member Do2( + [] something: string, + outvar: outref, + [] args: obj[]) = + + outvar <- 1 + something, args +let _, _ = Thing.Do() +let _, _ = Thing.Do("123") +let _, _ = Thing.Do("123", 1, 2, 3, 4) + +let _, _ = Thing.Do2() +let _, _ = Thing.Do2("123") +let _ = + let mutable x = 0 + Thing.Do2("123", &x) +let _ = + let mutable x = 0 + Thing.Do2("123", &x, 1, 2, 3, 4) + """ + |> typecheck + |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs new file mode 100644 index 00000000000..29f58ce0db6 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs @@ -0,0 +1,9 @@ +module OutOptionalTests +open System.Runtime.InteropServices + +type Thing = + static member Do(o: outref, []i: int) = + o <- i + i = 7 +let (_:bool), (_:int) = Thing.Do(i = 42) +let (_:bool), (_:int) = Thing.Do() diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOff.il.bsl new file mode 100644 index 00000000000..ab736a3c457 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOff.il.bsl @@ -0,0 +1,182 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.dll + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed OutOptionalTests + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable nested public Thing + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public static bool Do([out] int32& o, + [opt] int32 i) cil managed + { + .param [2] = int32(0x00000001) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stobj [runtime]System.Int32 + IL_0007: ldarg.1 + IL_0008: ldc.i4.7 + IL_0009: ceq + IL_000b: ret + } + + } + + .method assembly specialname static class [runtime]System.Tuple`2 get_patternInput@8() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::patternInput@8 + IL_0005: ret + } + + .method assembly specialname static int32 get_outArg@8() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 ''.$OutOptionalTests::outArg@8 + IL_0005: ret + } + + .method assembly specialname static void set_outArg@8(int32 'value') cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld int32 ''.$OutOptionalTests::outArg@8 + IL_0006: ret + } + + .method assembly specialname static class [runtime]System.Tuple`2 'get_patternInput@9-1'() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::'patternInput@9-1' + IL_0005: ret + } + + .method assembly specialname static int32 'get_outArg@9-1'() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 ''.$OutOptionalTests::'outArg@9-1' + IL_0005: ret + } + + .method assembly specialname static void 'set_outArg@9-1'(int32 'value') cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld int32 ''.$OutOptionalTests::'outArg@9-1' + IL_0006: ret + } + + .property class [runtime]System.Tuple`2 + patternInput@8() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [runtime]System.Tuple`2 OutOptionalTests::get_patternInput@8() + } + .property int32 outArg@8() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .set void OutOptionalTests::set_outArg@8(int32) + .get int32 OutOptionalTests::get_outArg@8() + } + .property class [runtime]System.Tuple`2 + 'patternInput@9-1'() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [runtime]System.Tuple`2 OutOptionalTests::'get_patternInput@9-1'() + } + .property int32 'outArg@9-1'() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .set void OutOptionalTests::'set_outArg@9-1'(int32) + .get int32 OutOptionalTests::'get_outArg@9-1'() + } +} + +.class private abstract auto ansi sealed ''.$OutOptionalTests + extends [runtime]System.Object +{ + .field static assembly initonly class [runtime]System.Tuple`2 patternInput@8 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 outArg@8 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly initonly class [runtime]System.Tuple`2 'patternInput@9-1' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 'outArg@9-1' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 4 + .locals init (int32& V_0) + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$OutOptionalTests::outArg@8 + IL_0006: ldsflda int32 ''.$OutOptionalTests::outArg@8 + IL_000b: stloc.0 + IL_000c: ldloc.0 + IL_000d: ldc.i4.s 42 + IL_000f: stobj [runtime]System.Int32 + IL_0014: ldc.i4.0 + IL_0015: call int32 OutOptionalTests::get_outArg@8() + IL_001a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_001f: stsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::patternInput@8 + IL_0024: ldc.i4.0 + IL_0025: stsfld int32 ''.$OutOptionalTests::'outArg@9-1' + IL_002a: ldsflda int32 ''.$OutOptionalTests::'outArg@9-1' + IL_002f: stloc.0 + IL_0030: ldloc.0 + IL_0031: ldc.i4.1 + IL_0032: stobj [runtime]System.Int32 + IL_0037: ldc.i4.0 + IL_0038: call int32 OutOptionalTests::'get_outArg@9-1'() + IL_003d: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0042: stsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::'patternInput@9-1' + IL_0047: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOn.il.bsl new file mode 100644 index 00000000000..6ef8ee296d3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOn.il.bsl @@ -0,0 +1,201 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.dll + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed OutOptionalTests + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable nested public Thing + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public static bool Do([out] int32& o, + [opt] int32 i) cil managed + { + .param [2] = int32(0x00000001) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stobj [runtime]System.Int32 + IL_0007: ldarg.1 + IL_0008: ldc.i4.7 + IL_0009: ceq + IL_000b: ret + } + + } + + .field static assembly class [runtime]System.Tuple`2 patternInput@8 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 outArg@8 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [runtime]System.Tuple`2 'patternInput@9-1' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 'outArg@9-1' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method assembly specialname static class [runtime]System.Tuple`2 get_patternInput@8() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Tuple`2 OutOptionalTests::patternInput@8 + IL_0005: ret + } + + .method assembly specialname static int32 get_outArg@8() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 OutOptionalTests::outArg@8 + IL_0005: ret + } + + .method assembly specialname static void set_outArg@8(int32 'value') cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld int32 OutOptionalTests::outArg@8 + IL_0006: ret + } + + .method assembly specialname static class [runtime]System.Tuple`2 'get_patternInput@9-1'() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Tuple`2 OutOptionalTests::'patternInput@9-1' + IL_0005: ret + } + + .method assembly specialname static int32 'get_outArg@9-1'() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 OutOptionalTests::'outArg@9-1' + IL_0005: ret + } + + .method assembly specialname static void 'set_outArg@9-1'(int32 'value') cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld int32 OutOptionalTests::'outArg@9-1' + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$OutOptionalTests::init@ + IL_0006: ldsfld int32 ''.$OutOptionalTests::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 4 + .locals init (int32& V_0) + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 OutOptionalTests::outArg@8 + IL_0006: ldsflda int32 OutOptionalTests::outArg@8 + IL_000b: stloc.0 + IL_000c: ldloc.0 + IL_000d: ldc.i4.s 42 + IL_000f: stobj [runtime]System.Int32 + IL_0014: ldc.i4.0 + IL_0015: call int32 OutOptionalTests::get_outArg@8() + IL_001a: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_001f: stsfld class [runtime]System.Tuple`2 OutOptionalTests::patternInput@8 + IL_0024: ldc.i4.0 + IL_0025: stsfld int32 OutOptionalTests::'outArg@9-1' + IL_002a: ldsflda int32 OutOptionalTests::'outArg@9-1' + IL_002f: stloc.0 + IL_0030: ldloc.0 + IL_0031: ldc.i4.1 + IL_0032: stobj [runtime]System.Int32 + IL_0037: ldc.i4.0 + IL_0038: call int32 OutOptionalTests::'get_outArg@9-1'() + IL_003d: newobj instance void class [runtime]System.Tuple`2::.ctor(!0, + !1) + IL_0042: stsfld class [runtime]System.Tuple`2 OutOptionalTests::'patternInput@9-1' + IL_0047: ret + } + + .property class [runtime]System.Tuple`2 + patternInput@8() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [runtime]System.Tuple`2 OutOptionalTests::get_patternInput@8() + } + .property int32 outArg@8() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .set void OutOptionalTests::set_outArg@8(int32) + .get int32 OutOptionalTests::get_outArg@8() + } + .property class [runtime]System.Tuple`2 + 'patternInput@9-1'() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [runtime]System.Tuple`2 OutOptionalTests::'get_patternInput@9-1'() + } + .property int32 'outArg@9-1'() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .set void OutOptionalTests::'set_outArg@9-1'(int32) + .get int32 OutOptionalTests::'get_outArg@9-1'() + } +} + +.class private abstract auto ansi sealed ''.$OutOptionalTests + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: call void OutOptionalTests::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ModuleAbbreviations/ModuleAbbreviations.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ModuleAbbreviations/ModuleAbbreviations.fs index 6f457f7c5e4..5c96561b0ca 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ModuleAbbreviations/ModuleAbbreviations.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ModuleAbbreviations/ModuleAbbreviations.fs @@ -21,9 +21,10 @@ module ModuleAbbreviations = |> compileAndRun // SOURCE=E_AbbreviationOnNamespace01.fs SCFLAGS="--test:ErrorRanges" # E_AbbreviationOnNamespace01.fs - [] + [] let ``E_AbbreviationOnNamespace01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -35,9 +36,10 @@ module ModuleAbbreviations = ] // SOURCE=E_InvalidAbbrevName01.fs SCFLAGS="--test:ErrorRanges" # E_InvalidAbbrevName01.fs - [] + [] let ``E_InvalidAbbrevName01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -45,9 +47,10 @@ module ModuleAbbreviations = ] // SOURCE=E_InvalidAbbrevName02.fs # E_InvalidAbbrevName02.fs - [] + [] let ``E_InvalidAbbrevName02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -55,9 +58,10 @@ module ModuleAbbreviations = ] // SOURCE=E_NameConflict01.fs # E_NameConflict01.fs - [] + [] let ``E_NameConflict01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -65,9 +69,10 @@ module ModuleAbbreviations = ] // SOURCE=E_UseInsideFunc.fs SCFLAGS="--test:ErrorRanges" # E_UseInsideFunc.fs - [] + [] let ``E_UseInsideFunc_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -75,36 +80,40 @@ module ModuleAbbreviations = ] // SOURCE=SanityCheck.fs # SanityCheck.fs - [] + [] let ``SanityCheck_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=SanityCheck02.fs # SanityCheck02.fs - [] + [] let ``SanityCheck02_fs`` compilation = compilation + |> getCompilation |> withNoWarn 1104 |> verifyCompileAndRun |> shouldSucceed // SOURCE=useInsideModuleDef.fs # useInsideModuleDef.fs - [] + [] let ``useInsideModuleDef_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=useInsideNamespaceDef.fs COMPILE_ONLY=1 # useInsideNamespaceDef.fs - [] + [] let ``useInsideNamespaceDef_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // NoMT SOURCE=useInsideNamespaceDefExternal.fs PRECMD="\$FSC_PIPE -a useInsideNamespaceDefExternal_DLL.fs" SCFLAGS="-r:useInsideNamespaceDefExternal_DLL.dll" # useInsideNamespaceDefExternal.fs - [] + [] let ``useInsideNamespaceDefExternal_fs`` compilation = let useInsideNamespaceDefExternal_DLL = @@ -113,6 +122,7 @@ module ModuleAbbreviations = |> withName "useInsideNamespaceDefExternal_DLL" compilation + |> getCompilation |> withReferences [useInsideNamespaceDefExternal_DLL] |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ModuleDefinitions/ModuleDefinitions.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ModuleDefinitions/ModuleDefinitions.fs index a476739a680..d96badb97b4 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ModuleDefinitions/ModuleDefinitions.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ModuleDefinitions/ModuleDefinitions.fs @@ -22,16 +22,18 @@ module ModuleDefinitions = |> compileAndRun // SOURCE=AutoOpen01.fs # AutoOpen01.fs - [] + [] let ``AutoOpen01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=AutoOpen02.fs # AutoOpen02.fs - [] + [] let ``AutoOpen02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -39,23 +41,26 @@ module ModuleDefinitions = ] // SOURCE=AutoOpen03.fs # AutoOpen03.fs - [] + [] let ``AutoOpen03_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=DefineModule01.fs # DefineModule01.fs - [] + [] let ``DefineModule01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=E_CannotAccessPrivateMembersOfAnotherType.fs SCFLAGS="--test:ErrorRanges" COMPILE_ONLY=1 # E_CannotAccessPrivateMembersOfAnotherType.fs - [] + [] let ``E_CannotAccessPrivateMembersOfAnotherType_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -64,9 +69,10 @@ module ModuleDefinitions = ] // SOURCE=E_ModuleSuffix01.fsx SCFLAGS="--test:ErrorRanges" # E_ModuleSuffix01.fsx - [] + [] let ``E_ModuleSuffix01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -74,9 +80,10 @@ module ModuleDefinitions = ] // SOURCE=E_ModuleSuffix_NameClash01.fsx SCFLAGS="--test:ErrorRanges" # E_ModuleSuffix_NameClash01.fsx - [] + [] let ``E_ModuleSuffix_NameClash01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -84,9 +91,10 @@ module ModuleDefinitions = ] // SOURCE=E_ModuleWithExpression02.fs COMPILE_ONLY=1 SCFLAGS="--test:ErrorRanges" # E_ModuleWithExpression02.fs - [] + [] let ``E_ModuleWithExpression02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -94,9 +102,10 @@ module ModuleDefinitions = ] // SOURCE=E_ModuleWithSameNameInNamespace01.fsx SCFLAGS="--test:ErrorRanges" # E_ModuleWithSameNameInNamespace01.fsx - [] + [] let ``E_ModuleWithSameNameInNamespace01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -104,9 +113,10 @@ module ModuleDefinitions = ] // SOURCE="E_ModuleWithSameNameInNamespace02a.fsx E_ModuleWithSameNameInNamespace02b.fsx" SCFLAGS="--test:ErrorRanges" # E_ModuleWithSameNameInNamespace02 - [] + [] let ``E_ModuleWithSameNameInNamespace02a_fsx`` compilation = compilation + |> getCompilation |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++"E_ModuleWithSameNameInNamespace02b.fsx")) |> verifyCompile |> shouldFail @@ -115,9 +125,10 @@ module ModuleDefinitions = ] // SOURCE=E_ObsoleteAttribOnModules01.fs SCFLAGS="--test:ErrorRanges" # E_ObsoleteAttribOnModules01.fs - [] + [] let ``E_ObsoleteAttribOnModules01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -128,42 +139,47 @@ module ModuleDefinitions = ] // SOURCE=FullyQualify01.fs # FullyQualify01.fs - [] + [] let ``FullyQualify01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=LightSyntax01.fsx # LightSyntax01.fsx - [] + [] let ``LightSyntax01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=ModuleAbbreviationWithModule01.fs COMPILE_ONLY=1 SCFLAGS="--test:ErrorRanges" # ModuleAbbreviationWithModule01.fs - [] + [] let ``ModuleAbbreviationWithModule01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE="Module_internal01.fs Module_internalConsumer01.fs" # Module_internal01 - [] + [] let ``Module_internal01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=ModuleSuffix02.fsx # ModuleSuffix02.fsx - [] + [] let ``ModuleSuffix02_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // NoMT SOURCE=ModuleSuffix03.fsx PRECMD="\$FSC_PIPE -a ModuleSuffix03Lib.fsx" SCFLAGS="-r:ModuleSuffix03Lib.dll" # ModuleSuffix03.fsx - [] + [] let ``ModuleSuffix03_fsx`` compilation = let lib = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "ModuleSuffix03Lib.fsx")) @@ -171,94 +187,107 @@ module ModuleDefinitions = |> asLibrary compilation + |> getCompilation |> withReferences [lib] |> verifyCompileAndRun |> shouldSucceed // SOURCE=ModuleSuffix04.fsx # ModuleSuffix04.fsx - [] + [] let ``ModuleSuffix04_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=ModuleWithExpression01.fs COMPILE_ONLY=1 SCFLAGS="--test:ErrorRanges" # ModuleWithExpression01.fs - [] + [] let ``ModuleWithExpression01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=ModuleWithExpression02.fs COMPILE_ONLY=1 SCFLAGS="--test:ErrorRanges" # ModuleWithExpression02.fs - [] + [] let ``ModuleWithExpression02_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed // SOURCE=Production_ExceptionDefinition.fsx # Production_ExceptionDefinition.fsx - [] + [] let ``Production_ExceptionDefinition_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Production_ImportDeclaration.fsx # Production_ImportDeclaration.fsx - [] + [] let ``Production_ImportDeclaration_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Production_LetBindings_Binding.fsx # Production_LetBindings_Binding.fsx - [] + [] let ``Production_LetBindings_Binding_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Production_LetBindings_SideEff.fsx # Production_LetBindings_SideEff.fsx - [] + [] let ``Production_LetBindings_SideEff_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Production_ModuleAbbreviation.fsx # Production_ModuleAbbreviation.fsx - [] + [] let ``Production_ModuleAbbreviation_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Production_ModuleDefinition.fsx # Production_ModuleDefinition.fsx - [] + [] let ``Production_ModuleDefinition_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=Production_OCamlCompat.fsx # Production_OCamlCompat.fsx - [] + [] let ``Production_OCamlCompat_fsx`` compilation = compilation + |> getCompilation |> withOcamlCompat |> withLangVersion50 |> verifyCompileAndRun |> shouldSucceed // SOURCE=Production_TypeDefinitions.fsx # Production_TypeDefinitions.fsx - [] + [] let ``Production_TypeDefinitions_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=W_ModuleAbbreviationWithNamespace01.fs COMPILE_ONLY=1 SCFLAGS="--test:ErrorRanges" # W_ModuleAbbreviationWithNamespace01.fs - [] + [] let ``W_ModuleAbbreviationWithNamespace01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -266,9 +295,10 @@ module ModuleDefinitions = ] // SOURCE=W_Production_OCamlCompat.fsx SCFLAGS="--test:ErrorRanges" # W_Production_OCamlCompat.fsx - [] + [] let ``W_Production_OCamlCompat_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -286,7 +316,7 @@ module ModuleDefinitions = // SOURCE=LibFoo1.fs SCFLAGS="-a" // SOURCE=LibFOo2.fs SCFLAGS="-a" // SOURCE=SameTypeInTwoReferences01.fs SCFLAGS="-r:LibFoo1.dll -r:LibFoo2.dll" # SameTypeInTwoReferences01.fs - [] + [] let ``SameTypeInTwoReferences01_fs`` compilation = let libFoo1 = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "LibFoo1.fs")) @@ -298,12 +328,13 @@ module ModuleDefinitions = |> asLibrary compilation + |> getCompilation |> withReferences [libFoo1; libFoo2] |> verifyCompileAndRun |> shouldSucceed // SOURCE=SameTypeInTwoReferences02.fs SCFLAGS="-r:LibFoo2.dll -r:LibFoo1.dll" # SameTypeInTwoReferences02.fs - [] + [] let ``SameTypeInTwoReferences02_fs`` compilation = let libFoo1 = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "LibFoo1.fs")) @@ -316,6 +347,7 @@ module ModuleDefinitions = |> asLibrary compilation + |> getCompilation |> withReferences [libFoo2; libFoo1] |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/NamespaceDeclGroups/NamespaceDeclGroups.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/NamespaceDeclGroups/NamespaceDeclGroups.fs index 994aa9f1b79..8d802716ac9 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/NamespaceDeclGroups/NamespaceDeclGroups.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/NamespaceDeclGroups/NamespaceDeclGroups.fs @@ -22,9 +22,10 @@ module NamespaceDeclGroups = |> compileAndRun // SOURCE="E_BeginWithNamespace01a.fs E_BeginWithNamespace01b.fs" SCFLAGS="--test:ErrorRanges --vserrors" # E_BeginWithNamespace01 - [] + [] let ``E_BeginWithNamespace01a_fs`` compilation = compilation + |> getCompilation |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "E_BeginWithNamespace01b.fs")) |> verifyCompile |> shouldFail @@ -33,14 +34,15 @@ module NamespaceDeclGroups = ] // SOURCE=NoWarnOnJustNamespace.fs SCFLAGS="--warnaserror:58" # NoWarnOnJustNamespace.fs - [] + [] let ``NoWarnOnJustNamespace_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // SOURCE=TypeInGlobalNamespace01.fs SCFLAGS="-r:FooGlobal.dll" PRECMD="\$FSC_PIPE -a FooGlobal.fs" # TypeInGlobalNamespace01.fs - [] + [] let ``TypeInGlobalNamespace01_fs`` compilation = let libFoo = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "FooGlobal.fs")) @@ -48,12 +50,13 @@ module NamespaceDeclGroups = |> asLibrary compilation + |> getCompilation |> withReferences [libFoo] |> verifyCompileAndRun |> shouldSucceed // SOURCE=TypeInGlobalNamespace02.fs SCFLAGS="-r:FooGlobal.dll" PRECMD="\$FSC_PIPE -a FooGlobal.fs" # TypeInGlobalNamespace02.fs - [] + [] let ``TypeInGlobalNamespace02_fs`` compilation = let libFoo = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "FooGlobal.fs")) @@ -61,6 +64,7 @@ module NamespaceDeclGroups = |> asLibrary compilation + |> getCompilation |> withReferences [libFoo] |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/NullRepresentations/NullRepresentations.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/NullRepresentations/NullRepresentations.fs index 3f28000ed64..8e9d1295632 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/NullRepresentations/NullRepresentations.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/NullRepresentations/NullRepresentations.fs @@ -22,9 +22,10 @@ module NullRepresentations = |> compileAndRun // SOURCE=E_NullInvalidForFSTypes01.fs # E_NullInvalidForFSTypes01.fs - [] + [] let ``E_NullInvalidForFSTypes01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/OperatorNames/OperatorNames.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/OperatorNames/OperatorNames.fs index 89b5d4c4ad0..8c5f93c042f 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/OperatorNames/OperatorNames.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/OperatorNames/OperatorNames.fs @@ -9,54 +9,60 @@ open FSharp.Test.Compiler module OperatorNames = // NoMT SOURCE=Atat.fsx FSIMODE=FEED COMPILE_ONLY=1 # Atat - fsi - [] + [] let``Atat_fsx_fsi`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnaserror+"; "--nowarn:988"] |> runFsi |> shouldSucceed // SOURCE=Atat.fsx # Atat - fsc - [] + [] let``Atat_fsx-fsc`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=AstrSymbOper01.fs # AstrSymbOper01.fs - [] + [] let``AstrSymbOper01_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=BasicOperatorNames.fs # BasicOperatorNames.fs - [] + [] let``BasicOperatorNames_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=EqualOperatorsOverloading.fs # EqualOperatorsOverloading.fs - [] + [] let``EqualOperatorsOverloading_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=E_BasicOperatorNames01.fs SCFLAGS="--test:ErrorRanges" # E_BasicOperatorNames01.fs - [] + [] let``E_BasicOperatorNames01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -66,9 +72,10 @@ module OperatorNames = ] // SOURCE=RefAssignment01.fs # RefAssignment01.fs - [] + [] let``RefAssignment01_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:3370"] |> asExe |> withOptions ["--warnaserror+"; "--nowarn:3370"; "--nowarn:988"] diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/PrecedenceAndOperators/PrecedenceAndOperators.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/PrecedenceAndOperators/PrecedenceAndOperators.fs index b6f0d7982ae..a067544a4ae 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/PrecedenceAndOperators/PrecedenceAndOperators.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/PrecedenceAndOperators/PrecedenceAndOperators.fs @@ -10,36 +10,40 @@ module PrecedenceAndOperators = // SOURCE=checkedOperatorsNoOverflow.fs # checkedOperatorsNoOverflow.fs - [] + [] let ``checkedOperatorsNoOverflow_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=checkedOperatorsOverflow.fs # checkedOperatorsOverflow.fs - [] + [] let ``checkedOperatorsOverflow_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=DotNotationAfterGenericMethod01.fs # DotNotationAfterGenericMethod01.fs - [] + [] let ``DotNotationAfterGenericMethod01_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=E_ExclamationMark01.fs SCFLAGS="--test:ErrorRanges -a" # E_ExclamationMark01.fs - [] + [] let ``E_ExclamationMark01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -49,9 +53,10 @@ module PrecedenceAndOperators = ] // SOURCE=E_Negation01.fs SCFLAGS="--test:ErrorRanges -a" # E_Negation01.fs - [] + [] let ``E_Negation01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -63,9 +68,10 @@ module PrecedenceAndOperators = ] // SOURCE=E_QuestionMark01.fs SCFLAGS="--test:ErrorRanges -a" # E_QuestionMark01.fs - [] + [] let ``E_QuestionMark01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -77,9 +83,10 @@ module PrecedenceAndOperators = ] // SOURCE=E_QuestionMark02.fs SCFLAGS="--test:ErrorRanges -a" # E_QuestionMark02.fs - [] + [] let ``E_QuestionMark02_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -90,9 +97,10 @@ module PrecedenceAndOperators = ] // SOURCE=E_Tilde01.fs SCFLAGS="--test:ErrorRanges -a" # E_Tilde01.fs - [] + [] let ``E_Tilde01_01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -104,9 +112,10 @@ module PrecedenceAndOperators = ] // SOURCE=E_Tilde02.fs SCFLAGS="--test:ErrorRanges -a" # E_Tilde02.fs - [] + [] let ``E_Tilde02_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -118,9 +127,10 @@ module PrecedenceAndOperators = ] // SOURCE=ExclamationMark02.fs # ExclamationMark02.fs - [] + [] let ``ExclamationMark02_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--nowarn:44"] |> typecheck @@ -128,18 +138,20 @@ module PrecedenceAndOperators = |> ignore // SOURCE=Negation01.fs # Negation01.fs - [] + [] let ``Negation01_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=VerticalbarOptionalinDU.fs # VerticalbarOptionalinDU.fs - [] + [] let ``VerticalbarOptionalinDU_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/StaticLet/StaticLetInUnionsAndRecords.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/StaticLet/StaticLetInUnionsAndRecords.fs index 17c7c03c808..1cacb97c93f 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/StaticLet/StaticLetInUnionsAndRecords.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/StaticLet/StaticLetInUnionsAndRecords.fs @@ -73,9 +73,10 @@ let verifyCompileAndRun compilation = |> compileAndRun -[] +[] let ``Static let - union showcase`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains """init U 1 @@ -85,9 +86,10 @@ Case2 1 Case2 2""" -[] +[] let ``Static let - record showcase`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains """init R 1 @@ -95,101 +97,114 @@ init R 2 1 2""" -[] +[] let ``Static let - lowercase DU`` compilation = compilation + |> getCompilation |> withLangVersion80 |> typecheck |> shouldSucceed -[] +[] let ``Static let in empty type`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains """init 5 3""" -[] +[] let ``Static let in empty generic type`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains """Accessing name for Int32 Accessing name for String Accessing name for Byte""" -[] +[] let ``Static member val in empty type`` compilation = compilation + |> getCompilation |> withLangVersion80 |> typecheck |> shouldSucceed -[] +[] let ``Static member val in empty type Fsharp 7`` compilation = compilation + |> getCompilation |> withLangVersion70 |> typecheck |> shouldFail |> withDiagnostics [Error 902, Line 4, Col 5, Line 4, Col 41, "For F#7 and lower, static 'let','do' and 'member val' definitions may only be used in types with a primary constructor ('type X(args) = ...'). To enable them in all other types, use language version '8' or higher."] -[] +[] let ``Static let in simple union`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains "A 42" -[] +[] let ``Support in plain enums - typecheck should fail`` compilation = compilation + |> getCompilation |> withLangVersion80 |> typecheck |> shouldFail |> withDiagnosticMessage "Enumerations cannot have members" -[] +[] let ``Static active pattern in union`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains """B 999""" -[] +[] let ``Static let in struct union`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains "A 42" -[] +[] let ``Static let in simple record`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains "7" -[] +[] let ``Static let in struct record`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains "7" -[] +[] let ``Static let creating DU cases`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains "..." -[] +[] let ``Static let union - order of execution`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains """init type U @@ -200,9 +215,10 @@ calling print Case2 42 side effect in member Singleton calling print Case2 42""" -[] +[] let ``Static let record - order of execution`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains """init R 1 @@ -214,9 +230,10 @@ side effect in member R1 calling print 1""" -[] +[] let ``Static let - recursive DU definitions calling each other`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains """DuA init @@ -228,9 +245,10 @@ DuC allVals access total = 999 uniq = 2""" -[] +[] let ``Static let - recursive record definitions calling each other`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains """Chicken init @@ -239,32 +257,36 @@ Egg init Omelette init 1""" -[] +[] let ``Static let - quotations support for unions`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains """Let (s, Value ("A"), Call (None, ofString, [s]))""" -[] +[] let ``Static let extension to builtin type`` compilation = compilation + |> getCompilation |> typecheck |> shouldFail |> withDiagnostics [Error 3573, Line 4, Col 5, Line 4, Col 51, "Static bindings cannot be added to extrinsic augmentations. Consider using a 'static member' instead."] -[] +[] let ``Static let - quotations support for records`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains "Let (v1, Value (42), Lambda (r, Call (None, createRecord, [v1, r])))" -[] +[] let ``Static let union - executes per generic struct typar`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains """Creating cached val for Int32 * Int32 @@ -275,9 +297,10 @@ Creating cached val for String * String sizeof MyUnion = 24""" -[] +[] let ``Static let record - executes per generic typar`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed |> withStdOutContains """Creating cached val for Int32 @@ -289,9 +312,10 @@ Creating cached val for DateTime Creating cached val for Uri 2x sizeof = 16""" -[] +[] let ``Static let record - generics - IL test`` compilation = compilation + |> getCompilation |> withLangVersion80 |> compile |> verifyIL [""" .method private specialname rtspecialname static diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/TypeAbbreviations/TypeAbbreviations.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/TypeAbbreviations/TypeAbbreviations.fs index 365f1af46b7..8ff633d999d 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/TypeAbbreviations/TypeAbbreviations.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/TypeAbbreviations/TypeAbbreviations.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. namespace Conformance.BasicGrammarElements @@ -22,23 +22,26 @@ module TypeAbbreviations = |> compileAndRun //SOURCE=AbbreviatedTypeSameAsValueId.fsx # AbbreviatedTypeSameAsValueId.fsx - [] + [] let ``AbbreviatedTypeSameAsValueId_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=Constraints_SampleFromSpec01.fsx # Constraints_SampleFromSpec01.fsx - [] + [] let ``Constraints_SampleFromSpec01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldSucceed //SOURCE=E_AbbreviatedTypeAlreadyUsed01.fsx SCFLAGS="--test:ErrorRanges" # E_AbbreviatedTypeAlreadyUsed01.fsx - [] + [] let ``E_AbbreviatedTypeAlreadyUsed01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -47,9 +50,10 @@ module TypeAbbreviations = ] //SOURCE=E_AbbreviatedTypeDoesNotExist01.fsx SCFLAGS="--test:ErrorRanges" # E_AbbreviatedTypeDoesNotExist01.fsx - [] + [] let ``E_AbbreviatedTypeDoesNotExist01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -57,9 +61,10 @@ module TypeAbbreviations = ] //SOURCE=E_InfiniteAbbreviation01.fs SCFLAGS="--test:ErrorRanges --flaterrors" # E_InfiniteAbbreviation01.fs - [] + [] let ``E_InfiniteAbbreviation01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -68,9 +73,10 @@ module TypeAbbreviations = ] //SOURCE=E_InfiniteAbbreviation02.fs # E_InfiniteAbbreviation02.fs - [] + [] let ``E_InfiniteAbbreviation02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -78,9 +84,10 @@ module TypeAbbreviations = ] //SOURCE=E_Constraints_SampleFromSpec02.fsx SCFLAGS="--test:ErrorRanges" # E_Constraints_SampleFromSpec02.fsx - [] + [] let ``E_Constraints_SampleFromSpec02_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -89,9 +96,10 @@ module TypeAbbreviations = ] //SOURCE=E_DroppedTypeVariable01.fsx SCFLAGS="--test:ErrorRanges -a" # E_DroppedTypeVariable01.fsx - [] + [] let ``E_DroppedTypeVariable01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -99,9 +107,10 @@ module TypeAbbreviations = ] //SOURCE=E_FlexibleType01.fsx SCFLAGS="--test:ErrorRanges" # E_FlexibleType01.fsx - [] + [] let ``E_FlexibleType01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -109,9 +118,10 @@ module TypeAbbreviations = ] //SOURCE="E_FlexibleTypeInSignature01.fsi E_FlexibleTypeInSignature01.fsx" SCFLAGS="--test:ErrorRanges" # E_FlexibleTypeInSignature01.fsx - [] + [] let ``E_FlexibleTypeInSignature01_fsi`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -121,9 +131,10 @@ module TypeAbbreviations = ] //SOURCE=E_IncorrectRightSide_Hash.fsx SCFLAGS="--test:ErrorRanges" # E_IncorrectRightSide_Hash.fsx - [] + [] let ``E_IncorrectRightSide_Hash_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -131,9 +142,10 @@ module TypeAbbreviations = ] //SOURCE=E_IncorrectRightSide_Keyword.fsx SCFLAGS="--test:ErrorRanges" # E_IncorrectRightSide_Keyword.fsx - [] + [] let ``E_IncorrectRightSide_Keyword_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -141,9 +153,10 @@ module TypeAbbreviations = ] //SOURCE=E_IncorrectRightSide_Quotation.fsx SCFLAGS="--test:ErrorRanges" # E_IncorrectRightSide_Quotation.fsx - [] + [] let ``E_IncorrectRightSide_Quotation_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -151,9 +164,10 @@ module TypeAbbreviations = ] //SOURCE=E_InheritTypeAbbrev.fs # E_InheritTypeAbbrev.fs - [] + [] let ``E_InheritTypeAbbrev_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -161,9 +175,10 @@ module TypeAbbreviations = ] //SOURCE=E_PrivateTypeAbbreviation02.fs SCFLAGS="--test:ErrorRanges" # E_PrivateTypeAbbreviation02.fs - [] + [] let ``E_PrivateTypeAbbreviation02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -171,9 +186,10 @@ module TypeAbbreviations = ] //SOURCE=E_Recursive01.fsx SCFLAGS="--test:ErrorRanges" # E_Recursive01.fsx - [] + [] let ``E_Recursive01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -181,9 +197,10 @@ module TypeAbbreviations = ] //SOURCE=E_Recursive02.fsx SCFLAGS="--test:ErrorRanges" # E_Recursive02.fsx - [] + [] let ``E_Recursive02_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -191,9 +208,10 @@ module TypeAbbreviations = ] //SOURCE=E_Recursive03.fsx SCFLAGS="--test:ErrorRanges" # E_Recursive03.fsx - [] + [] let ``E_Recursive03_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -201,9 +219,10 @@ module TypeAbbreviations = ] //SOURCE=E_UnexpectedCharInTypeName01.fs SCFLAGS="--test:ErrorRanges" # E_UnexpectedCharInTypeName01.fs - [] + [] let ``E_UnexpectedCharInTypeName01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -211,36 +230,41 @@ module TypeAbbreviations = ] //SOURCE=Identity01.fsx # Identity01.fsx - [] + [] let ``Identity01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=PrivateTypeAbbreviation01.fs # PrivateTypeAbbreviation01.fs - [] + [] let ``PrivateTypeAbbreviation01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=ReorderingTypeVariables01.fsx SCFLAGS="--test:ErrorRanges --warnaserror+ -a" # ReorderingTypeVariables01.fsx - [] + [] let ``ReorderingTypeVariables01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=TypeNestedInModules01.fsx # TypeNestedInModules01.fsx - [] + [] let ``TypeNestedInModules01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=TypeAbbreviationAfterForwardRef.fs # TypeAbbreviationAfterForwardRef.fs - [] + [] let ``TypeAbbreviationAfterForwardRef_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindings.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindings.fs index 8196a9fe286..c009be83280 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindings.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindings.fs @@ -8,18 +8,20 @@ open FSharp.Test.Compiler module UseBindings = - [] + [] let ``UseBindings - UseBindingDiscard01_fs - Current LangVersion`` compilation = compilation + |> getCompilation |> asFsx |> withLangVersion60 |> compile |> shouldSucceed |> ignore - [] + [] let ``UseBindings - UseBindingDiscard01_fs - Bad LangVersion`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--langversion:5.0"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ValueRestriction/ValueRestriction.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ValueRestriction/ValueRestriction.fs index cfce73a0198..e53ef6b583a 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ValueRestriction/ValueRestriction.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/ValueRestriction/ValueRestriction.fs @@ -10,9 +10,10 @@ module ValueRestriction = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ValueRestriction) // - [] + [] let ``TypeArgs01_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["-a"; "--test:ErrorRanges"; "--warnaserror+"] |> compile @@ -21,9 +22,10 @@ module ValueRestriction = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ValueRestriction) // - [] + [] let ``MemberOrFunction01_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["-a"; "--test:ErrorRanges"; "--warnaserror+"] |> compile @@ -32,9 +34,10 @@ module ValueRestriction = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ValueRestriction) // - [] + [] let ``MemberOrFunction01Gen_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["-a"; "--test:ErrorRanges"; "--warnaserror+"] |> compile @@ -43,9 +46,10 @@ module ValueRestriction = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ValueRestriction) // - [] + [] let ``MemberOrFunction02_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["-a"; "--test:ErrorRanges"; "--warnaserror+"] |> compile @@ -54,9 +58,10 @@ module ValueRestriction = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ValueRestriction) // - [] + [] let ``MemberOrFunction02Gen_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["-a"; "--test:ErrorRanges"; "--warnaserror+"] |> compile @@ -65,9 +70,10 @@ module ValueRestriction = // This test was automatically generated (moved from FSharpQA suite - Conformance/ClassTypes/ValueRestriction) // - [] + [] let ``TypeFunction01_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["-a"; "--test:ErrorRanges"; "--warnaserror+"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/BasicApplication.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/BasicApplication.fs index 21505f43355..0b6ac8b6347 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/BasicApplication.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ApplicationExpressions/BasicApplication/BasicApplication.fs @@ -10,9 +10,10 @@ module BasicApplication = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ApplicationExpressions/BasicApplication) //Unexpected identifier in expression$ - [] + [] let ``E_PostfixType01_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -23,9 +24,10 @@ module BasicApplication = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ApplicationExpressions/BasicApplication) //Unexpected identifier in member definition$ - [] + [] let ``E_PostfixType03_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -37,9 +39,10 @@ module BasicApplication = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ApplicationExpressions/BasicApplication) // - [] + [] let ``PostfixType02_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/BindingExpressions/BindingExpressions.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/BindingExpressions/BindingExpressions.fs index cf2f4a833cc..f3f3d9d9d34 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/BindingExpressions/BindingExpressions.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/BindingExpressions/BindingExpressions.fs @@ -22,9 +22,10 @@ module BindingExpressions = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ApplicationExpressions/BasicApplication) // SOURCE=AmbigLetBinding.fs # AmbigLetBinding - [] + [] let ``AmbigLetBinding_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -33,9 +34,10 @@ module BindingExpressions = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ApplicationExpressions/BasicApplication) // NoMT SOURCE=in01.fs SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in01.fs - [] + [] let ``in01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -44,9 +46,10 @@ module BindingExpressions = ] // NoMT SOURCE=in01.fsx FSIMODE=PIPE SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in01.fsx - [] + [] let ``in01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -54,9 +57,10 @@ module BindingExpressions = ] // NoMT SOURCE=in02.fs SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in02.fs - [] + [] let ``in02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -64,16 +68,18 @@ module BindingExpressions = ] // NoMT SOURCE=in02.fsx FSIMODE=PIPE SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in02.fsx - [] + [] let ``in02_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldSucceed // NoMT SOURCE=in03.fs SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in03.fs - [] + [] let ``in03_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -81,16 +87,18 @@ module BindingExpressions = ] // NoMT SOURCE=in03.fsx FSIMODE=PIPE SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in03.fsx - [] + [] let ``in03_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldSucceed // NoMT SOURCE=in04.fs SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in04.fs - [] + [] let ``in04_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -98,16 +106,18 @@ module BindingExpressions = ] // NoMT SOURCE=in04.fsx FSIMODE=PIPE SCFLAGS="--warnaserror+ --test:ErrorRanges" COMPILE_ONLY=1 # in04.fsx - [] + [] let ``in04_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldSucceed // NoMT SOURCE=in05.fs SCFLAGS="--warnaserror+ --test:ErrorRanges --flaterrors" COMPILE_ONLY=1 # in05.fs - [] + [] let ``in05_fs`` compilation = compilation + |> getCompilation |> verifyCompileAsExe |> shouldFail |> withDiagnostics [ @@ -116,9 +126,10 @@ module BindingExpressions = ] // NoMT SOURCE=in05.fsx FSIMODE=PIPE SCFLAGS="--warnaserror+ --test:ErrorRanges --flaterrors" COMPILE_ONLY=1 # in05.fsx - [] + [] let ``in05_fsx`` compilation = compilation + |> getCompilation |> withOptions ["--test:ErrorRanges"] |> compile |> shouldFail @@ -127,27 +138,30 @@ module BindingExpressions = ] // SOURCE=MutableLocals01.fs SCFLAGS="--warnon:3180 --optimize+ --test:ErrorRanges" - [] + [] let ``MutableLocals01_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:3370"; "--test:ErrorRanges"] |> compileAndRun |> shouldSucceed // SOURCE=W_TypeInferforGenericType.fs SCFLAGS="--test:ErrorRanges" # W_TypeInferforGenericType.fs - [] + [] let ``W_TypeInferforGenericType_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ (Warning 64, Line 10, Col 32, Line 10, Col 33, "This construct causes code to be less generic than indicated by the type annotations. The type variable 'b has been constrained to be type ''a'.") ] - [] + [] let ``UpperBindingPattern_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -176,9 +190,10 @@ module BindingExpressions = (Warning 49, Line 122, Col 12, Line 122, Col 15, "Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name.") ] - [] + [] let ``UpperBindingPattern_fs preview`` compilation = compilation + |> getCompilation |> asExe |> withLangVersionPreview |> withOptions ["--test:ErrorRanges"] diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/PatternMatching.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/PatternMatching.fs index 9f8b10bc05b..2f88587276e 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/PatternMatching.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/PatternMatching/PatternMatching.fs @@ -10,9 +10,10 @@ module PatternMatching = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ControlFlowExpressions/PatternMatching) - [] + [] let ``W_PatternMatchingCounterExample01_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -23,9 +24,10 @@ module PatternMatching = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ControlFlowExpressions/PatternMatching) - [] + [] let ``W_PatternMatchingCounterExample02_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -36,9 +38,10 @@ module PatternMatching = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ControlFlowExpressions/PatternMatching) - [] + [] let ``W_PatternMatchingCounterExample03_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/SequenceIteration.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/SequenceIteration.fs index 478fcaebf2b..322ea5be52b 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/SequenceIteration.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/SequenceIteration/SequenceIteration.fs @@ -10,9 +10,10 @@ module SequenceIteration = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/ControlFlowExpressions/SequenceIteration) - [] + [] let ``W_IncompleteMatchFor01_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/Type-relatedExpressions.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/Type-relatedExpressions.fs index 40199c38d3a..b0e0d389b2f 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/Type-relatedExpressions.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ControlFlowExpressions/Type-relatedExpressions/Type-relatedExpressions.fs @@ -9,9 +9,10 @@ open FSharp.Test.Compiler module TyperelatedExpressions = // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/Type-relatedExpressions) - [] + [] let ``E_rigidtypeannotation02_fs`` compilation = compilation + |> getCompilation |> asFsx |> typecheck |> shouldFail @@ -22,9 +23,10 @@ module TyperelatedExpressions = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/Type-relatedExpressions) - [] + [] let ``E_rigidtypeannotation02b_fs`` compilation = compilation + |> getCompilation |> asFsx |> typecheck |> shouldFail @@ -34,17 +36,19 @@ module TyperelatedExpressions = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/Type-relatedExpressions) - [] + [] let ``rigidtypeannotation01_fs`` compilation = compilation + |> getCompilation |> asFsx |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/Type-relatedExpressions) - [] + [] let ``staticcoercion01_fs`` compilation = compilation + |> getCompilation |> asFsx |> typecheck |> shouldFail @@ -56,9 +60,10 @@ module TyperelatedExpressions = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/Expressions/Type-relatedExpressions) - [] + [] let ``staticcoercion01b_fs`` compilation = compilation + |> getCompilation |> asFsx |> typecheck |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Diags/Attributes_Diags.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Diags/Attributes_Diags.fs index 47e9d048841..644d6bdd757 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Diags/Attributes_Diags.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Diags/Attributes_Diags.fs @@ -10,9 +10,10 @@ open FSharp.Test.Compiler module Attributes_Diags = // SOURCE=E_AdjustUses01a.fs SCFLAGS=--test:ErrorRanges # E_AdjustUses01a.fs - [] + [] let``E_AdjustUses01a_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -21,9 +22,10 @@ module Attributes_Diags = ] // SOURCE=E_AdjustUses01b.fs SCFLAGS=--test:ErrorRanges # E_AdjustUses01b.fs - [] + [] let``E_AdjustUses01b_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Legacy/Attributes_Legacy.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Legacy/Attributes_Legacy.fs index 9f45c66a2ca..8af1481ceda 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Legacy/Attributes_Legacy.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/Legacy/Attributes_Legacy.fs @@ -10,9 +10,10 @@ open FSharp.Test.Compiler module AttributesLegacy = // SOURCE=Test01.fs SCFLAGS="--test:ErrorRanges" # Test01.fs - [] + [] let``Test01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -23,9 +24,10 @@ module AttributesLegacy = ] // SOURCE=Test02.fs SCFLAGS="--test:ErrorRanges" # Test02.fs - [] + [] let``Test02_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -36,9 +38,10 @@ module AttributesLegacy = ] // SOURCE=Test03.fs SCFLAGS="--test:ErrorRanges" # Test03.fs - [] + [] let``Test03_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -48,9 +51,10 @@ module AttributesLegacy = ] // SOURCE=Test04.fs SCFLAGS="--test:ErrorRanges" # Test04.fs - [] + [] let``Test04_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -61,9 +65,10 @@ module AttributesLegacy = ] // SOURCE=Test05.fs SCFLAGS="--test:ErrorRanges" # Test05.fs - [] + [] let``Test05_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -74,9 +79,10 @@ module AttributesLegacy = ] // SOURCE=Test06.fs SCFLAGS="--test:ErrorRanges" # Test06.fs - [] + [] let``Test06_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -86,9 +92,10 @@ module AttributesLegacy = ] // SOURCE=Test07.fs SCFLAGS="--test:ErrorRanges" # Test07.fs - [] + [] let``Test07_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -98,9 +105,10 @@ module AttributesLegacy = ] // SOURCE=Test08.fs SCFLAGS="--test:ErrorRanges" # Test08.fs - [] + [] let``Test08_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -110,9 +118,10 @@ module AttributesLegacy = ] // SOURCE=Test09.fs SCFLAGS="--test:ErrorRanges" # Test09.fs - [] + [] let``Test09_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -121,9 +130,10 @@ module AttributesLegacy = ] // SOURCE=Test10.fs SCFLAGS="--test:ErrorRanges" # Test10.fs - [] + [] let``Test10_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -134,9 +144,10 @@ module AttributesLegacy = ] // SOURCE=Test11.fs SCFLAGS="--test:ErrorRanges" # Test11.fs - [] + [] let``Test11_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -147,9 +158,10 @@ module AttributesLegacy = ] // SOURCE=Test12.fs SCFLAGS="--test:ErrorRanges" # Test12.fs - [] + [] let``Test12_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -159,9 +171,10 @@ module AttributesLegacy = ] // SOURCE=Test13.fs SCFLAGS="--test:ErrorRanges" # Test13.fs - [] + [] let``Test13_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -172,9 +185,10 @@ module AttributesLegacy = ] // SOURCE=Test14.fs SCFLAGS="--test:ErrorRanges" # Test14.fs - [] + [] let``Test14_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -185,9 +199,10 @@ module AttributesLegacy = ] // SOURCE=Test15.fs SCFLAGS="--test:ErrorRanges" # Test15.fs - [] + [] let``Test15_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -197,9 +212,10 @@ module AttributesLegacy = ] // SOURCE=Test16.fs SCFLAGS="--test:ErrorRanges" # Test16.fs - [] + [] let``Test16_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -209,9 +225,10 @@ module AttributesLegacy = ] // SOURCE=Test17.fs SCFLAGS="--test:ErrorRanges" # Test17.fs - [] + [] let``Test17_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -221,9 +238,10 @@ module AttributesLegacy = ] // SOURCE=Test18.fs SCFLAGS="--test:ErrorRanges" # Test18.fs - [] + [] let``Test18_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -232,9 +250,10 @@ module AttributesLegacy = ] // SOURCE=Test19.fs SCFLAGS="--test:ErrorRanges" # Test19.fs - [] + [] let``Test19_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -244,9 +263,10 @@ module AttributesLegacy = ] // SOURCE=Test20.fs SCFLAGS="--test:ErrorRanges" # Test20.fs - [] + [] let``Test20_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -256,9 +276,10 @@ module AttributesLegacy = ] // SOURCE=Test21.fs SCFLAGS="--test:ErrorRanges" # Test21.fs - [] + [] let``Test21_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -267,9 +288,10 @@ module AttributesLegacy = ] // SOURCE=Test22.fs SCFLAGS="--test:ErrorRanges" # Test22.fs - [] + [] let``Test22_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -279,9 +301,10 @@ module AttributesLegacy = ] // SOURCE=Test23.fs SCFLAGS="--test:ErrorRanges" # Test23.fs - [] + [] let``Test23_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -291,9 +314,10 @@ module AttributesLegacy = ] // SOURCE=Test24.fs SCFLAGS="--test:ErrorRanges" # Test24.fs - [] + [] let``Test24_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -302,9 +326,10 @@ module AttributesLegacy = ] // SOURCE=Test25.fs SCFLAGS="--test:ErrorRanges" # Test25.fs - [] + [] let``Test25_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -313,9 +338,10 @@ module AttributesLegacy = ] // SOURCE=Test26.fs SCFLAGS="--test:ErrorRanges" # Test26.fs - [] + [] let``Test26_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -324,18 +350,20 @@ module AttributesLegacy = ] // SOURCE=Test27.fs SCFLAGS="--test:ErrorRanges" # Test27.fs - [] + [] let``Test27_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--test:ErrorRanges"; "--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=Test28.fs SCFLAGS="--test:ErrorRanges" # Test28.fs - [] + [] let``Test28_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/New/Attributes_New.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/New/Attributes_New.fs index 8797695481d..c0941454ee2 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/New/Attributes_New.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Attributes/New/Attributes_New.fs @@ -10,9 +10,10 @@ open FSharp.Test.Compiler module AttributesNew = // SOURCE=Test01.fs SCFLAGS="--test:ErrorRanges" # Test01.fs - [] + [] let``Test01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -21,9 +22,10 @@ module AttributesNew = ] // SOURCE=Test02.fs SCFLAGS="--test:ErrorRanges" # Test02.fs - [] + [] let``Test02_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -34,9 +36,10 @@ module AttributesNew = ] // SOURCE=Test03.fs SCFLAGS="--test:ErrorRanges" # Test03.fs - [] + [] let``Test03_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -45,9 +48,10 @@ module AttributesNew = ] // SOURCE=Test04.fs SCFLAGS="--test:ErrorRanges" # Test04.fs - [] + [] let``Test04_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -57,9 +61,10 @@ module AttributesNew = ] // SOURCE=Test05.fs SCFLAGS="--test:ErrorRanges" # Test05.fs - [] + [] let``Test05_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -70,9 +75,10 @@ module AttributesNew = ] // SOURCE=Test06.fs SCFLAGS="--test:ErrorRanges" # Test06.fs - [] + [] let``Test06_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -82,9 +88,10 @@ module AttributesNew = ] // SOURCE=Test07.fs SCFLAGS="--test:ErrorRanges" # Test07.fs - [] + [] let``Test07_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -93,9 +100,10 @@ module AttributesNew = ] // SOURCE=Test08.fs SCFLAGS="--test:ErrorRanges" # Test08.fs - [] + [] let``Test08_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -105,17 +113,19 @@ module AttributesNew = ] // SOURCE=Test09.fs SCFLAGS="--test:ErrorRanges" # Test09.fs - [] + [] let``Test09_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Test10.fs SCFLAGS="--test:ErrorRanges" # Test10.fs - [] + [] let``Test10_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -124,9 +134,10 @@ module AttributesNew = ] // SOURCE=Test11.fs SCFLAGS="--test:ErrorRanges" # Test11.fs - [] + [] let``Test11_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -137,9 +148,10 @@ module AttributesNew = ] // SOURCE=Test12.fs SCFLAGS="--test:ErrorRanges" # Test12.fs - [] + [] let``Test12_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -148,9 +160,10 @@ module AttributesNew = ] // SOURCE=Test13.fs SCFLAGS="--test:ErrorRanges" # Test13.fs - [] + [] let``Test13_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -159,9 +172,10 @@ module AttributesNew = ] // SOURCE=Test14.fs SCFLAGS="--test:ErrorRanges" # Test14.fs - [] + [] let``Test14_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -172,9 +186,10 @@ module AttributesNew = ] // SOURCE=Test15.fs SCFLAGS="--test:ErrorRanges" # Test15.fs - [] + [] let``Test15_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -183,9 +198,10 @@ module AttributesNew = ] // SOURCE=Test16.fs SCFLAGS="--test:ErrorRanges" # Test16.fs - [] + [] let``Test16_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -194,9 +210,10 @@ module AttributesNew = ] // SOURCE=Test17.fs SCFLAGS="--test:ErrorRanges" # Test17.fs - [] + [] let``Test17_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -208,25 +225,28 @@ module AttributesNew = ] // SOURCE=Test18.fs SCFLAGS="--test:ErrorRanges" # Test18.fs - [] + [] let``Test18_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Test19.fs SCFLAGS="--test:ErrorRanges" # Test19.fs - [] + [] let``Test19_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Test20.fs SCFLAGS="--test:ErrorRanges" # Test20.fs - [] + [] let``Test20_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -237,9 +257,10 @@ module AttributesNew = ] // SOURCE=Test21.fs SCFLAGS="--test:ErrorRanges" # Test21.fs - [] + [] let``Test21_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -248,9 +269,10 @@ module AttributesNew = ] // SOURCE=Test22.fs SCFLAGS="--test:ErrorRanges" # Test22.fs - [] + [] let``Test22_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -259,9 +281,10 @@ module AttributesNew = ] // SOURCE=Test23.fs SCFLAGS="--test:ErrorRanges" # Test23.fs - [] + [] let``Test23_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -272,9 +295,10 @@ module AttributesNew = ] // SOURCE=Test24.fs SCFLAGS="--test:ErrorRanges" # Test24.fs - [] + [] let``Test24_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -283,9 +307,10 @@ module AttributesNew = ] // SOURCE=Test25.fs SCFLAGS="--test:ErrorRanges" # Test25.fs - [] + [] let``Test25_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -294,9 +319,10 @@ module AttributesNew = ] // SOURCE=Test26.fs SCFLAGS="--test:ErrorRanges" # Test26.fs - [] + [] let``Test26_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -307,18 +333,20 @@ module AttributesNew = ] // SOURCE=Test27.fs SCFLAGS="--test:ErrorRanges" # Test27.fs - [] + [] let``Test27_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--test:ErrorRanges"; "--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=Test28.fs SCFLAGS="--test:ErrorRanges" # Test28.fs - [] + [] let``Test28_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Basic/Basic.fs index c3a239e07f0..03d9d4035ce 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Basic/Basic.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/Basic/Basic.fs @@ -10,25 +10,28 @@ open FSharp.Test.Compiler module Basic = // SOURCE=Arrays.fsx # Arrays.fsx - [] + [] let``Arrays_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Comparison01.fs # Comparison01.fs - [] + [] let``Comparison01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=CustomEquality01.fs # CustomEquality01.fs - [] + [] let``CustomEquality01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -36,9 +39,10 @@ module Basic = (Warning 988, Line 37, Col 1, Line 37, Col 1, "Main module of program is empty: nothing will happen when it is run") ] - [] + [] let``E_CustomEqualityEquals01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -52,9 +56,10 @@ module Basic = ] // SOURCE=E_CustomEqualityGetHashCode01.fs SCFLAGS="--test:ErrorRanges" # E_CustomEqualityGetHashCode01.fs - [] + [] let``E_CustomEqualityGetHashCode01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -71,9 +76,10 @@ module Basic = ] // SOURCE=E_ExceptionsNoComparison.fs SCFLAGS="--test:ErrorRanges" # E_ExceptionsNoComparison.fs - [] + [] let``E_ExceptionsNoComparison_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -84,122 +90,137 @@ module Basic = // SOURCE=EqualOnTuples01.fs # EqualOnTuples01.fs - [] + [] let``EqualOnTuples01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Equality01.fs # Equality01.fs - [] + [] let``Equality01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Exceptions.fsx # Exceptions.fsx - [] + [] let``Exceptions_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Generated_Record.fsx # Generated_Record.fsx - [] + [] let``Generated_Record_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Hashing01.fs # Hashing01.fs - [] + [] let``Hashing01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Lists.fsx # Lists.fsx - [] + [] let``Lists_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=NeverGenerated_Class.fsx # NeverGenerated_Class.fsx - [] + [] let``NeverGenerated_Class_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=NeverGenerated_Delegate.fsx # NeverGenerated_Delegate.fsx - [] + [] let``NeverGenerated_Delegate_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=NeverGenerated_Enum.fsx # NeverGenerated_Enum.fsx - [] + [] let``NeverGenerated_Enum_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=NeverGenerated_Interface.fsx # NeverGenerated_Interface.fsx - [] + [] let``NeverGenerated_Interface_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Options.fsx # Options.fsx - [] + [] let``Options_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Sample_Records.fsx # Sample_Records.fsx - [] + [] let``Sample_Records_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Sample_Tuples.fsx # Sample_Tuples.fsx - [] + [] let``Sample_Tuples_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Structs.fsx # Structs.fsx - [] + [] let``Structs_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=Unions.fsx # Unions.fsx - [] + [] let``Unions_fsx`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/IComparison/IComparison.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/IComparison/IComparison.fs index f35a1720fe3..7ceb03c3881 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/IComparison/IComparison.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/GeneratedEqualityHashingComparison/IComparison/IComparison.fs @@ -9,36 +9,40 @@ open FSharp.Test.Compiler module IComparison = // SOURCE=DU.fs # DU.fs - [] + [] let``DU_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:342"] |> compileAndRun |> shouldSucceed // SOURCE=Record.fs # Record.fs - [] + [] let``Record_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:342"] |> compileAndRun |> shouldSucceed // SOURCE=Struct.fs # Struct.fs - [] + [] let``Struct_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--nowarn:342"] |> compileAndRun |> shouldSucceed // SOURCE=W_ImplIComparable.fs # W_ImplIComparable.fs - [] + [] let``W_ImplIComparable_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/ByrefSafetyAnalysis.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/ByrefSafetyAnalysis.fs index 073111d8504..533369961e0 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/ByrefSafetyAnalysis.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/ByrefSafetyAnalysis/ByrefSafetyAnalysis.fs @@ -30,14 +30,17 @@ module ByrefSafetyAnalysis = |> compileAndRun // SOURCE=Migrated02.fs SCFLAGS="--test:ErrorRanges" # Migrated02.fs - [] + [] let``MigratedTest02_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - + compilation + |> getCompilation + |> verifyCompileAndRun |> shouldSucceed + // SOURCE=E_Migrated02.fs SCFLAGS="--test:ErrorRanges" # E_Migrated02.fs - [] + [] let``E_Migrated02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -108,26 +111,28 @@ module ByrefSafetyAnalysis = ] // SOURCE=Migrated03.fs SCFLAGS="--test:ErrorRanges" # Migrated03.fs - [] + [] let``MigratedTest03_fs`` compilation = let csharpLib = CSharpFromPath (__SOURCE_DIRECTORY__ ++ "MigratedTest03CSharpLib.cs") |> withName "CSharpLib3" compilation + |> getCompilation |> withReferences [ csharpLib ] |> withOptions ["--nowarn:3370"] |> compileExeAndRun |> shouldSucceed // SOURCE=E_Migrated03.fs SCFLAGS="--test:ErrorRanges" # E_Migrated03.fs - [] + [] let``E_Migrated03_fs`` compilation = let csharpLib = CSharpFromPath (__SOURCE_DIRECTORY__ ++ "MigratedTest03CSharpLib.cs") |> withName "CSharpLib3" compilation + |> getCompilation |> asExe |> withReferences [ csharpLib ] |> withNoWarn 52 @@ -149,94 +154,155 @@ The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In'") (Error 3239, Line 46, Col 17, Line 46, Col 25, "Cannot partially apply the extension method 'Test2' because the first parameter is a byref type.") ] - [] + [] let``TryGetValue_fs`` compilation = - compilation |> withPrelude |> compileExeAndRun |> shouldSucceed + compilation + |> getCompilation + |> withPrelude |> compileExeAndRun |> shouldSucceed - [] + [] let``CompareExchange_fs`` compilation = compilation + |> getCompilation |> withPrelude |> withOptions ["--nowarn:3370"] |> compileExeAndRun |> shouldSucceed - [] + [] let``ByRefParam_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun |> shouldSucceed + + [] let``ByRefParam_ExplicitOutAttribute_fs`` compilation = - compilation |> withPrelude |> withOptions ["--nowarn:3370"] |> compileExeAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> withPrelude + |> withOptions ["--nowarn:3370"] |> compileExeAndRun |> shouldSucceed + + [] let``ByRefParam_ExplicitInAttribute_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun |> shouldSucceed + + [] let``ByRefReturn_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``Slot_ByRefReturn_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefReturn_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``Slot_InRefReturn_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``OutRefParam_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``OutRefParam_ExplicitOutAttribute_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``Slot_OutRefParam_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``ByRefParam_OverloadedTest_ExplicitOutAttribute_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``OutRefParam_Overloaded_ExplicitOutAttribute_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``OutRefParam_Overloaded_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefParam_ExplicitInAttribute_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefParam_ExplicitInAttributeDateTime_fs`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefParam`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefParamOverload_ExplicitAddressOfAtCallSite`` compilation = - compilation |> withNoWarn 52 |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> withNoWarn 52 + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefParamOverload_ImplicitAddressOfAtCallSite`` compilation = - compilation |> withNoWarn 52 |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> withNoWarn 52 + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefParamOverload_ImplicitAddressOfAtCallSite2`` compilation = - compilation |> withNoWarn 52 |> verifyCompileAndRun |> shouldSucceed - + compilation + |> getCompilation + |> withNoWarn 52 + |> verifyCompileAndRun + |> shouldSucceed + // TODO: Delete this, move into feature branch, or finish this. See: https://github.com/dotnet/fsharp/pull/7989#discussion_r369841104 #if IMPLICIT_ADDRESS_OF module FeatureImplicitAddressOf = @@ -262,14 +328,20 @@ The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In'") compilation |> verifyCompileAndRun |> shouldSucceed #endif - [] + [] let``InRefParam_Generic_ExplicitAddressOfAttCallSite1`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - - [] + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + + [] let``InRefParam_Generic_ExplicitAddressOfAttCallSite2`` compilation = - compilation |> verifyCompileAndRun |> shouldSucceed - + compilation + |> getCompilation + |> verifyCompileAndRun + |> shouldSucceed + module ByrefReturn = [] let``TestImmediateReturn`` compilation = @@ -492,13 +564,18 @@ The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In'") let``TestStructRecord`` compilation = compilation |> withNoWarn 988 |> withNoWarn 3560 |> verifyCompileAndRun |> shouldSucceed - [] + [] let``NoTailcallToByrefsWithModReq`` compilation = - compilation |> withNoWarn 20 |> verifyCompileAndRun |> shouldSucceed + compilation + |> getCompilation + |> withNoWarn 20 + |> verifyCompileAndRun + |> shouldSucceed - [] + [] let``E_CantTakeAddressOfExpressionReturningReferenceType`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -722,9 +799,10 @@ type outref<'T> with // SOURCE=E_ByrefAsArrayElement.fs SCFLAGS="--test:ErrorRanges" # E_ByrefAsArrayElement.fs - [] + [] let``E_ByrefAsArrayElement_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -736,9 +814,10 @@ type outref<'T> with ] // SOURCE=E_ByrefAsGenericArgument01.fs SCFLAGS="--test:ErrorRanges" # E_ByrefAsGenericArgument01.fs - [] + [] let``E_ByrefAsGenericArgument01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -749,18 +828,20 @@ type outref<'T> with ] // NoMT SOURCE=ByrefInFSI1.fsx FSIMODE=PIPE COMPILE_ONLY=1 # ByrefInFSI1.fsx - [] + [] let``ByrefInFSI1_fsx`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed // SOURCE=E_ByrefUsedInInnerLambda01.fs SCFLAGS="--test:ErrorRanges" # E_ByrefUsedInInnerLambda01.fs - [] + [] let``E_ByrefUsedInInnerLambda01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -769,9 +850,10 @@ type outref<'T> with ] // SOURCE=E_ByrefUsedInInnerLambda02.fs SCFLAGS="--test:ErrorRanges" # E_ByrefUsedInInnerLambda02.fs - [] + [] let``E_ByrefUsedInInnerLambda02_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -780,9 +862,10 @@ type outref<'T> with ] // SOURCE=E_ByrefUsedInInnerLambda03.fs SCFLAGS="--test:ErrorRanges" # E_ByrefUsedInInnerLambda03.fs - [] + [] let``E_ByrefUsedInInnerLambda03_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -791,9 +874,10 @@ type outref<'T> with ] // SOURCE=E_SetFieldToByref01.fs SCFLAGS="--test:ErrorRanges" # E_SetFieldToByref01.fs - [] + [] let``E_SetFieldToByref01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -804,9 +888,10 @@ type outref<'T> with ] // SOURCE=E_SetFieldToByref02.fs SCFLAGS="--test:ErrorRanges" # E_SetFieldToByref02.fs - [] + [] let``E_SetFieldToByref02_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -814,9 +899,10 @@ type outref<'T> with (Error 431, Line 8, Col 9, Line 8, Col 17, "A byref typed value would be stored here. Top-level let-bound byref values are not permitted.") ] // SOURCE=E_SetFieldToByref03.fs SCFLAGS="--test:ErrorRanges" # E_SetFieldToByref03.fs - [] + [] let``E_SetFieldToByref03_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -827,9 +913,10 @@ type outref<'T> with ] // SOURCE=E_SetFieldToByref04.fs SCFLAGS="--test:ErrorRanges" # E_SetFieldToByref04.fs - [] + [] let``E_SetFieldToByref04_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -840,9 +927,10 @@ type outref<'T> with ] // SOURCE=E_SetFieldToByref05.fs SCFLAGS="--test:ErrorRanges" # E_SetFieldToByref05.fs - [] + [] let``E_SetFieldToByref05_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -854,9 +942,10 @@ type outref<'T> with ] // SOURCE=E_FirstClassFuncTakesByref.fs SCFLAGS="--test:ErrorRanges --flaterrors" # E_FirstClassFuncTakesByref.fs - [] + [] let``E_FirstClassFuncTakesByref_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -865,9 +954,10 @@ type outref<'T> with ] // SOURCE=E_StaticallyResolvedByRef01.fs SCFLAGS="--test:ErrorRanges" # E_StaticallyResolvedByRef01.fs - [] + [] let``E_StaticallyResolvedByRef01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -880,9 +970,10 @@ type outref<'T> with ] // SOURCE=UseByrefInLambda01.fs # UseByrefInLambda01.fs - [] + [] let``UseByrefInLambda01_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun @@ -890,17 +981,19 @@ type outref<'T> with #if NET7_0_OR_GREATER // This constructor added in .NET 7: https://learn.microsoft.com/en-us/dotnet/api/system.span-1.-ctor?view=net-7.0#system-span-1-ctor(-0@) - [] + [] let``ReturnFieldSetBySpan_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun |> shouldSucceed - [] + [] let``ReturnSpan01_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--warnaserror+"; "--nowarn:988"] |> compileExeAndRun @@ -908,9 +1001,10 @@ type outref<'T> with #endif #if NETSTANDARD2_1_OR_GREATER - [] + [] let``E_TopLevelByref_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -918,9 +1012,10 @@ type outref<'T> with (Error 431, Line 6, Col 5, Line 6, Col 13, "A byref typed value would be stored here. Top-level let-bound byref values are not permitted.") ] - [] + [] let``E_SpanUsedInInnerLambda01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -928,9 +1023,10 @@ type outref<'T> with (Error 406, Line 8, Col 34, Line 8, Col 45, "The byref-typed variable 'span' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions.") ] - [] + [] let``E_SpanUsedInInnerLambda02_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/RecursiveSafetyAnalysis.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/RecursiveSafetyAnalysis.fs index 52bf8601869..ecc99ef26e7 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/RecursiveSafetyAnalysis.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/InferenceProcedures/RecursiveSafetyAnalysis/RecursiveSafetyAnalysis.fs @@ -15,9 +15,10 @@ module RecursiveSafetyAnalysis = |> compileExeAndRun // SOURCE=E_CyclicReference01.fs SCFLAGS="--mlcompatibility --test:ErrorRanges --flaterrors" # E_CyclicReference01.fs - [] + [] let ``E_CyclicReference01_fs`` compilation = compilation + |> getCompilation |> withOptions ["--mlcompatibility"; "--flaterrors"] |> withLangVersion50 |> asExe @@ -29,9 +30,10 @@ module RecursiveSafetyAnalysis = ] // SOURCE=E_DuplicateRecursiveRecords.fs SCFLAGS="--test:ErrorRanges" # E_DuplicateRecursiveRecords.fs - [] + [] let``E_DuplicateRecursiveRecords_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -39,9 +41,10 @@ module RecursiveSafetyAnalysis = (Error 37, Line 10, Col 5, Line 10, Col 8, "Duplicate definition of type, exception or module 'Foo'") ] - [] + [] let ``E_RecursiveInline_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -53,9 +56,10 @@ module RecursiveSafetyAnalysis = ] // SOURCE=E_TypeDeclaration01.fs SCFLAGS="--langversion:5.0 --test:ErrorRanges" COMPILE_ONLY=1 # E_TypeDeclaration01.fs - [] + [] let ``E_TypeDeclaration01`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -64,9 +68,10 @@ module RecursiveSafetyAnalysis = ] //Type constraint mismatch - [] + [] let ``E_TypeDeclaration02_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -78,9 +83,10 @@ module RecursiveSafetyAnalysis = ] // SOURCE=E_VariationsOnRecursiveStruct.fs SCFLAGS="--test:ErrorRanges" # E_VariationsOnRecursiveStruct.fs - [] + [] let ``E_VariationsOnRecursiveStruct_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail @@ -89,35 +95,39 @@ module RecursiveSafetyAnalysis = (Error 912, Line 6, Col 6, Line 6, Col 8, "This declaration element is not permitted in an augmentation") ] - [] + [] let ``InfiniteRecursiveExplicitConstructor_fs`` compilation = compilation + |> getCompilation |> asFsx |> compile |> shouldSucceed // SOURCE=RecursiveTypeDeclarations01.fs # RecursiveTypeDeclarations01.fs - [] + [] let ``RecursiveTypeDeclarations01_fs`` compilation = compilation + |> getCompilation |> asExe |> ignoreWarnings |> compile |> shouldSucceed // SOURCE=RecursiveValueDeclarations01.fs # RecursiveValueDeclarations01.fs - [] + [] let ``RecursiveValueDeclarations01_fs`` compilation = compilation + |> getCompilation |> asExe |> ignoreWarnings |> compile |> shouldSucceed // SOURCE=RecursiveTypeDeclarations02.fs # RecursiveTypeDeclarations02.fs - [] + [] let ``RecursiveTypeDeclarations02_fs`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:3370"] |> verifyCompileAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight/HashLight.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight/HashLight.fs index 8602b1e5633..a52b3d380c2 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight/HashLight.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HashLight/HashLight.fs @@ -9,9 +9,10 @@ open FSharp.Test.Compiler module HashLight = // This test was automatically generated (moved from FSharpQA suite - Conformance/LexicalFiltering/HashLight) - [] + [] let ``IndentationWithComputationExpression01_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnaserror+"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication/HighPrecedenceApplication.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication/HighPrecedenceApplication.fs index 5665bbcd675..4ec5b1b53d1 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication/HighPrecedenceApplication.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/HighPrecedenceApplication/HighPrecedenceApplication.fs @@ -10,9 +10,10 @@ module HighPrecedenceApplication = // This test was automatically generated (moved from FSharpQA suite - Conformance/LexicalFiltering/HighPrecedenceApplication) // - [] + [] let ``RangeOperator01_fs`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["-a"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/OffsideExceptions.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/OffsideExceptions.fs index dee88a3c5fa..2be0b9897db 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/OffsideExceptions.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/LexicalFiltering/OffsideExceptions/OffsideExceptions.fs @@ -9,23 +9,22 @@ open FSharp.Test.Compiler.Assertions.StructuredResultsAsserts module OffsideExceptions = - type FileAttribute(file) = - inherit DirectoryAttribute(__SOURCE_DIRECTORY__, Includes=[|file|]) - // This test was automatically generated (moved from FSharpQA suite - Conformance/LexicalFiltering/Basic/OffsideExceptions) // - [] + [] let InfixTokenPlusOne compilation = compilation + |> getCompilation |> asFsx |> typecheck |> shouldSucceed |> shouldSucceed |> ignore - [] + [] let RelaxWhitespace2 compilation = compilation + |> getCompilation |> asFsx |> withLangVersion60 |> withOptions ["--nowarn:25"] // Incomplete pattern matches on this expression. @@ -33,9 +32,10 @@ module OffsideExceptions = |> shouldSucceed |> ignore - [] + [] let RelaxWhitespace2_Warning25 compilation = compilation + |> getCompilation |> asFsx |> withLangVersion60 |> verifyBaseline @@ -488,9 +488,10 @@ raise (new Exception("exit 1")) Message = "Unexpected end of input in type definition" } ] |> ignore - [] + [] let RelaxWhitespace2_Fs50 compilation = compilation + |> getCompilation |> asFsx |> withLangVersion50 |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/And/And.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/And/And.fs index 7f46ad02250..b92c1e57c29 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/And/And.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/And/And.fs @@ -8,43 +8,48 @@ open FSharp.Test.Compiler module And = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/And) - [] + [] let ``And - andPattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/And) - [] + [] let ``And - andPattern02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/And) - [] + [] let ``And - andPattern03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - [] + [] let ``And - andPattern04_fs`` compilation = compilation + |> getCompilation |> asFs |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/And) - [] + [] let ``And - E_IdentBoundTwice_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Array/Array.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Array/Array.fs index 5d686020f22..190b12d316d 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Array/Array.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Array/Array.fs @@ -8,36 +8,40 @@ open FSharp.Test.Compiler module Array = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Array) - [] + [] let ``Array - arrayMatch01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Array) - [] + [] let ``Array - arrayMatch02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Array) - [] + [] let ``Array - arrayMatch03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Array) - [] + [] let ``Array - TrailingSemi01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/As/As.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/As/As.fs index 81867fed44a..b4074b0b2cf 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/As/As.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/As/As.fs @@ -8,18 +8,20 @@ open FSharp.Test.Compiler module As = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/As) - [] + [] let ``Simple - asPattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/As) - [] + [] let ``Simple - asPattern02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/ConsList/ConsList.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/ConsList/ConsList.fs index d0f92838187..6292d3b78fa 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/ConsList/ConsList.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/ConsList/ConsList.fs @@ -8,18 +8,20 @@ open FSharp.Test.Compiler module ConsList = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/ConsList) - [] + [] let ``ConsList - consPattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/ConsList) - [] + [] let ``ConsList - E_consOnNonList_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -36,9 +38,10 @@ but here has type ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/ConsList) - [] + [] let ``ConsList - E_consPattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -49,9 +52,10 @@ but here has type ''a list' ") // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/ConsList) - [] + [] let ``ConsList - OutsideMatch01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Decimal/Decimal.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Decimal/Decimal.fs index 1f168db110f..9f51d0f9747 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Decimal/Decimal.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Decimal/Decimal.fs @@ -8,9 +8,10 @@ open FSharp.Test.Compiler module Decimal = - [] + [] let ``Decimal - literal01.fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/DynamicTypeTest/DynamicTypeTest.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/DynamicTypeTest/DynamicTypeTest.fs index 358471ba5e5..79fa9270343 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/DynamicTypeTest/DynamicTypeTest.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/DynamicTypeTest/DynamicTypeTest.fs @@ -8,27 +8,30 @@ open FSharp.Test.Compiler module DynamicTypeTest = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - consPattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - dynamicTypeTest01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - dynamicTypeTest02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -37,49 +40,54 @@ module DynamicTypeTest = (Warning 26, Line 31, Col 7, Line 31, Col 17, "This rule will never be matched") (Warning 26, Line 32, Col 7, Line 32, Col 16, "This rule will never be matched") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - dynamicTypeTest03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - dynamicTypeTest04_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Warning 64, Line 8, Col 7, Line 8, Col 11, "This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near 'dynamicTypeTest04.fs(8,9)-(8,10)' has been constrained to be type 'exn'.") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - dynTestSealedType01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - E_DynamicTestPrimType01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Error 16, Line 11, Col 7, Line 11, Col 15, "The type 'int' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion.") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - E_DynamTyTestVarType01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -89,47 +97,52 @@ module DynamicTypeTest = to obj involves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed.") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - genericType01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - Regression01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - Regression02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - TwoAtOnce01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - W_RedundantPattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -138,20 +151,22 @@ involves an indeterminate type based on information prior to this program point. (Warning 26, Line 12, Col 7, Line 12, Col 16, "This rule will never be matched") (Warning 26, Line 18, Col 7, Line 18, Col 16, "This rule will never be matched") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - [] + [] let ``DynamicTypeTest - W_TypeTestWillAlwaysHold01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Warning 67, Line 13, Col 7, Line 13, Col 13, "This type test or downcast will always hold")// This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/DynamicTypeTest) - - [] + + [] let ``DynamicTypeTest - E_DynamicTest01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -159,10 +174,11 @@ involves an indeterminate type based on information prior to this program point. |> withDiagnostics [ (Warning 26, Line 3, Col 3, Line 3, Col 54, "This rule will never be matched") ] - - [] + + [] let ``DynamicTypeTest - E_DynamicTest02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -170,10 +186,11 @@ involves an indeterminate type based on information prior to this program point. |> withDiagnostics [ (Warning 26, Line 4, Col 7, Line 4, Col 11, "This rule will never be matched") ] - - [] + + [] let ``DynamicTypeTest - E_DynamicTest03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Expression/Expression.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Expression/Expression.fs index 2c82340ad76..fc9ed2de733 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Expression/Expression.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Expression/Expression.fs @@ -8,37 +8,41 @@ open FSharp.Test.Compiler module Expression = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - E_CounterExample01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Warning 25, Line 7, Col 11, Line 7, Col 12, "Incomplete pattern matches on this expression. For example, the value '0' may indicate a case not covered by the pattern(s).") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - NoCounterExampleTryWith01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - patterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - patterns02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -48,11 +52,12 @@ module Expression = (Warning 25, Line 7, Col 24, Line 7, Col 25, "Incomplete pattern matches on this expression. For example, the value '0' may indicate a case not covered by the pattern(s).") (Warning 25, Line 8, Col 35, Line 8, Col 36, "Incomplete pattern matches on this expression.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - W_CounterExampleWithEnum01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -65,11 +70,12 @@ module Expression = (Warning 25, Line 30, Col 10, Line 30, Col 18, "Incomplete pattern matches on this expression. For example, the value '[_;_;_]' may indicate a case not covered by the pattern(s).") (Warning 25, Line 34, Col 10, Line 34, Col 18, "Incomplete pattern matches on this expression. For example, the value '[|_; 1|]' may indicate a case not covered by the pattern(s).") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - W_CounterExampleWithEnum02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -82,11 +88,12 @@ module Expression = (Warning 25, Line 27, Col 10, Line 27, Col 18, "Incomplete pattern matches on this expression. For example, the value 'T.Y' may indicate a case not covered by the pattern(s).") (Warning 25, Line 30, Col 10, Line 30, Col 18, "Incomplete pattern matches on this expression. For example, the value 'T.Y' may indicate a case not covered by the pattern(s).") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - W_whenGuards01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -94,38 +101,42 @@ module Expression = |> withDiagnostics [ (Warning 25, Line 11, Col 9, Line 11, Col 10, "Incomplete pattern matches on this expression. For example, the value '1' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - whenGuards01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - whenGuards02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - whenGuardss01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Expression) - [] + [] let ``Expression - whenGuardss02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs index 8f7d5a12362..c1bfa90f03d 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Named/Named.fs @@ -8,96 +8,107 @@ open FSharp.Test.Compiler module Named = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - ActivePatternOutsideMatch01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - ActivePatternOutsideMatch02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - activePatterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - activePatterns02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - activePatterns03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - activePatterns05_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - activePatterns06_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - activePatterns07_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - activePatterns08_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - [] + [] let ``Named - activePatterns09_fs`` compilation = compilation + |> getCompilation |> asFs |> typecheck |> shouldSucceed - - [] + + [] let ``Named - activePatterns10_fs`` compilation = compilation + |> getCompilation |> asFs |> typecheck |> shouldFail @@ -113,66 +124,73 @@ module Named = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - ActivePatternUnconstrained01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> ignoreWarnings |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - AsHighOrderFunc01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - discUnion01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - _DiscUnion01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_ActivePatternHasNoFields_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Error 3174, Line 10, Col 24, Line 10, Col 25, "Active patterns do not have fields. This syntax is invalid.") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_ActivePatternNotAFunction_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Error 1209, Line 5, Col 6, Line 5, Col 11, "Active pattern '|A|B|' is not a function") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_ActivePatterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -187,11 +205,12 @@ module Named = (Error 624, Line 17, Col 9, Line 17, Col 17, "The '|' character is not permitted in active pattern case identifiers") (Error 623, Line 18, Col 7, Line 18, Col 9, "Active pattern case identifiers must begin with an uppercase letter") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_ActivePatterns02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -201,9 +220,10 @@ module Named = (Warning 20, Line 6, Col 1, Line 6, Col 38, "The result of this expression has type 'int' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'.") ] - [] + [] let ``Named - E_ActivePatterns03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -270,11 +290,12 @@ but here has type (Error 39, Line 34, Col 8, Line 34, Col 18, "The pattern discriminator 'FooB++' is not defined.") (Warning 25, Line 34, Col 7, Line 34, Col 22, "Incomplete pattern matches on this expression.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_ActivePatternUnconstrained01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -286,9 +307,10 @@ but here has type ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_LetRec01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -297,11 +319,12 @@ but here has type 'Choice<'a,'b>' but here has type 'string' ") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_LetRec02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -313,12 +336,12 @@ but here has type but here has type 'string' ") ] - - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_LetRec03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -332,9 +355,10 @@ but here has type ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_LetRec04_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -343,11 +367,12 @@ but here has type ''a option' but here has type 'string' ") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_NonParam01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -356,11 +381,12 @@ but here has type 'Choice<'a,'b>' but here has type 'string' ") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_NonParam02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -374,9 +400,10 @@ but here has type ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_NonParam03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -388,11 +415,12 @@ but here has type but here has type 'string' ") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_NonParam04_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -401,11 +429,12 @@ but here has type ''a option' but here has type 'string' ") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_Param01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -414,11 +443,12 @@ but here has type 'Choice<'a,'b>' but here has type 'string' ") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_Param02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -430,11 +460,12 @@ but here has type but here has type 'string' ") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_Param03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -446,11 +477,12 @@ but here has type but here has type 'string' ") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_Error_Param04_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -461,11 +493,12 @@ but here has type but here has type 'string' ") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_LargeActivePat01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -474,11 +507,12 @@ but here has type (Error 265, Line 6, Col 6, Line 6, Col 47, "Active patterns cannot return more than 7 possibilities") (Error 265, Line 8, Col 6, Line 8, Col 23, "Active patterns cannot return more than 7 possibilities") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_MulticasePartialNotAllowed01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -488,21 +522,23 @@ but here has type (Error 3868, Line 22, Col 7, Line 22, Col 17, "This active pattern expects exactly one pattern argument, e.g., 'WhiteSpace pat'."); (Error 1107, Line 20, Col 7, Line 20, Col 21, "Partial active patterns may only generate one result") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_ParameterRestrictions01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Error 722, Line 15, Col 23, Line 15, Col 34, "Only active patterns returning exactly one result may accept arguments") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - E_PatternMatchRegressions02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -512,57 +548,63 @@ but here has type (Warning 25, Line 30, Col 11, Line 30, Col 12, "Incomplete pattern matches on this expression.") (Error 1210, Line 22, Col 6, Line 22, Col 38, "Active pattern '|ClientExternalTypeUse|WillFail|' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice = A x'") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - MultiActivePatterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - NamedLiteral01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - NamedLiteral02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - ParameterizedPartialActivePattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - PatternMatchRegressions01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldFail |> withSingleDiagnostic (Warning 25, Line 22, Col 11, Line 22, Col 12, "Incomplete pattern matches on this expression.") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - PatternMatchRegressions02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -570,11 +612,12 @@ but here has type |> withDiagnostics [ (Warning 25, Line 20, Col 11, Line 20, Col 12, "Incomplete pattern matches on this expression.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Named) - [] + [] let ``Named - RecursiveActivePats_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Null/Null.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Null/Null.fs index 3faeae07f26..46fac3505cc 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Null/Null.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Null/Null.fs @@ -8,9 +8,10 @@ open FSharp.Test.Compiler module Null = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Null) - [] + [] let ``Null - E_notNullCompatible01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -18,9 +19,10 @@ module Null = |> withSingleDiagnostic (Error 43, Line 14, Col 7, Line 14, Col 11, "The type 'Foo' does not have 'null' as a proper value") // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Null) - [] + [] let ``Null - matchNull01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Record/Record.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Record/Record.fs index a75f8910e5e..807025b3879 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Record/Record.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Record/Record.fs @@ -8,9 +8,10 @@ open FSharp.Test.Compiler module Record = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Record) - [] + [] let ``Record - E_RecordFieldNotDefined01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -19,11 +20,12 @@ module Record = (Error 39, Line 9, Col 13, Line 9, Col 14, "The record label 'X' is not defined.") (Error 39, Line 9, Col 20, Line 9, Col 21, "The record label 'Y' is not defined.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Record) - [] + [] let ``Record - E_RecTypesNotMatch01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -32,11 +34,12 @@ module Record = (Error 1129, Line 11, Col 13, Line 11, Col 14, "The record type 'R1' does not contain a label 'A'.") (Error 1129, Line 11, Col 20, Line 11, Col 21, "The record type 'R1' does not contain a label 'B'.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Record) - [] + [] let ``Record - E_SyntaxError01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -44,38 +47,42 @@ module Record = |> withDiagnostics [ (Error 10, Line 9, Col 14, Line 9, Col 15, "Unexpected symbol '}' in pattern. Expected '.', '=' or other token.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Record) - [] + [] let ``Record - recordPatterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Record) - [] + [] let ``Record - recordPatterns02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Record) - [] + [] let ``Record - structRecordPatterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Record) - [] + [] let ``Record - structRecordPatterns02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Simple/Simple.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Simple/Simple.fs index e161faded77..8b556d25cfa 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Simple/Simple.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Simple/Simple.fs @@ -9,10 +9,10 @@ open FSharp.Test.Compiler module Simple = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - - [] + [] let ``Simple - W_Incomplete01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -20,10 +20,10 @@ module Simple = |> withSingleDiagnostic (Warning 25, Line 92, Col 13, Line 92, Col 14, "Incomplete pattern matches on this expression. For example, the value 'Result (_)' may indicate a case not covered by the pattern(s).") // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - - [] + [] let ``Simple - W_Incomplete02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -36,10 +36,10 @@ module Simple = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - - [] + [] let ``Simple - W_BindCapitalIdent_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -49,9 +49,10 @@ module Simple = (Warning 49, Line 10, Col 16, Line 10, Col 19, "Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name.") ] - [] + [] let ``Simple - W_BindCapitalIdent_fs preview - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> withLangVersionPreview |> asFsx |> withOptions ["--test:ErrorRanges"] @@ -63,48 +64,53 @@ module Simple = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - CodeGenReg01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - E_constPattern01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldFail |> withSingleDiagnostic (Warning 104, Line 9, Col 11, Line 9, Col 14, "Enums may take values outside known cases. For example, the value 'enum (7)' may indicate a case not covered by the pattern(s).") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - E_namedLiberal01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldFail |> withSingleDiagnostic (Warning 104, Line 10, Col 11, Line 10, Col 14, "Enums may take values outside known cases. For example, the value 'enum (7)' may indicate a case not covered by the pattern(s).") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - E_SyntaxError01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldFail |> withSingleDiagnostic (Error 10, Line 8, Col 14, Line 8, Col 15, "Unexpected symbol'[' in pattern matching. Expected '->' or other token.") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - E_ValueCapture01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -117,11 +123,12 @@ module Simple = int8 int") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - MatchFailureExn01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -130,101 +137,112 @@ module Simple = (Warning 25, Line 20, Col 28, Line 20, Col 29, "Incomplete pattern matches on this expression. For example, the value '0' may indicate a case not covered by the pattern(s).") (Warning 25, Line 24, Col 15, Line 24, Col 23, "Incomplete pattern matches on this expression.") ] - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns04_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns05_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns06_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns07_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns08_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns09_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns10_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns11_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -232,100 +250,111 @@ module Simple = |> withSingleDiagnostic (Warning 26, Line 10, Col 7, Line 10, Col 8, "This rule will never be matched") // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns12_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns13_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns14_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns15_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns16_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Simple) - [] + [] let ``Simple - simplePatterns17_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile |> shouldFail |> withSingleDiagnostic (Warning 25, Line 16, Col 13, Line 16, Col 17, "Incomplete pattern matches on this expression. For example, the value '``some-non-null-value``' may indicate a case not covered by the pattern(s).") - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/AsPatterns) - [] + [] let ``Simple - simplePatterns18_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/AsPatterns) - [] + [] let ``Simple - simplePatterns19_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/AsPatterns) - [] + [] let ``Simple - simplePatterns20_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/AsPatterns) - [] + [] let ``Simple - ValueCapture01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile |> shouldSucceed - + // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/AsPatterns) - [] + [] let ``Simple - ValueCapture02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges";] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/SimpleConstant/SimpleConstant.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/SimpleConstant/SimpleConstant.fs index b2e120d025c..c9dca126573 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/SimpleConstant/SimpleConstant.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/SimpleConstant/SimpleConstant.fs @@ -8,18 +8,20 @@ open FSharp.Test.Compiler module SimpleConstant = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - DiffAssembly_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - E_NoRangeConst01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -27,9 +29,10 @@ module SimpleConstant = |> withSingleDiagnostic (Error 10, Line 9, Col 9, Line 9, Col 11, "Unexpected symbol '..' in pattern matching. Expected '->' or other token.") // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - E_type_bigint_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -40,9 +43,10 @@ module SimpleConstant = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - E_type_bignum40_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -54,54 +58,60 @@ module SimpleConstant = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - FullyQualify01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - matchConst01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - matchConst02_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - matchConst03_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - matchConst04_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - MatchLiteral01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -116,9 +126,10 @@ module SimpleConstant = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - MatchNaN_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -130,18 +141,20 @@ module SimpleConstant = ] // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_bigint_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_bool_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck @@ -149,72 +162,80 @@ module SimpleConstant = |> withSingleDiagnostic (Warning 26, Line 10, Col 7, Line 10, Col 8, "This rule will never be matched") // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_byte_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_byteArr_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_char_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_double_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_float32_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_int_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_int16_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/SimpleConstant) - [] + [] let ``SimpleConstant - type_int64_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Wildcard/Wildcard.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Wildcard/Wildcard.fs index 2831e485b84..5bc1083de3b 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Wildcard/Wildcard.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/Wildcard/Wildcard.fs @@ -8,9 +8,10 @@ open FSharp.Test.Compiler module Wildcard = // This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/Wildcard) - [] + [] let ``Wildcard - wildCardPatterns01_fs - --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFs |> withOptions ["--test:ErrorRanges"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/PseudoCustomAttributes/PseudoCustomAttributes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/PseudoCustomAttributes/PseudoCustomAttributes.fs index f372668b108..356667c4b5c 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/PseudoCustomAttributes/PseudoCustomAttributes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/PseudoCustomAttributes/PseudoCustomAttributes.fs @@ -10,62 +10,66 @@ module ``PseudoCustomAttributes Test Cases`` = let ``PseudoCustomAttributes - Compile and Run`` compilation = compilation + |> getCompilation |> asExe |> compileAndRun |> shouldSucceed let ``PseudoCustomAttributes - Fail to compile`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldFail - [] + [] let ``PseudoCustomAttributes - AssemblyCompany_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyConfiguration_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyCopyright_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyDescription_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyFileVersion_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyInformationalVersion_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyTitle_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyTrademark_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyVersion_001_fs`` compilation = ``PseudoCustomAttributes - Compile and Run`` compilation - [] + [] let ``PseudoCustomAttributes - AssemblyVersion_002_fs`` compilation = compilation + |> getCompilation |> asExe |> compileExeAndRun |> shouldSucceed - [] + [] let ``PseudoCustomAttributes - AssemblyVersion_003_fs`` compilation = compilation + |> getCompilation |> asExe |> withAssemblyVersion "4.5.6.7" |> ignoreWarnings diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs index 856c34bbfa6..bebf3652605 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs @@ -29,43 +29,49 @@ module RecordTypes = //# Fails due to stack overflow. //#ReqNOCov SOURCE=BigRecord01.fs # BigRecord01.fs - [] + [] let ``BigRecord01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds //# Renaming the .exe because for some weird reason on some OSes having 'DispatchSlot' in the .exe //# seems to trigger the UAC dialog... (e.g. Win7 x86) // SOURCE=DispatchSlot_Equals01.fsx SCFLAGS="-o dl_equals01.exe" # DispatchSlot_Equals01.fsx - [] + [] let ``DispatchSlot_Equals01_fsx`` compilation = compilation + |> getCompilation |> withName "dl_equals01" |> verifyCompileAndRunSucceeds // SOURCE=DispatchSlot_GetHashCode.fsx SCFLAGS="-o dl_gethashcode01.exe" # DispatchSlot_GetHashCode.fsx - [] + [] let ``DispatchSlot_GetHashCode_fsx`` compilation = compilation + |> getCompilation |> withName "dl_gethashcode01" |> verifyCompileAndRunSucceeds // SOURCE=DuckTypingRecords01.fs # DuckTypingRecords01.fs - [] + [] let ``DuckTypingRecords01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=EqualAndBoxing01.fs # EqualAndBoxing01.fs - [] + [] let ``EqualAndBoxing01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=E_InheritRecord01.fs SCFLAGS="--test:ErrorRanges" # E_InheritRecord01.fs - [] + [] let ``E_InheritRecord01_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -73,9 +79,10 @@ module RecordTypes = ] // SOURCE=E_Interface_IComparable.fsx SCFLAGS="--test:ErrorRanges" # E_Interface_IComparable.fsx - [] + [] let ``E_Interface_IComparable_fsx`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -85,9 +92,10 @@ module RecordTypes = // SOURCE=E_Interface_IStructuralHash.fsx # E_Interface_IStructuralHash.fsx - [] + [] let ``E_Interface_IStructuralHash_fsx`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -98,9 +106,10 @@ module RecordTypes = ] // SOURCE=E_MutableFields01.fsx SCFLAGS="--test:ErrorRanges" # E_MutableFields01.fsx - [] + [] let ``E_MutableFields01_fsx`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -113,9 +122,10 @@ module RecordTypes = ] // SOURCE=E_RecordCloning01.fs # E_RecordCloning01.fs - [] + [] let ``E_RecordCloning01_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -123,9 +133,10 @@ module RecordTypes = ] // SOURCE=E_RecordsNotNull01.fs # E_RecordsNotNull01.fs - [] + [] let ``E_RecordsNotNull01_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -133,15 +144,17 @@ module RecordTypes = ] // SOURCE=E_RecordsNotNull02.fs # E_RecordsNotNull02.fs - [] + [] let ``E_RecordsNotNull02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=E_Scoping01.fsx SCFLAGS="--test:ErrorRanges" # E_Scoping01.fsx - [] + [] let ``E_Scoping01_fsx`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -149,9 +162,10 @@ module RecordTypes = ] // SOURCE=E_Scoping02.fsx SCFLAGS=" --test:ErrorRanges --flaterrors" # E_Scoping02.fsx - [] + [] let ``E_Scoping02_fsx`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -159,9 +173,10 @@ module RecordTypes = ] // SOURCE=E_TypeInference01.fs SCFLAGS="--test:ErrorRanges" # E_TypeInference01.fs - [] + [] let ``E_TypeInference01_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -169,9 +184,10 @@ module RecordTypes = ] // SOURCE=E_TypeInference01b.fs SCFLAGS="--test:ErrorRanges" # E_TypeInference01b.fs - [] + [] let ``E_TypeInference01b_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -179,9 +195,10 @@ module RecordTypes = ] // SOURCE=E_TypeInference02.fs SCFLAGS="--test:ErrorRanges" # E_TypeInference02.fs - [] + [] let ``E_TypeInference02_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -189,9 +206,10 @@ module RecordTypes = ] // SOURCE=E_UnitType01.fsx SCFLAGS="-a --test:ErrorRanges" # E_UnitType01.fsx - [] + [] let ``E_UnitType01_fsx`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ @@ -199,184 +217,214 @@ module RecordTypes = ] // SOURCE=FieldBindingAfterWith01a.fs SCFLAGS=-a # FieldBindingAfterWith01a.fs - [] + [] let ``FieldBindingAfterWith01a_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheckAsFsxAsLibrary // SOURCE=FieldBindingAfterWith01b.fs SCFLAGS=-a # FieldBindingAfterWith01b.fs - [] + [] let ``FieldBindingAfterWith01b_fs`` compilation = compilation + |> getCompilation |> verifyTypeCheckAsFsxAsLibrary // SOURCE=FullyQualify01.fs # FullyQualify01.fs - [] + [] let ``FullyQualify01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=Interface01.fsx # Interface01.fsx - [] + [] let ``Interface01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=Interface_Empty.fsx # Interface_Empty.fsx - [] + [] let ``Interface_Empty_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=Interface_IComparable.fsx # Interface_IComparable.fsx - [] + [] let ``Interface_IComparable_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=ImplicitEquals01.fs # ImplicitEquals001.fs - [] + [] let ``ImplicitEquals01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=LongIdentifiers01.fsx # LongIdentifiers01.fsx - [] + [] let ``LongIdentifiers01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=Member01.fsx # Member01.fsx - [] + [] let ``Member01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=MutableFields01.fsx # MutableFields01.fsx - [] + [] let ``MutableFields01_fsx`` compilation = compilation + |> getCompilation |> withOptions ["--nowarn:464"] |> verifyCompileAndRunSucceeds // SOURCE=MutableFields_SampleFromSpec02.fsx # MutableFields_SampleFromSpec02.fsx - [] + [] let ``MutableFields_SampleFromSpec02_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=NoClashMemberIFaceMember.fs SCFLAGS="--warnaserror+" # NoClashMemberIFaceMember.fs - [] + [] let ``NoClashMemberIFaceMember_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // NoMT SOURCE=Overload_Equals.fs COMPILE_ONLY=1 SCFLAGS=--warnaserror+ FSIMODE=PIPE # Overload_Equals.fs - fsi - [] + [] let ``Overload_Equals_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // NoMT SOURCE=Overload_GetHashCode.fs COMPILE_ONLY=1 SCFLAGS=--warnaserror+ FSIMODE=PIPE # Overload_GetHashCode.fs - fsi - [] + [] let ``Overload_GetHashCode_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // NoMT SOURCE=Overload_ToString.fs COMPILE_ONLY=1 SCFLAGS=--warnaserror+ FSIMODE=PIPE # Overload_ToString.fs - fsi - [] + [] let ``Overload_ToString_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=SampleFromSpec01.fsx # SampleFromSpec01.fsx - [] + [] let ``SampleFromSpec01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=SampleFromSpec03.fsx # SampleFromSpec03.fsx - [] + [] let ``SampleFromSpec03_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=Scoping03.fsx # Scoping03.fsx - [] + [] let ``Scoping03_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=Scoping04.fsx # Scoping04.fsx - [] + [] let ``Scoping04_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=RecordCloning01.fs # RecordCloning01.fs - [] + [] let ``RecordCloning01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=RecordCloning02.fs # RecordCloning02.fs - [] + [] let ``RecordCloning02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=RecordCloning03.fs # RecordCloning03.fs - [] + [] let ``RecordCloning03_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=StructRecordCloning01.fs # StructRecordCloning01.fs - [] + [] let ``StructRecordCloning01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=StructRecordCloning02.fs # StructRecordCloning02.fs - [] + [] let ``StructRecordCloning02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=StructRecordCloning03.fs # StructRecordCloning03.fs - [] + [] let ``StructRecordCloning03_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=Syntax01.fs # Syntax01.fs - [] + [] let ``Syntax01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=TypeInference01.fs # TypeInference01.fs - [] + [] let ``TypeInference01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=TypeInference02.fs # TypeInference02.fs - [] + [] let ``TypeInference02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // This test was automatically generated (moved from FSharpQA suite - Conformance/BasicTypeAndModuleDefinitions/RecordTypes) - [] + [] let ``UnitType01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRunSucceeds // SOURCE=W_Overrides01.fsx SCFLAGS="--test:ErrorRanges" # W_Overrides01.fsx - [] + [] let ``W_Overrides01_fsx`` compilation = compilation + |> getCompilation |> verifyTypeCheck |> shouldFail |> withDiagnostics [ diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/StructTypes/StructTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/StructTypes/StructTypes.fs index 95e1cb2e4a6..8e2939c22fe 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/StructTypes/StructTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/StructTypes/StructTypes.fs @@ -9,9 +9,10 @@ open FSharp.Test.Compiler module StructTypes = // This test was automatically generated (moved from FSharpQA suite - Conformance/StructTypes) - [] + [] let ``StructTypes - Overload_Equals_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnaserror+"; "--nowarn:988"] |> typecheck @@ -19,9 +20,10 @@ module StructTypes = |> ignore // This test was automatically generated (moved from FSharpQA suite - Conformance/StructTypes) - [] + [] let ``StructTypes - Overload_GetHashCode_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnaserror+"; "--nowarn:988"] |> typecheck @@ -29,18 +31,20 @@ module StructTypes = |> ignore // This test was automatically generated (moved from FSharpQA suite - Conformance/StructTypes) - [] + [] let ``StructTypes - Overload_ToString_f`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnaserror+"; "--nowarn:988"] |> typecheck |> shouldSucceed |> ignore - [] + [] let ``StructTypes - E_Inheritance.fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnaserror+"; "--nowarn:988"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/CheckingSyntacticTypes/CheckingSyntacticTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/CheckingSyntacticTypes/CheckingSyntacticTypes.fs index 60d9132f5e4..9523a5301cd 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/CheckingSyntacticTypes/CheckingSyntacticTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/CheckingSyntacticTypes/CheckingSyntacticTypes.fs @@ -10,9 +10,10 @@ module CheckingSyntacticTypes = // This test was automatically generated (moved from FSharpQA suite - Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes) //This member, function or value declaration may not be declared 'inline' - [] + [] let ``E_CannotInlineVirtualMethods1_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -23,9 +24,10 @@ module CheckingSyntacticTypes = // This test was automatically generated (moved from FSharpQA suite - Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes) //This member, function or value declaration may not be declared 'inline' - [] + [] let ``E_CannotInlineVirtualMethod2_fs`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs index 942219ba172..5623ac08ca7 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/IWSAMsAndSRTPsTests.fs @@ -1228,10 +1228,11 @@ printf "%A" res""" [] #else // SOURCE=ConstrainedAndInterfaceCalls.fs # ConstrainedAndInterfaceCalls.fs - [] + [] #endif let ``ConstrainedAndInterfaceCalls.fs`` compilation = - compilation + compilation + |> getCompilation |> withOptions [ "--nowarn:3536" ; "--nowarn:3535" ] |> verifyCompile |> shouldFail diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/LogicalPropertiesOfTypes/LogicalPropertiesOfTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/LogicalPropertiesOfTypes/LogicalPropertiesOfTypes.fs index e12f72cd76b..356f418d19c 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/LogicalPropertiesOfTypes/LogicalPropertiesOfTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/TypeConstraints/LogicalPropertiesOfTypes/LogicalPropertiesOfTypes.fs @@ -9,9 +9,10 @@ open FSharp.Test.Compiler module LogicalPropertiesOfTypes = // This test was automatically generated (moved from FSharpQA suite - Conformance/TypesAndTypeConstraints/LogicalPropertiesOfTypes) - [] + [] let ``TypeWithNullLiteral_NetRef_fsx`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["-a"] |> typecheck diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs index 0c61d444a9d..02b10b52b28 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionTypes.fs @@ -21,42 +21,47 @@ module UnionTypes = |> compileAndRun //SOURCE=BeginWithUppercase01.fsx SCFLAGS= # BeginWithUppercase01.fsx - [] + [] let ``BeginWithUppercase01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //# Renaming the .exe because for some weird reason on some OSes having 'DispatchSlot' in the .exe //# seems to trigger the UAC dialog... (e.g. Win7 x86) //SOURCE=DispatchSlot_Equals01.fsx SCFLAGS="-o dl_equals01.exe" # DispatchSlot_Equals01.fsx - [] + [] let ``DispatchSlot_Equals01_fsx`` compilation = compilation + |> getCompilation |> withName "dl_equals01" |> verifyCompileAndRun |> shouldSucceed //SOURCE=DispatchSlot_GetHashCode.fsx SCFLAGS="-o dl_gethashcode01.exe" # DispatchSlot_GetHashCode.fsx - [] + [] let ``DispatchSlot_GetHashCode_fsx`` compilation = compilation + |> getCompilation |> withName "dl_gethashcode01" |> verifyCompileAndRun |> shouldSucceed //SOURCE=EqualAndBoxing01.fs # EqualAndBoxing01.fs - [] + [] let ``EqualAndBoxing01_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompileAndRun |> shouldSucceed //SOURCE=E_BeginWithUppercase01.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase01.fsx - [] + [] let ``E_BeginWithUppercase01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -65,9 +70,10 @@ module UnionTypes = ] //SOURCE=E_BeginWithUppercase02.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase02.fsx - [] + [] let ``E_BeginWithUppercase02_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -75,9 +81,10 @@ module UnionTypes = ] //SOURCE=E_BeginWithUppercase03.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase03.fsx - [] + [] let ``E_BeginWithUppercase03_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -85,9 +92,10 @@ module UnionTypes = ] //SOURCE=E_BeginWithUppercase04.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercase04.fsx - [] + [] let ``E_BeginWithUppercase04_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -95,9 +103,10 @@ module UnionTypes = ] //SOURCE=E_BeginWithUppercaseNoPipe01.fsx SCFLAGS="--test:ErrorRanges" # E_BeginWithUppercaseNoPipe01.fsx - [] + [] let ``E_BeginWithUppercaseNoPipe01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -107,9 +116,10 @@ module UnionTypes = ] //SOURCE=E_GenericFunctionValuedStaticProp01.fs SCFLAGS="--test:ErrorRanges --warnaserror-" # E_GenericFunctionValuedStaticProp01.fs - [] + [] let ``E_GenericFunctionValuedStaticProp01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -118,9 +128,10 @@ module UnionTypes = ] //SOURCE=E_Interface_IComparable.fsx SCFLAGS="--test:ErrorRanges" # E_Interface_IComparable.fsx - [] + [] let ``E_Interface_IComparable_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -129,9 +140,10 @@ module UnionTypes = ] //SOURCE=E_Member_Duplicate01.fsx SCFLAGS="--test:ErrorRanges" # E_Member_Duplicate01.fsx - [] + [] let ``E_Member_Duplicate01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -141,9 +153,10 @@ module UnionTypes = ] //SOURCE=E_ScopeAndDataConstrAndPattern01.fsx SCFLAGS="--test:ErrorRanges" # E_ScopeAndDataConstrAndPattern01.fsx - [] + [] let ``E_ScopeAndDataConstrAndPattern01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -151,9 +164,10 @@ module UnionTypes = ] //SOURCE=E_Interface_IStructuralHash.fsx # E_Interface_IStructuralHash.fsx - [] + [] let ``E_Interface_IStructuralHash_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -164,9 +178,10 @@ module UnionTypes = ] //SOURCE=E_FieldNameUsedMulti.fs SCFLAGS="--test:ErrorRanges" # E_FieldNameUsedMulti.fs - [] + [] let ``E_FieldNameUsedMulti_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -176,9 +191,10 @@ module UnionTypes = ] //SOURCE=E_FieldMemberClash.fs SCFLAGS="--test:ErrorRanges" # E_FieldMemberClash.fs - [] + [] let ``E_FieldMemberClash_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -189,9 +205,10 @@ module UnionTypes = ] //SOURCE=E_InheritUnion.fs # E_InheritUnion.fs - [] + [] let ``E_InheritUnion_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -200,9 +217,10 @@ module UnionTypes = ] //SOURCE=E_LowercaseDT.fs # E_LowercaseDT.fs - [] + [] let ``E_LowercaseDT_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -210,9 +228,10 @@ module UnionTypes = ] //SOURCE=E_Overload_Equals.fs SCFLAGS="--test:ErrorRanges" # E_Overload_Equals.fs - [] + [] let ``E_Overload_Equals_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -221,9 +240,10 @@ module UnionTypes = ] //SOURCE=E_Overload_GetHashCode.fs SCFLAGS="--test:ErrorRanges" # E_Overload_GetHashCode.fs - [] + [] let ``E_Overload_GetHashCode_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -232,9 +252,10 @@ module UnionTypes = ] //SOURCE=E_SampleFromSpec01d.fsx SCFLAGS="--test:ErrorRanges" # E_SampleFromSpec01d.fsx - [] + [] let ``E_SampleFromSpec01d_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -242,9 +263,10 @@ module UnionTypes = ] //SOURCE=E_SampleFromSpec01d2.fsx SCFLAGS="--test:ErrorRanges" # E_SampleFromSpec01d2.fsx - [] + [] let ``E_SampleFromSpec01d2_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -252,9 +274,10 @@ module UnionTypes = ] //SOURCE=E_UnionConstructorBadFieldName.fs SCFLAGS="--test:ErrorRanges" # E_UnionConstructorBadFieldName.fs - [] + [] let ``E_UnionConstructorBadFieldName_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -266,9 +289,10 @@ module UnionTypes = ] //SOURCE=E_UnionFieldConflictingName.fs SCFLAGS="--test:ErrorRanges" # E_UnionFieldConflictingName.fs - [] + [] let ``E_UnionFieldConflictingName_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -278,9 +302,10 @@ module UnionTypes = ] //SOURCE=E_UnionFieldNamedTag.fs SCFLAGS="--test:ErrorRanges" # E_UnionFieldNamedTag.fs - [] + [] let ``E_UnionFieldNamedTag_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -288,9 +313,10 @@ module UnionTypes = ] //SOURCE=E_UnionFieldNamedTagNoDefault.fs SCFLAGS="--test:ErrorRanges" # E_UnionFieldNamedTagNoDefault.fs - [] + [] let ``E_UnionFieldNamedTagNoDefault_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -298,9 +324,10 @@ module UnionTypes = ] //SOURCE=E_UnionMemberNamedTag.fs SCFLAGS="--test:ErrorRanges" # E_UnionMemberNamedTag.fs - [] + [] let ``E_UnionMemberNamedTag_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -308,9 +335,10 @@ module UnionTypes = ] //SOURCE=E_UnionMemberNamedTagNoDefault.fs SCFLAGS="--test:ErrorRanges" # E_UnionMemberNamedTagNoDefault.fs - [] + [] let ``E_UnionMemberNamedTagNoDefault_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -318,9 +346,10 @@ module UnionTypes = ] //SOURCE=E_UnionMemberNamedTags.fs SCFLAGS="--test:ErrorRanges" # E_UnionMemberNamedTags.fs - [] + [] let ``E_UnionMemberNamedTags_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -328,9 +357,10 @@ module UnionTypes = ] //SOURCE=E_UnionMemberNamedTagsNoDefault.fs SCFLAGS="--test:ErrorRanges" # E_UnionMemberNamedTagsNoDefault.fs - [] + [] let ``E_UnionMemberNamedTagsNoDefault_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -338,9 +368,10 @@ module UnionTypes = ] //SOURCE=E_UnionsNotNull01.fs # E_UnionsNotNull01.fs - [] + [] let ``E_UnionsNotNull01_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -348,191 +379,217 @@ module UnionTypes = ] //SOURCE=ImplicitEquals001.fs # ImplicitEquals001.fs - [] + [] let ``ImplicitEquals001_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=Interface01.fsx SCFLAGS= # Interface01.fsx - [] + [] let ``Interface01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=Interface_IComparable.fsx SCFLAGS= # Interface_IComparable.fsx - [] + [] let ``Interface_IComparable_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=Member01.fsx # Member01.fsx - [] + [] let ``Member01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=NamedFields01.fsx SCFLAGS= # NamedFields01.fsx - [] + [] let ``NamedFields01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=NamedFields02.fsx SCFLAGS= # NamedFields02.fsx - [] + [] let ``NamedFields02_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=NamedFields03.fsx SCFLAGS= # NamedFields03.fsx - [] + [] let ``NamedFields03_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/BasicTypeAndModuleDefinitions/UnionTypes) - [] + [] let ``Overload_Equals_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompile |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/BasicTypeAndModuleDefinitions/UnionTypes) - [] + [] let ``Overload_GetHashCode_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompile |> shouldSucceed // This test was automatically generated (moved from FSharpQA suite - Conformance/BasicTypeAndModuleDefinitions/UnionTypes) - [] + [] let ``Overload_ToString_fs`` compilation = compilation + |> getCompilation |> asFsx |> verifyCompile |> shouldSucceed //SOURCE=Overrides01.fsx # Overrides01.fsx - [] + [] let ``Overrides01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=Parenthesis01.fsx # Parenthesis01.fsx - [] + [] let ``Parenthesis01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=Parenthesis02.fsx # Parenthesis02.fsx - [] + [] let ``Parenthesis02_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=Parenthesis03.fsx # Parenthesis03.fsx - [] + [] let ``Parenthesis03_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=Recursive01.fsx SCFLAGS= # Recursive01.fsx - [] + [] let ``Recursive01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=ReflectionOnUnionTypes01.fs SCFLAGS= # ReflectionOnUnionTypes01.fs - [] + [] let ``ReflectionOnUnionTypes01_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=SampleFromSpec01.fsx SCFLAGS # SampleFromSpec01.fsx - [] + [] let ``SampleFromSpec01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=SampleFromSpec01b.fsx SCFLAGS= # SampleFromSpec01b.fsx - [] + [] let ``SampleFromSpec01b_fsx`` compilation = compilation + |> getCompilation |> withOcamlCompat |> withLangVersion50 |> verifyCompileAndRun |> shouldSucceed //SOURCE=SampleFromSpec01d.fsx SCFLAGS= # SampleFromSpec01d.fsx - [] + [] let ``SampleFromSpec01d_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=ScopeAndDataConstrAndPattern01.fsx SCFLAGS= # ScopeAndDataConstrAndPattern01.fsx - [] + [] let ``ScopeAndDataConstrAndPattern01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=UnionCaseProduction01.fsx SCFLAGS=-a # UnionCaseProduction01.fsx - [] + [] let ``UnionCaseProduction01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=UnionCasesProduction01.fsx SCFLAGS=-a # UnionCasesProduction01.fsx - [] + [] let ``UnionCasesProduction01_fsx`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=UnionsNotNull02.fs # UnionsNotNull02.fs - [] + [] let ``UnionsNotNull02_fs`` compilation = compilation + |> getCompilation |> verifyCompileAndRun |> shouldSucceed //SOURCE=LowercaseWhenRequireQualifiedAccess.fsx # LowercaseWhenRequireQualifiedAccess.fsx - [] + [] let ``LowercaseWhenRequireQualifiedAccess_fs in langversion 6`` compilation = compilation + |> getCompilation |> withLangVersion60 |> verifyCompile |> shouldFail //SOURCE=LowercaseWhenRequireQualifiedAccess.fsx # LowercaseWhenRequireQualifiedAccess.fsx - [] + [] let ``LowercaseWhenRequireQualifiedAccess_fs in preview`` compilation = compilation + |> getCompilation |> withLangVersion70 |> verifyCompileAndRun |> shouldSucceed //SOURCE=E_LowercaseWhenRequireQualifiedAccess.fsx # E_LowercaseWhenRequireQualifiedAccess.fsx - [] + [] let ``E_LowercaseWhenRequireQualifiedAccess_fs in preview`` compilation = compilation + |> getCompilation |> withLangVersion70 |> verifyCompile |> shouldFail @@ -552,9 +609,10 @@ module UnionTypes = ] //SOURCE=E_LowercaseWhenRequireQualifiedAccess.fsx # E_LowercaseWhenRequireQualifiedAccess.fsx - [] + [] let ``E_LowercaseWhenRequireQualifiedAccess_fs in langversion 6`` compilation = compilation + |> getCompilation |> withLangVersion60 |> verifyCompile |> shouldFail @@ -581,9 +639,10 @@ module UnionTypes = ] //SOURCE=W_GenericFunctionValuedStaticProp02.fs SCFLAGS="--test:ErrorRanges --warnaserror-" # W_GenericFunctionValuedStaticProp02.fs - [] + [] let ``W_GenericFunctionValuedStaticProp02_fs`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -591,9 +650,10 @@ module UnionTypes = ] //SOURCE=W_SampleFromSpec01c.fsx SCFLAGS="--test:ErrorRanges" # W_SampleFromSpec01c.fsx - [] + [] let ``W_SampleFromSpec01c_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ @@ -603,9 +663,10 @@ module UnionTypes = ] //SOURCE=W_UnionCaseProduction01.fsx SCFLAGS="-a --test:ErrorRanges" # W_UnionCaseProduction01.fsx - [] + [] let ``W_UnionCaseProduction01_fsx`` compilation = compilation + |> getCompilation |> verifyCompile |> shouldFail |> withDiagnostics [ diff --git a/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs index 34942501f1d..24f3b6250c8 100644 --- a/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs +++ b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. namespace ConstraintSolver @@ -13,9 +13,10 @@ module PrimitiveConstraints = /// This suggestion was resolved as by design, /// so the test makes sure, we're emitting error message about 'not being a valid object construction expression' - [] + [] let ``Invalid object constructor`` compilation = // Regression test for FSharp1.0:4189 compilation + |> getCompilation |> verifyBaseline [] diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AssemblyBoundary/AssemblyBoundary.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AssemblyBoundary/AssemblyBoundary.fs index 011afc282a7..c1a38c2b6fa 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AssemblyBoundary/AssemblyBoundary.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AssemblyBoundary/AssemblyBoundary.fs @@ -17,7 +17,7 @@ module AssemblyBoundary = //NoMT SOURCE=test01.fs SCFLAGS="--optimize+ -r:lib01.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib01.fs" # test01.fs - [] + [] let ``test01_fs`` compilation = let lib01 = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "lib01.fs")) @@ -25,11 +25,12 @@ module AssemblyBoundary = |> asLibrary compilation + |> getCompilation |> withReferences [lib01] |> verifyCompileAndExecution //NoMT SOURCE=test01.fs SCFLAGS="--optimize+ -r:lib01.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib01.fs" # test01.fs - [] + [] let ``test02_fs`` compilation = let lib02 = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "lib02.fs")) @@ -37,11 +38,12 @@ module AssemblyBoundary = |> asLibrary compilation + |> getCompilation |> withReferences [lib02] |> verifyCompileAndExecution //NoMT SOURCE=test03.fs SCFLAGS="--optimize+ -r:lib03.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib03.fs" # test03.fs - [] + [] let ``test03_fs`` compilation = let lib03 = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "lib03.fs")) @@ -49,11 +51,12 @@ module AssemblyBoundary = |> asLibrary compilation + |> getCompilation |> withReferences [lib03] |> verifyCompileAndExecution //NoMT SOURCE=test04.fs SCFLAGS="--optimize+ -r:lib04.dll" PRECMD="\$FSC_PIPE -a --optimize+ lib04.fs" # test04.fs - [] + [] let ``test04_fs`` compilation = let lib04 = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "lib04.fs")) @@ -61,12 +64,13 @@ module AssemblyBoundary = |> asLibrary compilation + |> getCompilation |> withReferences [lib04] |> verifyCompileAndExecution // SOURCE=InlineWithPrivateValues01.fs SCFLAGS="-r:TypeLib01.dll" PRECMD="\$FSC_PIPE -a --optimize+ TypeLib01.fs" # InlineWithPrivateValuesStruct - [] + [] let ``InlineWithPrivateValues01_fs_TypeLib01_fs`` compilation = let typeLib01 = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "TypeLib01.fs")) @@ -74,11 +78,12 @@ module AssemblyBoundary = |> asLibrary compilation + |> getCompilation |> withReferences [typeLib01] |> verifyCompileAndExecution // SOURCE=InlineWithPrivateValues01.fs SCFLAGS="-r:TypeLib02.dll" PRECMD="\$FSC_PIPE -a --optimize+ TypeLib02.fs" # InlineWithPrivateValuesRef - [] + [] let ``InlineWithPrivateValues01_fs_TypeLib02_fs`` compilation = let typeLib02 = FsFromPath (Path.Combine(__SOURCE_DIRECTORY__, "TypeLib02.fs")) @@ -86,6 +91,7 @@ module AssemblyBoundary = |> asLibrary compilation + |> getCompilation |> withReferences [typeLib02] |> verifyCompileAndExecution diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionStepping.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionStepping.fs index 89c1c62c7c0..70515578357 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionStepping.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionStepping.fs @@ -17,74 +17,38 @@ module AsyncExpressionStepping = |> verifyBaseline |> verifyILBaseline - [] - let ``AsyncExpressionSteppingTest1_RealInternalSignatureOn_fs`` compilation = + [] + let ``AsyncExpressionSteppingTest1_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - [] - let ``AsyncExpressionSteppingTest1_RealInternalSignatureOff_fs`` compilation = + [] + let ``AsyncExpressionSteppingTest2`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation - [] - let ``AsyncExpressionSteppingTest2_RealInternalSignatureOnfs`` compilation = + [] + let ``AsyncExpressionSteppingTest3_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - [] - let ``AsyncExpressionSteppingTest2_RealInternalSignatureOff_fs`` compilation = + [] + let ``AsyncExpressionSteppingTest4_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation - [] - let ``AsyncExpressionSteppingTest3_RealInternalSignatureOn_fs`` compilation = + [] + let ``AsyncExpressionSteppingTest5_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - [] - let ``AsyncExpressionSteppingTest3_RealInternalSignatureOff_fs`` compilation = + [] + let ``AsyncExpressionSteppingTest6_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - [] - let ``AsyncExpressionSteppingTest4_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - [] - let ``AsyncExpressionSteppingTest4_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - [] - let ``AsyncExpressionSteppingTest5_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - [] - let ``AsyncExpressionSteppingTest5_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - [] - let ``AsyncExpressionSteppingTest6_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - [] - let ``AsyncExpressionSteppingTest6_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/AttributeTargets.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/AttributeTargets.fs index 199fb7bda05..31831155036 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/AttributeTargets.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/AttributeTargets.fs @@ -17,38 +17,20 @@ module AttributeTargets = |> verifyBaseline |> verifyILBaseline - [] - let ``Default_RealInternalSignatureOn_fs`` compilation = + [] + let ``Default_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - [] - let ``Default_RealInternalSignatureOff_fs`` compilation = + [] + let ``Field_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation - [] - let ``Field_RealInternalSignatureOn_fs`` compilation = + [] + let ``Property_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - [] - let ``Field_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - [] - let ``Property_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - [] - let ``Property_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs index 79dc02b6c4c..3c496e7dfbb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember.fs @@ -17,74 +17,38 @@ module CCtorDUWithMember = |> verifyBaseline |> verifyILBaseline - [] - let ``CCtorDUWithMember01a_RealInternalSignatureOn_fs`` compilation = + [] + let ``CCtorDUWithMember01a_fs`` compilation = compilation + |> getCompilation |> asFs - |> withRealInternalSignatureOn |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember01.fs")) |> verifyCompilation - [] - let ``CCtorDUWithMember01a_RealInternalSignatureOff_fs`` compilation = + [] + let ``CCtorDUWithMember02a_fs`` compilation = compilation - |> asFs - |> withRealInternalSignatureOff - |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember01.fs")) - |> verifyCompilation - - [] - let ``CCtorDUWithMember02a_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> asFs |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember02.fs")) |> verifyCompilation - [] - let ``CCtorDUWithMember02a_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> asFs - |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember02.fs")) - |> verifyCompilation - - [] - let ``CCtorDUWithMember03a_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> asFs - |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember03.fs")) - |> verifyCompilation - - [] - let ``CCtorDUWithMember03a_RealInternalSignatureOff_fs`` compilation = + [] + let ``CCtorDUWithMember03a_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> asFs |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember03.fs")) |> verifyCompilation - [] - let ``CCtorDUWithMember04a_RealInternalSignatureOn_fs`` compilation = + [] + let ``CCtorDUWithMember04a_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> asFs |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "CCtorDUWithMember04.fs")) |> verifyCompilation - [] - 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-" ] - [] // RealSig [] // Regular [] diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs index 7821dd195d0..3bc831ca969 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute.fs @@ -18,36 +18,34 @@ module CompiledNameAttribute = |> verifyBaseline |> verifyILBaseline - [] + [] let ``CompiledNameAttribute01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``CompiledNameAttribute02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``CompiledNameAttribute03_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``CompiledNameAttribute04_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - [] - let ``CompiledNameAttribute04_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - [] + [] let ``CompiledNameAttribute05_fs`` compilation = compilation + |> getCompilation |> asFs |> asExe |> withEmbeddedPdb diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.net472.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.net472.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.net472.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.net472.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.netcore.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.netcore.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.netcore.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOff.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.netcore.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.fs.il.netcore.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.fs.il.netcore.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.net472.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.net472.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.net472.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.net472.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.netcore.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.netcore.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs deleted file mode 100644 index 24c007eee73..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04_RealInternalSignatureOn.fs +++ /dev/null @@ -1,51 +0,0 @@ -// #Regression #NoMono #NoMT #CodeGen #EmittedIL #Attributes -// Regression test for FSharp1.0:4740 -// Title: Expose currying information in F# compiled form - -// Regression test for FSharp1.0:4661 -// Title: PreserveSigAttribute pseudo-custom attribute on COM interop interfaces does not compile correctly - -// Regression test for FSharp1.0:5684 -// Title: We should align generation of IL code for pseudo-custom attributes like PreserveSigAttribute for all language constructs (currently, it is incorrect for object expressions) -module Program - -open System -open System.Runtime.InteropServices - - -let f1 x y = x + y -let f2 x = x - -[] -type C() = - member this.P = 1 - member this.M1 x y = x + y - [] - member this.M2 x = x - - abstract A1 : int -> int -> int - abstract A2 : int -> int - - -type IInterface = - interface - [] - abstract SomeMethod : int -> int - end - - -type S = - struct - [] - member this.M1 x = x - end - - -type ITestInterface = - interface - abstract M : int -> int - end - -let a = { new ITestInterface with - [] - member this.M x = x + 1 } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpressions.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpressions.fs index 14a4a7e4270..b6520a2f363 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpressions.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpressions.fs @@ -32,87 +32,44 @@ module ComputationExpressions = |> ignoreWarnings |> verifyILBaseline - [] - let ``ComputationExpr01_realsig=true`` compilation = + [] + let ``ComputationExpr01_fs`` compilation = compilation - |> withRealInternalSignature + |> getCompilation |> verifyCompilation - [] - let ``ComputationExpr01_realsig=false`` compilation = + [] + let ``ComputationExpr02_fs`` compilation = compilation - |> withoutRealInternalSignature - |> verifyCompilation - - [] - let ``ComputationExpr02_realsig=true`` compilation = - compilation - |> withRealInternalSignature - |> verifyCompilation - - [] - let ``ComputationExpr02_realsig=false`` compilation = - compilation - |> withoutRealInternalSignature + |> getCompilation |> verifyCompilation - [] - let ``ComputationExpr03_realsig=true`` compilation = + [] + let ``ComputationExpr03_fs`` compilation = compilation - |> withRealInternalSignature + |> getCompilation |> verifyCompilation - [] - let ``ComputationExpr03_realsig=false`` compilation = - compilation - |> withoutRealInternalSignature - |> verifyCompilation - - [] - let ``ComputationExpr04_realsig=true`` compilation = - compilation - |> withRealInternalSignature - |> verifyCompilation - - [] - let ``ComputationExpr04_realsig=false`` compilation = - compilation - |> withoutRealInternalSignature - |> verifyCompilation - - [] - let ``ComputationExpr05_realsig=true`` compilation = - compilation - |> withRealInternalSignature - |> verifyCompilation - - [] - let ``ComputationExpr05_realsig=false`` compilation = + [] + let ``ComputationExpr04_fs`` compilation = compilation - |> withoutRealInternalSignature + |> getCompilation |> verifyCompilation - [] - let ``ComputationExpr06_realsig=true`` compilation = + [] + let ``ComputationExpr05_fs`` compilation = compilation - |> withRealInternalSignature + |> getCompilation |> verifyCompilation - [] - let ``ComputationExpr06_realsig=false`` compilation = + [] + let ``ComputationExpr06_fs`` compilation = compilation - |> withoutRealInternalSignature + |> getCompilation |> verifyCompilation - [] - let ``ComputationExpr07_realsig=true`` compilation = + [] + let ``ComputationExpr07_fs`` compilation = compilation - |> withRealInternalSignature - |> verifyCompilation - - [] - let ``ComputationExpr07_realsig=false`` compilation = - compilation - |> withoutRealInternalSignature - |> withLangVersionPreview // TODO https://github.com/dotnet/fsharp/issues/16739: Remove this when LanguageFeature.LowerIntegralRangesToFastLoops is out of preview. + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs index c224f48864c..ebc7634013a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ComputedCollections.fs @@ -4,10 +4,8 @@ open FSharp.Test open FSharp.Test.Compiler open Xunit -#nowarn 3391 // - module ComputedCollections = - let verifyCompilation (compilation: CompilationUnit) = + let verifyCompilation compilation = compilation |> asExe |> withEmbeddedPdb @@ -15,50 +13,74 @@ module ComputedCollections = |> ignoreWarnings |> verifyILBaseline - [] - let Int32RangeArrays_fs (compilation: CompilationHelper) = - verifyCompilation compilation + [] + let Int32RangeArrays_fs (compilation: CompilationHelper) = + compilation + |> getCompilation + |> verifyCompilation - [] - let ``Int32RangeLists_fs`` (compilation: CompilationHelper) = - verifyCompilation compilation - - [] - let ``UInt64RangeArrays_fs`` (compilation: CompilationHelper) = - verifyCompilation compilation + [] + let ``Int32RangeLists_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation - [] - let ``UInt64RangeLists_fs`` (compilation: CompilationHelper) = - verifyCompilation compilation + [] + let ``UInt64RangeArrays_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation - [] - let ``ForNInRangeArrays_fs`` (compilation: CompilationHelper) = - verifyCompilation compilation + [] + let ``UInt64RangeLists_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation + + [] + let ``ForNInRangeArrays_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation - [] - let ``ForNInRangeLists_fs`` (compilation: CompilationHelper) = - verifyCompilation compilation + [] + let ``ForNInRangeLists_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation - [] - let ``ForXInArray_ToArray_fs`` (compilation: CompilationHelper) = - verifyCompilation compilation + [] + let ``ForXInArray_ToArray_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation - [] - let ``ForXInArray_ToList_fs`` (compilation: CompilationHelper) = - verifyCompilation compilation + [] + let ``ForXInArray_ToList_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation - [] - let ``ForXInList_ToArray_fs`` (compilation: CompilationHelper) = - verifyCompilation compilation + [] + let ``ForXInList_ToArray_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation - [] - let ``ForXInList_ToList_fs`` (compilation: CompilationHelper) = - verifyCompilation compilation + [] + let ``ForXInList_ToList_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation - [] - let ``ForXInSeq_ToArray_fs`` (compilation: CompilationHelper) = - verifyCompilation compilation + [] + let ``ForXInSeq_ToArray_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation - [] - let ``ForXInSeq_ToList_fs`` (compilation: CompilationHelper) = - verifyCompilation compilation + [] + let ``ForXInSeq_ToList_fs`` compilation = + compilation + |> getCompilation + |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs index 883490978dc..d37be433345 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct.fs @@ -24,79 +24,92 @@ module DoNotBoxStruct = |> verifyILBaseline //SOURCE=DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.exe" # DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs - [] + [] let ``DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_Array_FSInterface_NoExtMeth.exe" # DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs - [] + [] let ``DoNotBoxStruct_Array_FSInterface_NoExtMeth_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.exe" # DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs - - [] + [] let ``DoNotBoxStruct_MDArray_FSInterface_NoExtMeth_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.exe" # DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs - - [] + [] let ``DoNotBoxStruct_NoArray_FSInterface_NoExtMeth_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=DoNotBoxStruct_ArrayOfArray_CSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_ArrayOfArray_CSInterface.exe" # DoNotBoxStruct_ArrayOfArray_CSInterface.fs - [] + [] let ``DoNotBoxStruct_ArrayOfArray_CSInterface_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=DoNotBoxStruct_ArrayOfArray_CSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_ArrayOfArray_CSInterface.exe" # DoNotBoxStruct_ArrayOfArray_CSInterface.fs - [] + [] let ``DoNotBoxStruct_ArrayOfArray_FSInterface_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=DoNotBoxStruct_Array_CSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_Array_CSInterface.exe" # DoNotBoxStruct_Array_CSInterface.fs - [] + [] let ``DoNotBoxStruct_Array_CSInterface_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=DoNotBoxStruct_Array_FSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_Array_FSInterface.exe" # DoNotBoxStruct_Array_FSInterface.fs - - [] + [] let ``DoNotBoxStruct_Array_FSInterface_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=DoNotBoxStruct_MDArray_CSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_MDArray_CSInterface.exe" # DoNotBoxStruct_MDArray_CSInterface.fs - - [] + [] let ``DoNotBoxStruct_MDArray_CSInterface_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=DoNotBoxStruct_MDArray_FSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_MDArray_FSInterface.exe" # DoNotBoxStruct_MDArray_FSInterface.fs - - [] + [] let ``DoNotBoxStruct_MDArray_FSInterface_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=DoNotBoxStruct_NoArray_CSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_NoArray_CSInterface.exe" # DoNotBoxStruct_NoArray_CSInterface.fs - [] + [] let ``DoNotBoxStruct_NoArray_CSInterface_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=DoNotBoxStruct_NoArray_FSInterface.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_NoArray_FSInterface.exe" # DoNotBoxStruct_NoArray_FSInterface.fs - - [] + [] let ``DoNotBoxStruct_NoArray_FSInterface_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=DoNotBoxStruct_ToString.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd DoNotBoxStruct_ToString.exe" # DoNotBoxStruct_ToString.fs - [] + [] let ``DoNotBoxStruct_ToString_fs`` compilation = compilation + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnArray01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.opt.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs index 2f890a85222..c7725fc3cc2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs @@ -10,442 +10,203 @@ module ForLoop = compilation |> withOptions [ "--test:EmitFeeFeeAs100001" ] |> asExe - |> withOptimize |> withEmbeddedPdb |> withEmbedAllSource |> ignoreWarnings |> verifyILBaseline - // SOURCE=NoAllocationOfTuple01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoAllocationOfTuple01.dll" # NoAllocationOfTuple01.fs - [] - let ``NoAllocationOfTuple01_fs_RealInternalSignatureOff`` compilation = + // SOURCE=ForLoop01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop01.exe" # ForLoop01.fs - + [] + let ``ForLoop01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation - // SOURCE=NoAllocationOfTuple01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoAllocationOfTuple01.dll" # NoAllocationOfTuple01.fs - [] - let ``NoAllocationOfTuple01_fs_RealInternalSignatureOn`` compilation = + // SOURCE=ForLoop02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop02.exe" # ForLoop02.fs + [] + let ``ForLoop02_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - // SOURCE=ForEachOnArray01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnArray01.dll" # ForEachOnArray01.fs - [] - let ``ForEachOnArray01_fs_RealInternalSignatureOff`` compilation = + // SOURCE=ForLoop03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop03.exe" # ForLoop03.fs + [] + let ``ForLoop03_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation - // SOURCE=ForEachOnArray01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnArray01.dll" # ForEachOnArray01.fs - [] - let ``ForEachOnArray01_fs_RealInternalSignatureOn`` compilation = + // SOURCE=NoAllocationOfTuple01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoAllocationOfTuple01.dll" # NoAllocationOfTuple01.fs + [] + let ``NoAllocationOfTuple01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - // SOURCE=ForEachOnList01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnList01.dll" # ForEachOnList01.fs - [] - let ``ForEachOnList01_fs_RealInternalSignatureOff`` compilation = + // SOURCE=ForEachOnArray01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnArray01.dll" # ForEachOnArray01.fs + [] + let ``ForEachOnArray01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachOnList01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnList01.dll" # ForEachOnList01.fs - [] - let ``ForEachOnList01_fs_RealInternalSignatureOn`` compilation = + [] + let ``ForEachOnList01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachOnString01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnString01.dll" # ForEachOnString01.fs - [] - let ``ForEachOnString01_fs_RealInternalSignatureOff`` compilation = + [] + let ``ForEachOnString01_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachOnString01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForEachOnString01.dll" # ForEachOnString01.fs - [] - let ``ForEachOnString01_fs_RealInternalSignatureOn`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ZeroToArrLength01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ZeroToArrLength01.dll" # ZeroToArrLength01.fs - [] - let ``ZeroToArrLength01_fs_RealInternalSignatureOff`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ZeroToArrLength01.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ZeroToArrLength01.dll" # ZeroToArrLength01.fs - [] - let ``ZeroToArrLength01_fs_RealInternalSignatureOn`` compilation = + [] + let ``ZeroToArrLength01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ZeroToArrLength02.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ZeroToArrLength02.dll" # ZeroToArrLength02.fs - [] - let ``ZeroToArrLength02_fs_RealInternalSignatureOff`` compilation = + [] + let ``ZeroToArrLength02_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ZeroToArrLength02.fs SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ZeroToArrLength02.dll" # ZeroToArrLength02.fs - [] - let ``ZeroToArrLength02_fs_RealInternalSignatureOn`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NoIEnumerable01.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable01.dll" # NoIEnumerable01.fsx - [] - let ``NoIEnumerable01_fsx_RealInternalSignatureOff`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NoIEnumerable01.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable01.dll" # NoIEnumerable01.fsx - [] - let ``NoIEnumerable01_fsx_RealInternalSignatureOn`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NoIEnumerable02.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable02.dll" # NoIEnumerable02.fsx - [] - let ``NoIEnumerable02_fsx_RealInternalSignatureOff`` compilation = + [] + let ``NoIEnumerable01_fsx`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NoIEnumerable02.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable02.dll" # NoIEnumerable02.fsx - [] - let ``NoIEnumerable02_fsx_RealInternalSignatureOn`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NoIEnumerable03.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable03.dll" # NoIEnumerable03.fsx - [] - let ``NoIEnumerable03_fsx_RealInternalSignatureOff`` compilation = + [] + let ``NoIEnumerable02_fsx`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NoIEnumerable03.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoIEnumerable03.dll" # NoIEnumerable03.fsx - [] - let ``NoIEnumerable03_fsx_RealInternalSignatureOn`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd01.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd01.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd01_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``NoIEnumerable03_fsx`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NonTrivialBranchingBindingInEnd01.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd01.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd01_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd01.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd01.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd01_fs_RealInternalSignatureOff_nonopt`` compilation = + [] + let ``NonTrivialBranchingBindingInEnd01_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd01.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd01.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd01_fs_RealInternalSignatureOn_nonopt`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=NonTrivialBranchingBindingInEnd02.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd02.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd02_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``NonTrivialBranchingBindingInEnd02_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd02.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd02.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd02_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd02.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd02.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd02_fs_RealInternalSignatureOff_nonopt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd02.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd02.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd02_fs_RealInternalSignatureOn_nonopt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd03.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd03.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NonTrivialBranchingBindingInEnd03.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd03.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd03.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd03.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOff_nonopt`` compilation = + [] + let ``NonTrivialBranchingBindingInEnd03_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd03.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd03.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd03_fs_RealInternalSignatureOn_nonopt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd04.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd04.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NonTrivialBranchingBindingInEnd04.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd04.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``NonTrivialBranchingBindingInEnd04_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd04.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd04.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOff_nonopt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd04.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd04.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd04_fs_RealInternalSignatureOn_nonopt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd05.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd05.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd05_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=NonTrivialBranchingBindingInEnd05.fs SCFLAGS="--optimize+" # NonTrivialBranchingBindingInEnd05.fs --optimize+ - [] - let ``NonTrivialBranchingBindingInEnd05_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``NonTrivialBranchingBindingInEnd05_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd05.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd05.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd05_fs_RealInternalSignatureOff_nonopt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=NonTrivialBranchingBindingInEnd05.fs SCFLAGS="--optimize-" # NonTrivialBranchingBindingInEnd05.fs --optimize- - [] - let ``NonTrivialBranchingBindingInEnd05_fs_RealInternalSignatureOn_nonopt`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepSByte.fs SCFLAGS="--optimize+" # ForEachRangeStepSByte.fs --optimize+ - [] - let ``ForEachRangeStepSByte_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepSByte_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepSByte.fs SCFLAGS="--optimize+" # ForEachRangeStepSByte.fs --optimize+ - [] - let ``ForEachRangeStepSByte_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStepByte.fs SCFLAGS="--optimize+" # ForEachRangeStepByte.fs --optimize+ - [] - let ``ForEachRangeStepByte_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepByte.fs SCFLAGS="--optimize+" # ForEachRangeStepByte.fs --optimize+ - [] - let ``ForEachRangeStepByte_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepChar.fs SCFLAGS="--optimize+" # ForEachRangeStepChar.fs --optimize+ - [] - let ``ForEachRangeStepChar_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepChar.fs SCFLAGS="--optimize+" # ForEachRangeStepChar.fs --optimize+ - [] - let ``ForEachRangeStepChar_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStepInt16.fs SCFLAGS="--optimize+" # ForEachRangeStepInt16.fs --optimize+ - [] - let ``ForEachRangeStepInt16_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepChar_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepInt16.fs SCFLAGS="--optimize+" # ForEachRangeStepInt16.fs --optimize+ - [] - let ``ForEachRangeStepInt16_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStepInt16_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepUInt16.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt16.fs --optimize+ - [] - let ``ForEachRangeStepUInt16_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepUInt16_`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepUInt16.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt16.fs --optimize+ - [] - let ``ForEachRangeStepUInt16_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStepInt32.fs SCFLAGS="--optimize+" # ForEachRangeStepInt32.fs --optimize+ - [] - let ``ForEachRangeStepInt32_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepInt32.fs SCFLAGS="--optimize+" # ForEachRangeStepInt32.fs --optimize+ - [] - let ``ForEachRangeStepInt32_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStepInt32_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepUInt32.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt32.fs --optimize+ - [] - let ``ForEachRangeStepUInt32_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepUInt32.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt32.fs --optimize+ - [] - let ``ForEachRangeStepUInt32_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStepInt64.fs SCFLAGS="--optimize+" # ForEachRangeStepInt64.fs --optimize+ - [] - let ``ForEachRangeStepInt64_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepUInt32_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepInt64.fs SCFLAGS="--optimize+" # ForEachRangeStepInt64.fs --optimize+ - [] - let ``ForEachRangeStepInt64_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStepInt64_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepUInt64.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt64.fs --optimize+ - [] - let ``ForEachRangeStepUInt64_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepUInt64_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepUInt64.fs SCFLAGS="--optimize+" # ForEachRangeStepUInt64.fs --optimize+ - [] - let ``ForEachRangeStepUInt64_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStepIntPtr.fs SCFLAGS="--optimize+" # ForEachRangeStepIntPtr.fs --optimize+ - [] - let ``ForEachRangeStepIntPtr_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepIntPtr.fs SCFLAGS="--optimize+" # ForEachRangeStepIntPtr.fs --optimize+ - [] - let ``ForEachRangeStepIntPtr_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStepIntPtr_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStepUIntPtr.fs SCFLAGS="--optimize+" # ForEachRangeStepUIntPtr.fs --optimize+ - [] - let ``ForEachRangeStepUIntPtr_fs_RealInternalSignatureOff_opt`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ForEachRangeStepUIntPtr.fs SCFLAGS="--optimize+" # ForEachRangeStepUIntPtr.fs --optimize+ - [] - let ``ForEachRangeStepUIntPtr_fs_RealInternalSignatureOn_opt`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ForEachRangeStep_UnitsOfMeasure.fs SCFLAGS="--optimize+" # ForEachRangeStep_UnitsOfMeasure.fs --optimize+ - [] - let ``ForEachRangeStep_UnitsOfMeasure_fs_RealInternalSignatureOff_opt`` compilation = + [] + let ``ForEachRangeStepUIntPtr_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ForEachRangeStep_UnitsOfMeasure.fs SCFLAGS="--optimize+" # ForEachRangeStep_UnitsOfMeasure.fs --optimize+ - [] - let ``ForEachRangeStep_UnitsOfMeasure_fs_RealInternalSignatureOn_opt`` compilation = + [] + let ``ForEachRangeStep_UnitsOfMeasure_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop02.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOff.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOff.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOn.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ForLoop03.fs.RealInternalSignatureOn.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoAllocationOfTuple01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable01.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable02.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NoIEnumerable03.fsx.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.opt.il.bsl deleted file mode 100644 index 7e035bf8d61..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.opt.il.bsl +++ /dev/null @@ -1,176 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.assembly assembly -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, - int32, - int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - - - -.class public abstract auto ansi sealed assembly - extends [runtime]System.Object -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::w@7 - IL_0005: ret - } - - .property int32[] r() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_r() - } - .property int32[] w() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_w() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly int32[] r@6 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 init@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 7 - .locals init (int32 V_0, - int32 V_1, - int32 V_2, - int32 V_3) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] ''.$assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] ''.$assembly::w@7 - IL_0018: ldc.i4.0 - IL_0019: stloc.1 - IL_001a: call int32[] assembly::get_r() - IL_001f: ldlen - IL_0020: conv.i4 - IL_0021: stloc.2 - IL_0022: call int32[] assembly::get_w() - IL_0027: ldlen - IL_0028: conv.i4 - IL_0029: stloc.3 - IL_002a: ldloc.2 - IL_002b: ldloc.3 - IL_002c: bge.s IL_0032 - - IL_002e: ldloc.2 - IL_002f: nop - IL_0030: br.s IL_0034 - - IL_0032: ldloc.3 - IL_0033: nop - IL_0034: ldc.i4.1 - IL_0035: sub - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ldloc.1 - IL_0039: blt.s IL_0067 - - IL_003b: call int32[] assembly::get_r() - IL_0040: ldloc.1 - IL_0041: call int32[] assembly::get_r() - IL_0046: ldloc.1 - IL_0047: ldelem [runtime]System.Int32 - IL_004c: call int32[] assembly::get_w() - IL_0051: ldloc.1 - IL_0052: ldelem [runtime]System.Int32 - IL_0057: add - IL_0058: stelem [runtime]System.Int32 - IL_005d: ldloc.1 - IL_005e: ldc.i4.1 - IL_005f: add - IL_0060: stloc.1 - IL_0061: ldloc.1 - IL_0062: ldloc.0 - IL_0063: ldc.i4.1 - IL_0064: add - IL_0065: bne.un.s IL_003b - - IL_0067: nop - IL_0068: nop - IL_0069: call int32[] assembly::get_r() - IL_006e: ldc.i4.0 - IL_006f: ldelem [runtime]System.Int32 - IL_0074: ldc.i4.3 - IL_0075: bne.un.s IL_007b - - IL_0077: ldc.i4.0 - IL_0078: nop - IL_0079: br.s IL_007d - - IL_007b: ldc.i4.1 - IL_007c: nop - IL_007d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0082: pop - IL_0083: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.opt.il.bsl deleted file mode 100644 index fd8662b1ca5..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.opt.il.bsl +++ /dev/null @@ -1,195 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.assembly assembly -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, - int32, - int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - - - -.class public abstract auto ansi sealed assembly - extends [runtime]System.Object -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .field static assembly int32[] r@6 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 - IL_0005: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret - } - - .method assembly specialname static void staticInitialization@() cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - int32 V_1, - int32 V_2, - int32 V_3) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] assembly::w@7 - IL_0018: ldc.i4.0 - IL_0019: stloc.1 - IL_001a: call int32[] assembly::get_r() - IL_001f: ldlen - IL_0020: conv.i4 - IL_0021: stloc.2 - IL_0022: call int32[] assembly::get_w() - IL_0027: ldlen - IL_0028: conv.i4 - IL_0029: stloc.3 - IL_002a: ldloc.2 - IL_002b: ldloc.3 - IL_002c: bge.s IL_0032 - - IL_002e: ldloc.2 - IL_002f: nop - IL_0030: br.s IL_0034 - - IL_0032: ldloc.3 - IL_0033: nop - IL_0034: ldc.i4.1 - IL_0035: sub - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ldloc.1 - IL_0039: blt.s IL_0067 - - IL_003b: call int32[] assembly::get_r() - IL_0040: ldloc.1 - IL_0041: call int32[] assembly::get_r() - IL_0046: ldloc.1 - IL_0047: ldelem [runtime]System.Int32 - IL_004c: call int32[] assembly::get_w() - IL_0051: ldloc.1 - IL_0052: ldelem [runtime]System.Int32 - IL_0057: add - IL_0058: stelem [runtime]System.Int32 - IL_005d: ldloc.1 - IL_005e: ldc.i4.1 - IL_005f: add - IL_0060: stloc.1 - IL_0061: ldloc.1 - IL_0062: ldloc.0 - IL_0063: ldc.i4.1 - IL_0064: add - IL_0065: bne.un.s IL_003b - - IL_0067: nop - IL_0068: nop - IL_0069: call int32[] assembly::get_r() - IL_006e: ldc.i4.0 - IL_006f: ldelem [runtime]System.Int32 - IL_0074: ldc.i4.3 - IL_0075: bne.un.s IL_007b - - IL_0077: ldc.i4.0 - IL_0078: nop - IL_0079: br.s IL_007d - - IL_007b: ldc.i4.1 - IL_007c: nop - IL_007d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0082: pop - IL_0083: ret - } - - .property int32[] r() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_r() - } - .property int32[] w() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_w() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly int32 init@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: call void assembly::staticInitialization@() - IL_0005: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.opt.il.bsl deleted file mode 100644 index 91f26499736..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.opt.il.bsl +++ /dev/null @@ -1,174 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.assembly assembly -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, - int32, - int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - - - -.class public abstract auto ansi sealed assembly - extends [runtime]System.Object -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::w@7 - IL_0005: ret - } - - .property int32[] r() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_r() - } - .property int32[] w() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_w() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly int32[] r@6 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 init@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 7 - .locals init (int32 V_0, - int32 V_1) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] ''.$assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] ''.$assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stloc.0 - IL_0020: call int32[] assembly::get_w() - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: stloc.1 - IL_0028: ldloc.0 - IL_0029: ldloc.1 - IL_002a: bge.s IL_0030 - - IL_002c: ldloc.0 - IL_002d: nop - IL_002e: br.s IL_0032 - - IL_0030: ldloc.1 - IL_0031: nop - IL_0032: ldc.i4.1 - IL_0033: sub - IL_0034: stloc.1 - IL_0035: ldc.i4.0 - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ldloc.1 - IL_0039: bgt.s IL_0067 - - IL_003b: call int32[] assembly::get_r() - IL_0040: ldloc.1 - IL_0041: call int32[] assembly::get_r() - IL_0046: ldloc.1 - IL_0047: ldelem [runtime]System.Int32 - IL_004c: call int32[] assembly::get_w() - IL_0051: ldloc.1 - IL_0052: ldelem [runtime]System.Int32 - IL_0057: add - IL_0058: stelem [runtime]System.Int32 - IL_005d: ldloc.1 - IL_005e: ldc.i4.1 - IL_005f: sub - IL_0060: stloc.1 - IL_0061: ldloc.1 - IL_0062: ldloc.0 - IL_0063: ldc.i4.1 - IL_0064: sub - IL_0065: bne.un.s IL_003b - - IL_0067: nop - IL_0068: nop - IL_0069: call int32[] assembly::get_r() - IL_006e: ldc.i4.0 - IL_006f: ldelem [runtime]System.Int32 - IL_0074: ldc.i4.3 - IL_0075: bne.un.s IL_007b - - IL_0077: ldc.i4.0 - IL_0078: nop - IL_0079: br.s IL_007d - - IL_007b: ldc.i4.1 - IL_007c: nop - IL_007d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0082: pop - IL_0083: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.opt.il.bsl deleted file mode 100644 index f89292af139..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.opt.il.bsl +++ /dev/null @@ -1,193 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.assembly assembly -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, - int32, - int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - - - -.class public abstract auto ansi sealed assembly - extends [runtime]System.Object -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .field static assembly int32[] r@6 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 - IL_0005: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret - } - - .method assembly specialname static void staticInitialization@() cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - int32 V_1) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stloc.0 - IL_0020: call int32[] assembly::get_w() - IL_0025: ldlen - IL_0026: conv.i4 - IL_0027: stloc.1 - IL_0028: ldloc.0 - IL_0029: ldloc.1 - IL_002a: bge.s IL_0030 - - IL_002c: ldloc.0 - IL_002d: nop - IL_002e: br.s IL_0032 - - IL_0030: ldloc.1 - IL_0031: nop - IL_0032: ldc.i4.1 - IL_0033: sub - IL_0034: stloc.1 - IL_0035: ldc.i4.0 - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ldloc.1 - IL_0039: bgt.s IL_0067 - - IL_003b: call int32[] assembly::get_r() - IL_0040: ldloc.1 - IL_0041: call int32[] assembly::get_r() - IL_0046: ldloc.1 - IL_0047: ldelem [runtime]System.Int32 - IL_004c: call int32[] assembly::get_w() - IL_0051: ldloc.1 - IL_0052: ldelem [runtime]System.Int32 - IL_0057: add - IL_0058: stelem [runtime]System.Int32 - IL_005d: ldloc.1 - IL_005e: ldc.i4.1 - IL_005f: sub - IL_0060: stloc.1 - IL_0061: ldloc.1 - IL_0062: ldloc.0 - IL_0063: ldc.i4.1 - IL_0064: sub - IL_0065: bne.un.s IL_003b - - IL_0067: nop - IL_0068: nop - IL_0069: call int32[] assembly::get_r() - IL_006e: ldc.i4.0 - IL_006f: ldelem [runtime]System.Int32 - IL_0074: ldc.i4.3 - IL_0075: bne.un.s IL_007b - - IL_0077: ldc.i4.0 - IL_0078: nop - IL_0079: br.s IL_007d - - IL_007b: ldc.i4.1 - IL_007c: nop - IL_007d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0082: pop - IL_0083: ret - } - - .property int32[] r() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_r() - } - .property int32[] w() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_w() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly int32 init@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: call void assembly::staticInitialization@() - IL_0005: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.opt.il.bsl deleted file mode 100644 index 618ba09189f..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.opt.il.bsl +++ /dev/null @@ -1,304 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.assembly assembly -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, - int32, - int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - - - -.class public abstract auto ansi sealed assembly - extends [runtime]System.Object -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::w@7 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0005: ret - } - - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0006: ret - } - - .method assembly specialname static int32 get_e1@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::e1@1 - IL_0005: ret - } - - .method assembly specialname static int32 get_e2@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::e2@1 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_next@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_0005: ret - } - - .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_0006: ret - } - - .property int32[] r() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_r() - } - .property int32[] w() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_w() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - current@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - } - .property int32 e1@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e1@1() - } - .property int32 e2@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e2@1() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - next@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly int32[] r@6 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 current@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e1@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e2@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 next@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 init@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 7 - .locals init (int32 V_0, - uint64 V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - uint64 V_3, - int32 V_4) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] ''.$assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] ''.$assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stsfld int32 ''.$assembly::e1@1 - IL_0024: call int32[] assembly::get_w() - IL_0029: ldlen - IL_002a: conv.i4 - IL_002b: stsfld int32 ''.$assembly::e2@1 - IL_0030: call int32 assembly::get_e1@1() - IL_0035: call int32 assembly::get_e2@1() - IL_003a: bge.s IL_0044 - - IL_003c: call int32 assembly::get_e1@1() - IL_0041: nop - IL_0042: br.s IL_004a - - IL_0044: call int32 assembly::get_e2@1() - IL_0049: nop - IL_004a: ldc.i4.1 - IL_004b: sub - IL_004c: stloc.0 - IL_004d: ldloc.0 - IL_004e: ldc.i4.0 - IL_004f: bge.s IL_0056 - - IL_0051: ldc.i4.0 - IL_0052: conv.i8 - IL_0053: nop - IL_0054: br.s IL_005e - - IL_0056: ldloc.0 - IL_0057: ldc.i4.0 - IL_0058: sub - IL_0059: conv.i8 - IL_005a: ldc.i4.1 - IL_005b: conv.i8 - IL_005c: add - IL_005d: nop - IL_005e: stloc.1 - IL_005f: ldc.i4.0 - IL_0060: conv.i8 - IL_0061: stloc.3 - IL_0062: ldc.i4.0 - IL_0063: stloc.s V_4 - IL_0065: br.s IL_007c - - IL_0067: ldloca.s V_2 - IL_0069: ldloc.s V_4 - IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0070: nop - IL_0071: ldloc.s V_4 - IL_0073: ldc.i4.1 - IL_0074: add - IL_0075: stloc.s V_4 - IL_0077: ldloc.3 - IL_0078: ldc.i4.1 - IL_0079: conv.i8 - IL_007a: add - IL_007b: stloc.3 - IL_007c: ldloc.3 - IL_007d: ldloc.1 - IL_007e: blt.un.s IL_0067 - - IL_0080: ldloca.s V_2 - IL_0082: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0087: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_0091: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0096: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_009b: br.s IL_00e3 - - IL_009d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00a2: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00a7: stloc.0 - IL_00a8: call int32[] assembly::get_r() - IL_00ad: ldloc.0 - IL_00ae: call int32[] assembly::get_r() - IL_00b3: ldloc.0 - IL_00b4: ldelem [runtime]System.Int32 - IL_00b9: call int32[] assembly::get_w() - IL_00be: ldloc.0 - IL_00bf: ldelem [runtime]System.Int32 - IL_00c4: add - IL_00c5: stelem [runtime]System.Int32 - IL_00ca: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00cf: call void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00d4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00d9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00de: call void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00e8: brtrue.s IL_009d - - IL_00ea: nop - IL_00eb: nop - IL_00ec: call int32[] assembly::get_r() - IL_00f1: ldc.i4.0 - IL_00f2: ldelem [runtime]System.Int32 - IL_00f7: ldc.i4.3 - IL_00f8: bne.un.s IL_00fe - - IL_00fa: ldc.i4.0 - IL_00fb: nop - IL_00fc: br.s IL_0100 - - IL_00fe: ldc.i4.1 - IL_00ff: nop - IL_0100: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0105: pop - IL_0106: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.opt.il.bsl deleted file mode 100644 index 7838a9c7d69..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.opt.il.bsl +++ /dev/null @@ -1,323 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.assembly assembly -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, - int32, - int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - - - -.class public abstract auto ansi sealed assembly - extends [runtime]System.Object -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .field static assembly int32[] r@6 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 current@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e1@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e2@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 next@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0005: ret - } - - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0006: ret - } - - .method assembly specialname static int32 get_e1@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 assembly::e1@1 - IL_0005: ret - } - - .method assembly specialname static int32 get_e2@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 assembly::e2@1 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_next@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_0005: ret - } - - .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret - } - - .method assembly specialname static void staticInitialization@() cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - uint64 V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - uint64 V_3, - int32 V_4) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stsfld int32 assembly::e1@1 - IL_0024: call int32[] assembly::get_w() - IL_0029: ldlen - IL_002a: conv.i4 - IL_002b: stsfld int32 assembly::e2@1 - IL_0030: call int32 assembly::get_e1@1() - IL_0035: call int32 assembly::get_e2@1() - IL_003a: bge.s IL_0044 - - IL_003c: call int32 assembly::get_e1@1() - IL_0041: nop - IL_0042: br.s IL_004a - - IL_0044: call int32 assembly::get_e2@1() - IL_0049: nop - IL_004a: ldc.i4.1 - IL_004b: sub - IL_004c: stloc.0 - IL_004d: ldloc.0 - IL_004e: ldc.i4.0 - IL_004f: bge.s IL_0056 - - IL_0051: ldc.i4.0 - IL_0052: conv.i8 - IL_0053: nop - IL_0054: br.s IL_005e - - IL_0056: ldloc.0 - IL_0057: ldc.i4.0 - IL_0058: sub - IL_0059: conv.i8 - IL_005a: ldc.i4.1 - IL_005b: conv.i8 - IL_005c: add - IL_005d: nop - IL_005e: stloc.1 - IL_005f: ldc.i4.0 - IL_0060: conv.i8 - IL_0061: stloc.3 - IL_0062: ldc.i4.0 - IL_0063: stloc.s V_4 - IL_0065: br.s IL_007c - - IL_0067: ldloca.s V_2 - IL_0069: ldloc.s V_4 - IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0070: nop - IL_0071: ldloc.s V_4 - IL_0073: ldc.i4.1 - IL_0074: add - IL_0075: stloc.s V_4 - IL_0077: ldloc.3 - IL_0078: ldc.i4.1 - IL_0079: conv.i8 - IL_007a: add - IL_007b: stloc.3 - IL_007c: ldloc.3 - IL_007d: ldloc.1 - IL_007e: blt.un.s IL_0067 - - IL_0080: ldloca.s V_2 - IL_0082: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0087: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_0091: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0096: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_009b: br.s IL_00e3 - - IL_009d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00a2: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00a7: stloc.0 - IL_00a8: call int32[] assembly::get_r() - IL_00ad: ldloc.0 - IL_00ae: call int32[] assembly::get_r() - IL_00b3: ldloc.0 - IL_00b4: ldelem [runtime]System.Int32 - IL_00b9: call int32[] assembly::get_w() - IL_00be: ldloc.0 - IL_00bf: ldelem [runtime]System.Int32 - IL_00c4: add - IL_00c5: stelem [runtime]System.Int32 - IL_00ca: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00cf: call void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00d4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00d9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00de: call void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00e8: brtrue.s IL_009d - - IL_00ea: nop - IL_00eb: nop - IL_00ec: call int32[] assembly::get_r() - IL_00f1: ldc.i4.0 - IL_00f2: ldelem [runtime]System.Int32 - IL_00f7: ldc.i4.3 - IL_00f8: bne.un.s IL_00fe - - IL_00fa: ldc.i4.0 - IL_00fb: nop - IL_00fc: br.s IL_0100 - - IL_00fe: ldc.i4.1 - IL_00ff: nop - IL_0100: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0105: pop - IL_0106: ret - } - - .property int32[] r() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_r() - } - .property int32[] w() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_w() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - current@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - } - .property int32 e1@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e1@1() - } - .property int32 e2@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e2@1() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - next@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly int32 init@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: call void assembly::staticInitialization@() - IL_0005: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.opt.il.bsl deleted file mode 100644 index cdb60cf3f61..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.opt.il.bsl +++ /dev/null @@ -1,304 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.assembly assembly -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, - int32, - int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - - - -.class public abstract auto ansi sealed assembly - extends [runtime]System.Object -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::w@7 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0005: ret - } - - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0006: ret - } - - .method assembly specialname static int32 get_e1@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::e1@1 - IL_0005: ret - } - - .method assembly specialname static int32 get_e2@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::e2@1 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_next@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_0005: ret - } - - .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_0006: ret - } - - .property int32[] r() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_r() - } - .property int32[] w() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_w() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - current@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - } - .property int32 e1@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e1@1() - } - .property int32 e2@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e2@1() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - next@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly int32[] r@6 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 current@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e1@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e2@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 next@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 init@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 7 - .locals init (int32 V_0, - uint64 V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - uint64 V_3, - int32 V_4) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] ''.$assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] ''.$assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stsfld int32 ''.$assembly::e1@1 - IL_0024: call int32[] assembly::get_w() - IL_0029: ldlen - IL_002a: conv.i4 - IL_002b: stsfld int32 ''.$assembly::e2@1 - IL_0030: call int32 assembly::get_e1@1() - IL_0035: call int32 assembly::get_e2@1() - IL_003a: bge.s IL_0044 - - IL_003c: call int32 assembly::get_e1@1() - IL_0041: nop - IL_0042: br.s IL_004a - - IL_0044: call int32 assembly::get_e2@1() - IL_0049: nop - IL_004a: ldc.i4.1 - IL_004b: sub - IL_004c: stloc.0 - IL_004d: ldloc.0 - IL_004e: ldc.i4.0 - IL_004f: bge.s IL_0056 - - IL_0051: ldc.i4.0 - IL_0052: conv.i8 - IL_0053: nop - IL_0054: br.s IL_005e - - IL_0056: ldloc.0 - IL_0057: ldc.i4.0 - IL_0058: sub - IL_0059: conv.i8 - IL_005a: ldc.i4.1 - IL_005b: conv.i8 - IL_005c: add - IL_005d: nop - IL_005e: stloc.1 - IL_005f: ldc.i4.0 - IL_0060: conv.i8 - IL_0061: stloc.3 - IL_0062: ldloc.0 - IL_0063: stloc.s V_4 - IL_0065: br.s IL_007c - - IL_0067: ldloca.s V_2 - IL_0069: ldloc.s V_4 - IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0070: nop - IL_0071: ldloc.s V_4 - IL_0073: ldc.i4.m1 - IL_0074: add - IL_0075: stloc.s V_4 - IL_0077: ldloc.3 - IL_0078: ldc.i4.1 - IL_0079: conv.i8 - IL_007a: add - IL_007b: stloc.3 - IL_007c: ldloc.3 - IL_007d: ldloc.1 - IL_007e: blt.un.s IL_0067 - - IL_0080: ldloca.s V_2 - IL_0082: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0087: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_0091: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0096: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::next@9 - IL_009b: br.s IL_00e3 - - IL_009d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00a2: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00a7: stloc.0 - IL_00a8: call int32[] assembly::get_r() - IL_00ad: ldloc.0 - IL_00ae: call int32[] assembly::get_r() - IL_00b3: ldloc.0 - IL_00b4: ldelem [runtime]System.Int32 - IL_00b9: call int32[] assembly::get_w() - IL_00be: ldloc.0 - IL_00bf: ldelem [runtime]System.Int32 - IL_00c4: add - IL_00c5: stelem [runtime]System.Int32 - IL_00ca: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00cf: call void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00d4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00d9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00de: call void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00e8: brtrue.s IL_009d - - IL_00ea: nop - IL_00eb: nop - IL_00ec: call int32[] assembly::get_r() - IL_00f1: ldc.i4.0 - IL_00f2: ldelem [runtime]System.Int32 - IL_00f7: ldc.i4.3 - IL_00f8: bne.un.s IL_00fe - - IL_00fa: ldc.i4.0 - IL_00fb: nop - IL_00fc: br.s IL_0100 - - IL_00fe: ldc.i4.1 - IL_00ff: nop - IL_0100: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0105: pop - IL_0106: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.opt.il.bsl deleted file mode 100644 index 33caf0bc8ca..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.opt.il.bsl +++ /dev/null @@ -1,323 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.assembly assembly -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, - int32, - int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - - - -.class public abstract auto ansi sealed assembly - extends [runtime]System.Object -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .field static assembly int32[] r@6 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 current@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e1@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 e2@1 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 next@9 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0005: ret - } - - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0006: ret - } - - .method assembly specialname static int32 get_e1@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 assembly::e1@1 - IL_0005: ret - } - - .method assembly specialname static int32 get_e2@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32 assembly::e2@1 - IL_0005: ret - } - - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_next@9() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_0005: ret - } - - .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret - } - - .method assembly specialname static void staticInitialization@() cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - uint64 V_1, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_2, - uint64 V_3, - int32 V_4) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] assembly::w@7 - IL_0018: call int32[] assembly::get_r() - IL_001d: ldlen - IL_001e: conv.i4 - IL_001f: stsfld int32 assembly::e1@1 - IL_0024: call int32[] assembly::get_w() - IL_0029: ldlen - IL_002a: conv.i4 - IL_002b: stsfld int32 assembly::e2@1 - IL_0030: call int32 assembly::get_e1@1() - IL_0035: call int32 assembly::get_e2@1() - IL_003a: bge.s IL_0044 - - IL_003c: call int32 assembly::get_e1@1() - IL_0041: nop - IL_0042: br.s IL_004a - - IL_0044: call int32 assembly::get_e2@1() - IL_0049: nop - IL_004a: ldc.i4.1 - IL_004b: sub - IL_004c: stloc.0 - IL_004d: ldloc.0 - IL_004e: ldc.i4.0 - IL_004f: bge.s IL_0056 - - IL_0051: ldc.i4.0 - IL_0052: conv.i8 - IL_0053: nop - IL_0054: br.s IL_005e - - IL_0056: ldloc.0 - IL_0057: ldc.i4.0 - IL_0058: sub - IL_0059: conv.i8 - IL_005a: ldc.i4.1 - IL_005b: conv.i8 - IL_005c: add - IL_005d: nop - IL_005e: stloc.1 - IL_005f: ldc.i4.0 - IL_0060: conv.i8 - IL_0061: stloc.3 - IL_0062: ldloc.0 - IL_0063: stloc.s V_4 - IL_0065: br.s IL_007c - - IL_0067: ldloca.s V_2 - IL_0069: ldloc.s V_4 - IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0070: nop - IL_0071: ldloc.s V_4 - IL_0073: ldc.i4.m1 - IL_0074: add - IL_0075: stloc.s V_4 - IL_0077: ldloc.3 - IL_0078: ldc.i4.1 - IL_0079: conv.i8 - IL_007a: add - IL_007b: stloc.3 - IL_007c: ldloc.3 - IL_007d: ldloc.1 - IL_007e: blt.un.s IL_0067 - - IL_0080: ldloca.s V_2 - IL_0082: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0087: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_0091: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0096: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 - IL_009b: br.s IL_00e3 - - IL_009d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00a2: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00a7: stloc.0 - IL_00a8: call int32[] assembly::get_r() - IL_00ad: ldloc.0 - IL_00ae: call int32[] assembly::get_r() - IL_00b3: ldloc.0 - IL_00b4: ldelem [runtime]System.Int32 - IL_00b9: call int32[] assembly::get_w() - IL_00be: ldloc.0 - IL_00bf: ldelem [runtime]System.Int32 - IL_00c4: add - IL_00c5: stelem [runtime]System.Int32 - IL_00ca: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00cf: call void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00d4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - IL_00d9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00de: call void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - IL_00e8: brtrue.s IL_009d - - IL_00ea: nop - IL_00eb: nop - IL_00ec: call int32[] assembly::get_r() - IL_00f1: ldc.i4.0 - IL_00f2: ldelem [runtime]System.Int32 - IL_00f7: ldc.i4.3 - IL_00f8: bne.un.s IL_00fe - - IL_00fa: ldc.i4.0 - IL_00fb: nop - IL_00fc: br.s IL_0100 - - IL_00fe: ldc.i4.1 - IL_00ff: nop - IL_0100: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0105: pop - IL_0106: ret - } - - .property int32[] r() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_r() - } - .property int32[] w() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_w() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - current@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_current@9() - } - .property int32 e1@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e1@1() - } - .property int32 e2@1() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32 assembly::get_e2@1() - } - .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - next@9() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .set void assembly::set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_next@9() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly int32 init@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: call void assembly::staticInitialization@() - IL_0005: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.opt.il.bsl deleted file mode 100644 index 5aca7747bda..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.opt.il.bsl +++ /dev/null @@ -1,215 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.assembly assembly -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, - int32, - int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - - - -.class public abstract auto ansi sealed assembly - extends [runtime]System.Object -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] ''.$assembly::w@7 - IL_0005: ret - } - - .property int32[] r() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_r() - } - .property int32[] w() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_w() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly int32[] r@6 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32 init@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 7 - .locals init (int32 V_0, - int32 V_1, - int32 V_2, - int32 V_3, - int32 V_4, - int32 V_5) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] ''.$assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] ''.$assembly::w@7 - IL_0018: ldc.i4.0 - IL_0019: stloc.1 - IL_001a: call int32[] assembly::get_r() - IL_001f: ldlen - IL_0020: conv.i4 - IL_0021: stloc.2 - IL_0022: call int32[] assembly::get_w() - IL_0027: ldlen - IL_0028: conv.i4 - IL_0029: stloc.3 - IL_002a: ldloc.2 - IL_002b: ldloc.3 - IL_002c: bge.s IL_0032 - - IL_002e: ldloc.2 - IL_002f: nop - IL_0030: br.s IL_0034 - - IL_0032: ldloc.3 - IL_0033: nop - IL_0034: ldc.i4.1 - IL_0035: sub - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ldloc.1 - IL_0039: blt.s IL_009a - - IL_003b: ldc.i4.0 - IL_003c: stloc.3 - IL_003d: call int32[] assembly::get_r() - IL_0042: ldlen - IL_0043: conv.i4 - IL_0044: stloc.s V_4 - IL_0046: call int32[] assembly::get_w() - IL_004b: ldlen - IL_004c: conv.i4 - IL_004d: stloc.s V_5 - IL_004f: ldloc.s V_4 - IL_0051: ldloc.s V_5 - IL_0053: bge.s IL_005a - - IL_0055: ldloc.s V_4 - IL_0057: nop - IL_0058: br.s IL_005d - - IL_005a: ldloc.s V_5 - IL_005c: nop - IL_005d: ldc.i4.1 - IL_005e: sub - IL_005f: stloc.2 - IL_0060: ldloc.2 - IL_0061: ldloc.3 - IL_0062: blt.s IL_0090 - - IL_0064: call int32[] assembly::get_r() - IL_0069: ldloc.3 - IL_006a: call int32[] assembly::get_r() - IL_006f: ldloc.3 - IL_0070: ldelem [runtime]System.Int32 - IL_0075: call int32[] assembly::get_w() - IL_007a: ldloc.3 - IL_007b: ldelem [runtime]System.Int32 - IL_0080: add - IL_0081: stelem [runtime]System.Int32 - IL_0086: ldloc.3 - IL_0087: ldc.i4.1 - IL_0088: add - IL_0089: stloc.3 - IL_008a: ldloc.3 - IL_008b: ldloc.2 - IL_008c: ldc.i4.1 - IL_008d: add - IL_008e: bne.un.s IL_0064 - - IL_0090: ldloc.1 - IL_0091: ldc.i4.1 - IL_0092: add - IL_0093: stloc.1 - IL_0094: ldloc.1 - IL_0095: ldloc.0 - IL_0096: ldc.i4.1 - IL_0097: add - IL_0098: bne.un.s IL_003b - - IL_009a: nop - IL_009b: nop - IL_009c: call int32[] assembly::get_r() - IL_00a1: ldc.i4.0 - IL_00a2: ldelem [runtime]System.Int32 - IL_00a7: ldc.i4.s 11 - IL_00a9: bne.un.s IL_00af - - IL_00ab: ldc.i4.0 - IL_00ac: nop - IL_00ad: br.s IL_00b1 - - IL_00af: ldc.i4.1 - IL_00b0: nop - IL_00b1: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_00b6: pop - IL_00b7: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.opt.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.opt.il.bsl deleted file mode 100644 index edd7456baca..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.opt.il.bsl +++ /dev/null @@ -1,234 +0,0 @@ - - - - - -.assembly extern runtime { } -.assembly extern FSharp.Core { } -.assembly assembly -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, - int32, - int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - - - - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - -} -.module assembly.exe - -.imagebase {value} -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - - - - - -.class public abstract auto ansi sealed assembly - extends [runtime]System.Object -{ - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .field static assembly int32[] r@6 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly int32[] w@7 - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method public specialname static int32[] get_r() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::r@6 - IL_0005: ret - } - - .method public specialname static int32[] get_w() cil managed - { - - .maxstack 8 - IL_0000: ldsfld int32[] assembly::w@7 - IL_0005: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret - } - - .method assembly specialname static void staticInitialization@() cil managed - { - - .maxstack 7 - .locals init (int32 V_0, - int32 V_1, - int32 V_2, - int32 V_3, - int32 V_4, - int32 V_5) - IL_0000: ldc.i4.8 - IL_0001: ldc.i4.1 - IL_0002: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0007: stsfld int32[] assembly::r@6 - IL_000c: ldc.i4.5 - IL_000d: ldc.i4.2 - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, - !!0) - IL_0013: stsfld int32[] assembly::w@7 - IL_0018: ldc.i4.0 - IL_0019: stloc.1 - IL_001a: call int32[] assembly::get_r() - IL_001f: ldlen - IL_0020: conv.i4 - IL_0021: stloc.2 - IL_0022: call int32[] assembly::get_w() - IL_0027: ldlen - IL_0028: conv.i4 - IL_0029: stloc.3 - IL_002a: ldloc.2 - IL_002b: ldloc.3 - IL_002c: bge.s IL_0032 - - IL_002e: ldloc.2 - IL_002f: nop - IL_0030: br.s IL_0034 - - IL_0032: ldloc.3 - IL_0033: nop - IL_0034: ldc.i4.1 - IL_0035: sub - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ldloc.1 - IL_0039: blt.s IL_009a - - IL_003b: ldc.i4.0 - IL_003c: stloc.3 - IL_003d: call int32[] assembly::get_r() - IL_0042: ldlen - IL_0043: conv.i4 - IL_0044: stloc.s V_4 - IL_0046: call int32[] assembly::get_w() - IL_004b: ldlen - IL_004c: conv.i4 - IL_004d: stloc.s V_5 - IL_004f: ldloc.s V_4 - IL_0051: ldloc.s V_5 - IL_0053: bge.s IL_005a - - IL_0055: ldloc.s V_4 - IL_0057: nop - IL_0058: br.s IL_005d - - IL_005a: ldloc.s V_5 - IL_005c: nop - IL_005d: ldc.i4.1 - IL_005e: sub - IL_005f: stloc.2 - IL_0060: ldloc.2 - IL_0061: ldloc.3 - IL_0062: blt.s IL_0090 - - IL_0064: call int32[] assembly::get_r() - IL_0069: ldloc.3 - IL_006a: call int32[] assembly::get_r() - IL_006f: ldloc.3 - IL_0070: ldelem [runtime]System.Int32 - IL_0075: call int32[] assembly::get_w() - IL_007a: ldloc.3 - IL_007b: ldelem [runtime]System.Int32 - IL_0080: add - IL_0081: stelem [runtime]System.Int32 - IL_0086: ldloc.3 - IL_0087: ldc.i4.1 - IL_0088: add - IL_0089: stloc.3 - IL_008a: ldloc.3 - IL_008b: ldloc.2 - IL_008c: ldc.i4.1 - IL_008d: add - IL_008e: bne.un.s IL_0064 - - IL_0090: ldloc.1 - IL_0091: ldc.i4.1 - IL_0092: add - IL_0093: stloc.1 - IL_0094: ldloc.1 - IL_0095: ldloc.0 - IL_0096: ldc.i4.1 - IL_0097: add - IL_0098: bne.un.s IL_003b - - IL_009a: nop - IL_009b: nop - IL_009c: call int32[] assembly::get_r() - IL_00a1: ldc.i4.0 - IL_00a2: ldelem [runtime]System.Int32 - IL_00a7: ldc.i4.s 11 - IL_00a9: bne.un.s IL_00af - - IL_00ab: ldc.i4.0 - IL_00ac: nop - IL_00ad: br.s IL_00b1 - - IL_00af: ldc.i4.1 - IL_00b0: nop - IL_00b1: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_00b6: pop - IL_00b7: ret - } - - .property int32[] r() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_r() - } - .property int32[] w() - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) - .get int32[] assembly::get_w() - } -} - -.class private abstract auto ansi sealed ''.$assembly - extends [runtime]System.Object -{ - .field static assembly int32 init@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method public static void main@() cil managed - { - .entrypoint - - .maxstack 8 - IL_0000: call void assembly::staticInitialization@() - IL_0005: ret - } - -} - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOff.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOn.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ZeroToArrLength02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOff.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOff.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOn.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOn.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOn.fs deleted file mode 100644 index 446e373977c..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04_RealInternalSignatureOn.fs +++ /dev/null @@ -1,4 +0,0 @@ -// #Regression #NoMono #NoMT #CodeGen #EmittedIL -// Regression test for FSHARP1.0:5646 - -let squaresOfOneToTenD = [ for x in 0 .. 10 -> x * x ] diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GeneratedIterators.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GeneratedIterators.fs index 68899c67afe..af3285700d9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GeneratedIterators.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GeneratedIterators.fs @@ -17,33 +17,29 @@ module GeneratedIterators = |> verifyILBaseline // SOURCE=GenIter01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenIter01.exe" # GenIter01.fs - - [] + [] let ``GenIter01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=GenIter02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenIter02.exe" # GenIter02.fs - - [] + [] let ``GenIter02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=GenIter03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenIter03.exe" # GenIter03.fs - - [] + [] let ``GenIter03_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=GenIter04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenIter04.exe" # GenIter04.fs - - [] - let ``GenIter04_RealInternalSignatureOff_fs`` compilation = + [] + let ``GenIter04_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=GenIter04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenIter04.exe" # GenIter04.fs - - [] - let ``GenIter04_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/GenericComparison.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/GenericComparison.fs index 2fc23ad345b..a17856a7da3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/GenericComparison.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/GenericComparison.fs @@ -17,274 +17,319 @@ module GenericComparison = |> verifyILBaseline // SOURCE=Compare01.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare01.dll" # Compare01.fs - - [] + [] let ``Compare01_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare02.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare02.dll" # Compare02.fs - - [] + [] let ``Compare02_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare03.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare03.dll" # Compare03.fs - - [] + [] let ``Compare03_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare04.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare04.dll" # Compare04.fs - - [] + [] let ``Compare04_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare05.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare05.dll" # Compare05.fs - - [] + [] let ``Compare05_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare06.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare06.dll" # Compare06.fs - - [] + [] let ``Compare06_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare07.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare07.dll" # Compare07.fs - - [] + [] let ``Compare07_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare08.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare08.dll" # Compare08.fs - [] + [] let ``Compare08_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare09.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare09.dll" # Compare09.fs - [] + [] let ``Compare09_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare10.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare10.dll" # Compare10.fs - - [] + [] let ``Compare10_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Compare11.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Compare11.dll" # Compare11.fs - - [] + [] let ``Compare11_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash01.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash01.dll" # Hash01.fs - - [] + [] let ``Hash01_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash02.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash02.dll" # Hash02.fs - - [] + [] let ``Hash02_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash03.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash03.dll" # Hash03.fs - - [] + [] let ``Hash03_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash04.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash04.dll" # Hash04.fs - - [] + [] let ``Hash04_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash05.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash05.dll" # Hash05.fs - - [] + [] let ``Hash05_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash06.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash06.dll" # Hash06.fs - - [] + [] let ``Hash06_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash07.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash07.dll" # Hash07.fs - [] + [] let ``Hash07_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash08.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash08.dll" # Hash08.fs - - [] + [] let ``Hash08_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash09.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash09.dll" # Hash09.fs - - [] + [] let ``Hash09_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash10.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash10.dll" # Hash10.fs - [] + [] let ``Hash10_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash11.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash11.dll" # Hash11.fs - [] + [] let ``Hash11_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Hash12.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Hash12.dll" # Hash12.fs - - [] + [] let ``Hash12_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals01.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals01.dll" # Equals01.fs - - [] + [] let ``Equals01_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals02.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals02.dll" # Equals02.fs - - [] + [] let ``Equals02_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals03.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals03.dll" # Equals03.fs - - [] + [] let ``Equals03_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals04.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals04.dll" # Equals04.fs - - [] + [] let ``Equals04_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals05.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals05.dll" # Equals05.fs - - [] + [] let ``Equals05_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals06.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals06.dll" # Equals06.fs - - [] + [] let ``Equals06_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals07.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals07.dll" # Equals07.fs - - [] + [] let ``Equals07_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals08.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals08.dll" # Equals08.fs - - [] + [] let ``Equals08_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals09.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals09.dll" # Equals09.fs - - [] + [] let ``Equals09_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals10.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals10.dll" # Equals10.fs - - [] + [] let ``Equals10_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals11.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals11.dll" # Equals11.fs - - [] + [] let ``Equals11_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals12.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals12.dll" # Equals12.fs - - [] + [] let ``Equals12_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals13.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals13.dll" # Equals13.fs - - [] + [] let ``Equals13_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals14.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals14.dll" # Equals14.fs - - [] + [] let ``Equals14_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals15.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals15.dll" # Equals15.fs - - [] + [] let ``Equals15_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals16.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals16.dll" # Equals16.fs - - [] + [] let ``Equals16_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals17.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals17.dll" # Equals17.fs - - [] + [] let ``Equals17_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals18.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals18.dll" # Equals18.fs - - [] + [] let ``Equals18_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals19.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals19.dll" # Equals19.fs - - [] + [] let ``Equals19_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals20.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals20.dll" # Equals20.fs - - [] + [] let ``Equals20_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equals21.fsx SCFLAGS="-a -g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Equals21.dll" # Equals21.fs - - [] + [] let ``Equals21_fsx`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``NativeIntComparison_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptimize |> withEmbeddedPdb @@ -292,9 +337,10 @@ module GenericComparison = |> compileAndRun |> shouldSucceed - [] + [] let ``VoidPtrComparison_fs`` compilation = compilation + |> getCompilation |> asExe |> withOptimize |> withEmbeddedPdb diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/InequalityComparison/InequalityComparison.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/InequalityComparison/InequalityComparison.fs index fb28c1eff54..03c94f28b5d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/InequalityComparison/InequalityComparison.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/InequalityComparison/InequalityComparison.fs @@ -17,32 +17,37 @@ module InequalityComparison = |> verifyILBaseline // SOURCE=InequalityComparison01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd InequalityComparison01.exe" # x <= y - [] + [] let ``InequalityComparison01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=InequalityComparison02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd InequalityComparison02.exe" # x >= y - [] + [] let ``InequalityComparison02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=InequalityComparison03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd InequalityComparison03.exe" # x < y - [] + [] let ``InequalityComparison03_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=InequalityComparison04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd InequalityComparison04.exe" # x > y - [] + [] let ``InequalityComparison04_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=InequalityComparison05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd InequalityComparison05.exe" # if (x > y) then ... else ... - [] + [] let ``InequalityComparison05_fs`` compilation = compilation + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs index 391faa9067a..d226b4dc25f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Inlining.fs @@ -21,32 +21,26 @@ module Inlining = |> withOptions [if realSig then "--realsig+" else "--realsig-" ] // SOURCE=Match01.fs SCFLAGS="-a --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Match01.dll" # Match01.fs - [] - let ``Match01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Match01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=Match01.fs SCFLAGS="-a --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Match01.dll" # Match01.fs - [] - let ``Match01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=Match02.fs SCFLAGS="-a --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Match02.dll" # Match02.fs - [] + [] let ``Match02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=StructUnion01.fs SCFLAGS="-a --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StructUnion01.dll" # StructUnion01.fs - [] + [] let ``StructUnion01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] let ``List contains inlining`` () = Fsx """module Test diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.net472.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.net472.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.net472.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.net472.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.netcore.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.netcore.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.netcore.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOff.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.netcore.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.net472.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs deleted file mode 100644 index 455b569c200..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01_RealInternalSignatureOn.fs +++ /dev/null @@ -1,18 +0,0 @@ -// #NoMono #CodeGen #Optimizations -module Match01 - -type Test1 = - | X11 of int - | X12 of int - | X13 of int - | X14 of int - -let select1 x = - match x with - | X11 x1 -> x1 - | X12 _ -> 2 - | X13 _ -> 3 - | X14 _ -> 4 - -// select1 is not supposed to be inlined here -let fm y = select1 y diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping.fs index abdc6368d11..120d3a2ffd4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping.fs @@ -17,85 +17,44 @@ module ListExpressionStepping = |> verifyILBaseline // SOURCE=ListExpressionSteppingTest1.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest1.exe" # ListExpressionSteppingTest1.fs - - [] - let ``ListExpressionStepping01_RealInternalSignatureOn_fs`` compilation = + [] + let ``ListExpressionStepping01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ListExpressionSteppingTest1.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest1.exe" # ListExpressionSteppingTest1.fs - - [] - let ``ListExpressionStepping01_RealInternalSignatureOn_Off`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=ListExpressionSteppingTest2.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest2.exe" # ListExpressionSteppingTest2.fs - - [] - let ``ListExpressionStepping02_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=ListExpressionSteppingTest2.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest2.exe" # ListExpressionSteppingTest2.fs - - [] - let ``ListExpressionStepping02_RealInternalSignatureOff_fs`` compilation = + [] + let ``ListExpressionStepping02_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ListExpressionSteppingTest3.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest3.exe" # ListExpressionSteppingTest3.fs - [] + [] let ``ListExpressionStepping03_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ListExpressionSteppingTest3.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest3.exe" # ListExpressionSteppingTest3.fs - [] - let ``ListExpressionStepping03_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ListExpressionSteppingTest4.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest4.exe" # ListExpressionSteppingTest4.fs - - [] + [] let ``ListExpressionStepping04_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ListExpressionSteppingTest4.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest4.exe" # ListExpressionSteppingTest4.fs - - [] - let ``ListExpressionStepping04_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ListExpressionSteppingTest5.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest5.exe" # ListExpressionSteppingTest5.fs - - [] + [] let ``ListExpressionStepping05_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ListExpressionSteppingTest5.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest5.exe" # ListExpressionSteppingTest5.fs - - [] - let ``ListExpressionStepping05_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ListExpressionSteppingTest6.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest6.exe" # ListExpressionSteppingTest6.fs - - [] + [] let ``ListExpressionStepping06_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - // SOURCE=ListExpressionSteppingTest6.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ListExpressionSteppingTest6.exe" # ListExpressionSteppingTest6.fs - - [] - let ``ListExpressionStepping06_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.fs index bc83b54da00..9f3b2db8e02 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.fs @@ -17,63 +17,73 @@ module MethodImplAttribute = |> verifyILBaseline // SOURCE=MethodImplAttribute.ForwardRef.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.ForwardRef.dll" # MethodImplAttribute.ForwardRef.fs - [] + [] let ``ForwardRef_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=MethodImplAttribute.InternalCall.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.InternalCall.dll" # MethodImplAttribute.InternalCall.fs - [] + [] let ``InternalCall_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=MethodImplAttribute.NoInlining.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.NoInlining.dll" # MethodImplAttribute.NoInlining.fs - [] + [] let ``NoInlining_fs`` compilation = compilation + |> getCompilation |> verifyCompilation - [] + [] let ``NoInlining_fs with inline keyword => should warn in preview version`` compilation = compilation + |> getCompilation |> withLangVersion80 |> typecheck |> withSingleDiagnostic (Warning 3151, Line 3, Col 12, Line 3, Col 19, "This member, function or value declaration may not be declared 'inline'") - [] + [] let ``NoInlining_fs with inline keyword => should not warn in F# 7 or older`` compilation = compilation + |> getCompilation |> withLangVersion70 |> typecheck |> withDiagnostics [] // SOURCE=MethodImplAttribute.AggressiveInlining.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.AggressiveInlining.dll" # MethodImplAttribute.AggressiveInlining.fs - [] + [] let ``AggressiveInlining_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=MethodImplAttribute.NoOptimization.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.NoOptimization.dll" # MethodImplAttribute.NoOptimization.fs - [] + [] let ``NoOptimization_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=MethodImplAttribute.PreserveSig.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.PreserveSig.dll" # MethodImplAttribute.PreserveSig.fs - [] + [] let ``PreserveSig_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=MethodImplAttribute.Synchronized.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.Synchronized.dll" # MethodImplAttribute.Synchronized.fs - [] + [] let ``Synchronized_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=MethodImplAttribute.Unmanaged.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.Unmanaged.dll" # MethodImplAttribute.Unmanaged.fs - [] + [] let ``Unmanaged_fs`` compilation = compilation + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/IfThenElse01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/IfThenElse01.fs.RealInternalSignatureOn.il.bsl index 7a3b11fe451..44237b1f5c8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/IfThenElse01.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/IfThenElse01.fs.RealInternalSignatureOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -171,6 +161,45 @@ IL_002a: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: call char assembly/M::m() + IL_0005: pop + IL_0006: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: call void assembly/M::staticInitialization@() + IL_0005: ret } } @@ -187,9 +216,8 @@ .entrypoint .maxstack 8 - IL_0000: call char assembly/M::m() - IL_0005: pop - IL_0006: ret + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs index 5e8206137b1..4e759a26c95 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Misc.fs @@ -16,364 +16,204 @@ module Misc = |> ignoreWarnings |> verifyILBaseline - // SOURCE=AbstractClass.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd AbstractClass.exe" # AbstractClass.fs - [] + [] let ``AbstractClass_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=AbstractClass.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd AbstractClass.exe" # AbstractClass.fs - [] - let ``AbstractClass_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=AnonRecd.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd AnonRecd.exe" # AnonRecd.fs - [] + [] let ``AnonRecd_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation // SOURCE=CodeGenRenamings01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CodeGenRenamings01.exe" # CodeGenRenamings01.fs - - [] - let ``CodeGenRenamings01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=CodeGenRenamings01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CodeGenRenamings01.exe" # CodeGenRenamings01.fs - - [] - let ``CodeGenRenamings01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> asExe - |> verifyCompilation - - // SOURCE=ArgumentNamesInClosures01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ArgumentNamesInClosures01.dll" # ArgumentNamesInClosures01.fs - - [] - let ``ArgumentNamesInClosures01_RealInternalSignatureOn_fs`` compilation = + [] + let ``CodeGenRenamings01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> asExe |> verifyCompilation // SOURCE=ArgumentNamesInClosures01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ArgumentNamesInClosures01.dll" # ArgumentNamesInClosures01.fs - - [] - let ``ArgumentNamesInClosures01_RealInternalSignatureOff_fs`` compilation = + [] + let ``ArgumentNamesInClosures01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=Decimal01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Decimal01.exe" # Decimal01.fs - [] - let ``Decimal01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Decimal01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=Decimal01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Decimal01.exe" # Decimal01.fs - [] - let ``Decimal01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=EntryPoint01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd EntryPoint01.exe" # EntryPoint01.fs - [] + [] let ``EntryPoint01_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=EntryPoint01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd EntryPoint01.exe" # EntryPoint01.fs - [] - let ``EntryPoint01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=EqualsOnUnions01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd EqualsOnUnions01.exe" # EqualsOnUnions01.fs - - [] + [] let ``EqualsOnUnions01_fs`` compilation = compilation - |> asExe - |> verifyCompilation - - // SOURCE=ForLoop01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop01.exe" # ForLoop01.fs - - [] - let ``ForLoop01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=ForLoop01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop01.exe" # ForLoop01.fs - - [] - let ``ForLoop01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> asExe - |> verifyCompilation - - // SOURCE=ForLoop02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop02.exe" # ForLoop02.fs - [] - let ``ForLoop02_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=ForLoop02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop02.exe" # ForLoop02.fs - [] - let ``ForLoop02_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> asExe - |> verifyCompilation - - // SOURCE=ForLoop03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop03.exe" # ForLoop03.fs - [] - let ``ForLoop03_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=ForLoop03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ForLoop03.exe" # ForLoop03.fs - [] - let ``ForLoop03_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=NoBoxingOnDispose01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NoBoxingOnDispose01.exe" # NoBoxingOnDispose01.fs - [] + [] let ``NoBoxingOnDispose01_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation //SOURCE=IfThenElse01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd IfThenElse01.dll" # IfThenElse01.fs - [] - let ``IfThenElse01_RealInternalSignatureOn_fs`` compilation = + [] + let ``IfThenElse01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - //SOURCE=IfThenElse01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd IfThenElse01.dll" # IfThenElse01.fs - [] - let ``IfThenElse01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=LetIfThenElse01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd LetIfThenElse01.exe" # LetIfThenElse01.fs - - [] - let ``LetIfThenElse01_RealInternalSignatureOn_fs`` compilation = + [] + let ``LetIfThenElse01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=LetIfThenElse01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd LetIfThenElse01.exe" # LetIfThenElse01.fs - - [] - let ``LetIfThenElse01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=Lock01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Lock01.exe" # Lock01.fs - - [] - let ``Lock01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Lock01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=Lock01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Lock01.exe" # Lock01.fs - - [] - let ``Lock01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> asExe - |> verifyCompilation - - // SOURCE=ModuleWithExpression01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ModuleWithExpression01.exe" # ModuleWithExpression01.fs - [] - let ``ModuleWithExpression01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> asExe |> verifyCompilation // SOURCE=ModuleWithExpression01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ModuleWithExpression01.exe" # ModuleWithExpression01.fs - [] - let ``ModuleWithExpression01_RealInternalSignatureOff_fs`` compilation = + [] + let ``ModuleWithExpression01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=NonEscapingArguments02.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd NonEscapingArguments02.dll" # NonEscapingArguments02.fs - [] + [] let ``NonEscapingArguments02_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation // SOURCE=Seq_for_all01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Seq_for_all01.exe" # Seq_for_all01.fs - [] - let ``Seq_for_all01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=Seq_for_all01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Seq_for_all01.exe" # Seq_for_all01.fs - [] - let ``Seq_for_all01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> asExe - |> verifyCompilation - - // SOURCE=StructsAsArrayElements01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StructsAsArrayElements01.dll" # StructsAsArrayElements01.fs - - [] - let ``StructsAsArrayElements01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Seq_for_all01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> asExe |> verifyCompilation // SOURCE=StructsAsArrayElements01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StructsAsArrayElements01.dll" # StructsAsArrayElements01.fs - - [] - let ``StructsAsArrayElements01_RealInternalSignatureOff_fs`` compilation = + [] + let ``StructsAsArrayElements01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=PreserveSig.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd PreserveSig.dll" # PreserveSig.fs - - [] + [] let ``PreserveSig_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation // # The name of this test is a bit misleading for legacy reasons: it used to test the --no-generate-filter-blocks option, which is now gone // SOURCE=TryWith_NoFilterBlocks01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TryWith_NoFilterBlocks01.exe" # TryWith_NoFilterBlocks01.fs - [] + [] let ``TryWith_NoFilterBlocks01_RealInternalSignatureOn_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // # The name of this test is a bit misleading for legacy reasons: it used to test the --no-generate-filter-blocks option, which is now gone - // SOURCE=TryWith_NoFilterBlocks01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TryWith_NoFilterBlocks01.exe" # TryWith_NoFilterBlocks01.fs - [] - let ``TryWith_NoFilterBlocks01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=Structs01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Structs01.exe" # Structs01.fs - - [] + [] let ``Structs01_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation // SOURCE=Structs02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Structs02.exe" # Structs02.fs - - [] + [] let ``Structs02_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation - [] + [] let ``Structs02_asNetStandard20_fs`` compilation = compilation + |> getCompilation |>asLibrary |>asNetStandard20 |>verifyCompilation // SOURCE=Marshal.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Marshal.exe" # Marshal.fs - [] + [] let ``Marshal_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation // SOURCE=MethodImplNoInline02.fs SCFLAGS="-O" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplNoInline02.exe" # MethodImplNoInline02.fs - [] - let ``MethodImplNoInline02_RealInternalSignatureOn_fs`` compilation = + [] + let ``MethodImplNoInline02_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=MethodImplNoInline02.fs SCFLAGS="-O" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplNoInline02.exe" # MethodImplNoInline02.fs - [] - let ``MethodImplNoInline02_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> asExe - |> verifyCompilation - - // SOURCE=CustomAttributeGenericParameter01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CustomAttributeGenericParameter01.exe" # CustomAttributeGenericParameter01.fs - - [] - let ``CustomAttributeGenericParameter01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> asExe |> verifyCompilation // SOURCE=CustomAttributeGenericParameter01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd CustomAttributeGenericParameter01.exe" # CustomAttributeGenericParameter01.fs - - [] - let ``CustomAttributeGenericParameter01_RealInternalSignatureOff_fs`` compilation = + [] + let ``CustomAttributeGenericParameter01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation // SOURCE=GenericTypeStaticField.fs SCFLAGS="-g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenericTypeStaticField.exe" # GenericTypeStaticField.fs - - [] + [] let ``GenericTypeStaticField_fs`` compilation = compilation + |> getCompilation |> asExe |> verifyCompilation // SOURCE=GenericTypeStaticField.fs SCFLAGS="-g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GenericTypeStaticField.exe" # GenericTypeStaticField.fs - // SOURCE=GeneralizationOnUnions01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GeneralizationOnUnions01.exe" # GeneralizationOnUnions01.fs - [] - let ``GeneralizationOnUnions01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> asExe - |> verifyCompilation - - // SOURCE=GeneralizationOnUnions01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd GeneralizationOnUnions01.exe" # GeneralizationOnUnions01.fs - [] - let ``GeneralizationOnUnions01_RealInternalSignatureOff_fs`` compilation = + [] + let ``GeneralizationOnUnions01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> asExe |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullnessMetadata.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullnessMetadata.fs index f9878aa42de..bc2bcbf9154 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullnessMetadata.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullnessMetadata.fs @@ -1,148 +1,167 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -module EmittedIL.NullnessMetadata +namespace EmittedIL open Xunit open FSharp.Test open FSharp.Test.Compiler -type Optimize = Optimize | DoNotOptimize - -let verifyCompilation (o:Optimize) compilation = - compilation - |> withOptions ["--checknulls"] - |> (match o with | Optimize -> withOptimize | DoNotOptimize -> withNoOptimize) - |> withNoDebug - |> withNoInterfaceData - |> withNoOptimizationData - |> asLibrary - |> verifyILBaseline - -[] -let ``Nullable attr for module bindings`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for module functions`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for module functions optimize`` compilation = - compilation - |> verifyCompilation Optimize - -[] -let ``Nullable attr for curriedFunc optimize`` compilation = - compilation - |> verifyCompilation Optimize - -[] -let ``Nullable attr for anon records`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for records with generics`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for plain records`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for exception types`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for ref DUs`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for struct DUs`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for custom type`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable attr for Option clones`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Generic struct DU`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Nullable inheritance`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``Custom pipe`` compilation = - compilation - |> verifyCompilation DoNotOptimize - -[] -let ``SupportsNull`` compilation = - compilation - |> withNoWarn 52 - |> verifyCompilation DoNotOptimize - -[] -let ``GenericCode`` compilation = - compilation - |> withNoWarn 52 - |> verifyCompilation DoNotOptimize - -[] -let ``Downcasting and typetests`` compilation = - compilation - |> withNoWarn 52 - |> verifyCompilation DoNotOptimize - -[] -let ``Downcasting and typetests optimized`` compilation = - compilation - |> withNoWarn 52 - |> verifyCompilation Optimize - - -module Interop = - open System.IO - - let fsharpLibCreator = - FSharp - >> asLibrary - >> withName "MyFSharpLib" - >> withOptions ["--checknulls"] - - let csharpLibCompile fsLibReference = - CSharp - >> withReferences [fsLibReference] - >> withCSharpLanguageVersion CSharpLanguageVersion.Preview - >> asLibrary - >> withName "CsharpAppConsumingNullness" - >> compile - - let FsharpFromFile filename = - Path.Combine(__SOURCE_DIRECTORY__, filename) - |> File.ReadAllText - |> fsharpLibCreator - - [] - let ``Csharp understands option like type using UseNullAsTrueValue`` () = - let csharpCode = """ +module NullnessMetadata = + type Optimize = Optimize | DoNotOptimize + + let verifyCompilation (o:Optimize) compilation = + compilation + |> withOptions ["--checknulls"] + |> (match o with | Optimize -> withOptimize | DoNotOptimize -> withNoOptimize) + |> withNoDebug + |> withNoInterfaceData + |> withNoOptimizationData + |> asLibrary + |> verifyILBaseline + + [] + let ``Nullable attr for module bindings`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for module functions`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for module functions optimize`` compilation = + compilation + |> getCompilation + |> verifyCompilation Optimize + + [] + let ``Nullable attr for curriedFunc optimize`` compilation = + compilation + |> getCompilation + |> verifyCompilation Optimize + + [] + let ``Nullable attr for anon records`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for records with generics`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for plain records`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for exception types`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for ref DUs`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for struct DUs`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for custom type`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable attr for Option clones`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Generic struct DU`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Nullable inheritance`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``Custom pipe`` compilation = + compilation + |> getCompilation + |> verifyCompilation DoNotOptimize + + [] + let ``SupportsNull`` compilation = + compilation + |> getCompilation + |> withNoWarn 52 + |> verifyCompilation DoNotOptimize + + [] + let ``GenericCode`` compilation = + compilation + |> getCompilation + |> withNoWarn 52 + |> verifyCompilation DoNotOptimize + + [] + let ``Downcasting and typetests`` compilation = + compilation + |> getCompilation + |> withNoWarn 52 + |> verifyCompilation DoNotOptimize + + [] + let ``Downcasting and typetests optimized`` compilation = + compilation + |> withNoWarn 52 + |> verifyCompilation Optimize + + + module Interop = + open System.IO + + let fsharpLibCreator = + FSharp + >> asLibrary + >> withName "MyFSharpLib" + >> withOptions ["--checknulls"] + + let csharpLibCompile fsLibReference = + CSharp + >> withReferences [fsLibReference] + >> withCSharpLanguageVersion CSharpLanguageVersion.Preview + >> asLibrary + >> withName "CsharpAppConsumingNullness" + >> compile + + let FsharpFromFile filename = + Path.Combine(__SOURCE_DIRECTORY__, filename) + |> File.ReadAllText + |> fsharpLibCreator + + [] + let ``Csharp understands option like type using UseNullAsTrueValue`` () = + let csharpCode = """ using System; using static TestModule; using static Microsoft.FSharp.Core.FuncConvert; @@ -168,14 +187,14 @@ public class C { Console.WriteLine(MyOptionWhichCannotHaveNullInTheInside.NewMyNotNullSome("").ToString()); // should NOT warn } -}""" - csharpCode - |> csharpLibCompile (FsharpFromFile "NullAsTrueValue.fs") - |> withDiagnostics [ Warning 8602, Line 12, Col 27, Line 12, Col 37, "Dereference of a possibly null reference."] - - [] - let ``Csharp understands Fsharp-produced struct unions via IsXXX flow analysis`` () = - let csharpCode = """ + }""" + csharpCode + |> csharpLibCompile (FsharpFromFile "NullAsTrueValue.fs") + |> withDiagnostics [ Warning 8602, Line 12, Col 27, Line 12, Col 37, "Dereference of a possibly null reference."] + + [] + let ``Csharp understands Fsharp-produced struct unions via IsXXX flow analysis`` () = + let csharpCode = """ #nullable enable public class C { public void M() { @@ -198,22 +217,22 @@ public class C { System.Console.Write(thisCreationIsBad.ToString() + thisCreationIsFine.ToString() ); } -}""" - csharpCode - |> csharpLibCompile (FsharpFromFile "StructDU.fs") - |> withDiagnostics [ - Warning 8600, Line 6, Col 35, Line 6, Col 57, "Converting null literal or possible null value to non-nullable type." - Warning 8600, Line 14, Col 78, Line 14, Col 97, "Converting null literal or possible null value to non-nullable type." - Warning 8602, Line 15, Col 34, Line 15, Col 89, "Dereference of a possibly null reference." - Warning 8625, Line 18, Col 62, Line 18, Col 66, "Cannot convert null literal to non-nullable reference type."] - - [] - let ``Csharp code understands Fsharp-produced generics`` () = - let fsharpcode = """ + }""" + csharpCode + |> csharpLibCompile (FsharpFromFile "StructDU.fs") + |> withDiagnostics [ + Warning 8600, Line 6, Col 35, Line 6, Col 57, "Converting null literal or possible null value to non-nullable type." + Warning 8600, Line 14, Col 78, Line 14, Col 97, "Converting null literal or possible null value to non-nullable type." + Warning 8602, Line 15, Col 34, Line 15, Col 89, "Dereference of a possibly null reference." + Warning 8625, Line 18, Col 62, Line 18, Col 66, "Cannot convert null literal to non-nullable reference type."] + + [] + let ``Csharp code understands Fsharp-produced generics`` () = + let fsharpcode = """ module MyFSharpLib -let stringTupleInOut(x:struct(string * string|null)) = x """ - let fsLib = fsharpLibCreator fsharpcode - let csharpCode = """ +let stringTupleInOut(x:struct(string * string|null)) = x""" + let fsLib = fsharpLibCreator fsharpcode + let csharpCode = """ #nullable enable public class C { public void M() { @@ -221,22 +240,22 @@ public class C { MyFSharpLib.stringTupleInOut(("a good string here",nullString)); } }""" - csharpCode - |> csharpLibCompile fsLib - |> withDiagnostics [] - - [] - let ``Csharp code can work with annotated FSharp module`` () = - Path.Combine(__SOURCE_DIRECTORY__,"CsharpConsumer.cs") - |> File.ReadAllText - |> csharpLibCompile (FsharpFromFile "ModuleLevelFunctions.fs") - |> shouldFail - |> withDiagnostics [ - Error 29, Line 28, Col 20, Line 28, Col 61, "Cannot implicitly convert type 'int' to 'string'" - Warning 8625, Line 12, Col 74, Line 12, Col 78, "Cannot convert null literal to non-nullable reference type." - Warning 8604, Line 14, Col 88, Line 14, Col 113, "Possible null reference argument for parameter 'x' in 'string MyTestModule.nonNullableInputOutputFunc(string x)'." - Warning 8620, Line 19, Col 88, Line 19, Col 101, "Argument of type '(string?, string?, int, int, int, int)' cannot be used for parameter 'x' of type '(string, string?, int, int, int, int)' in '(string, string?, int, int, int, int) MyTestModule.genericValueTypeTest((string, string?, int, int, int, int) x)' due to differences in the nullability of reference types." - Warning 8604, Line 21, Col 84, Line 21, Col 114, "Possible null reference argument for parameter 'x' in 'string MyTestModule.nonNullableInputOutputFunc(string x)'." - Warning 8604, Line 24, Col 60, Line 24, Col 70, "Possible null reference argument for parameter 'x_0' in 'Tuple MyTestModule.genericRefTypeTest(string x_0, string? x_1, int x_2, int x_3, int x_4, int x_5)'." - Warning 8604, Line 25, Col 45, Line 25, Col 59, "Possible null reference argument for parameter 'x_0' in 'Tuple MyTestModule.genericRefTypeTest(string x_0, string? x_1, int x_2, int x_3, int x_4, int x_5)'." - Warning 8625, Line 28, Col 51, Line 28, Col 55, "Cannot convert null literal to non-nullable reference type."] \ No newline at end of file + csharpCode + |> csharpLibCompile fsLib + |> withDiagnostics [] + + [] + let ``Csharp code can work with annotated FSharp module`` () = + Path.Combine(__SOURCE_DIRECTORY__,"CsharpConsumer.cs") + |> File.ReadAllText + |> csharpLibCompile (FsharpFromFile "ModuleLevelFunctions.fs") + |> shouldFail + |> withDiagnostics [ + Error 29, Line 28, Col 20, Line 28, Col 61, "Cannot implicitly convert type 'int' to 'string'" + Warning 8625, Line 12, Col 74, Line 12, Col 78, "Cannot convert null literal to non-nullable reference type." + Warning 8604, Line 14, Col 88, Line 14, Col 113, "Possible null reference argument for parameter 'x' in 'string MyTestModule.nonNullableInputOutputFunc(string x)'." + Warning 8620, Line 19, Col 88, Line 19, Col 101, "Argument of type '(string?, string?, int, int, int, int)' cannot be used for parameter 'x' of type '(string, string?, int, int, int, int)' in '(string, string?, int, int, int, int) MyTestModule.genericValueTypeTest((string, string?, int, int, int, int) x)' due to differences in the nullability of reference types." + Warning 8604, Line 21, Col 84, Line 21, Col 114, "Possible null reference argument for parameter 'x' in 'string MyTestModule.nonNullableInputOutputFunc(string x)'." + Warning 8604, Line 24, Col 60, Line 24, Col 70, "Possible null reference argument for parameter 'x_0' in 'Tuple MyTestModule.genericRefTypeTest(string x_0, string? x_1, int x_2, int x_3, int x_4, int x_5)'." + Warning 8604, Line 25, Col 45, Line 25, Col 59, "Possible null reference argument for parameter 'x_0' in 'Tuple MyTestModule.genericRefTypeTest(string x_0, string? x_1, int x_2, int x_3, int x_4, int x_5)'." + Warning 8625, Line 28, Col 51, Line 28, Col 55, "Cannot convert null literal to non-nullable reference type."] \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Platform/Platform.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Platform/Platform.fs index 20fbc933dba..c6850d68a41 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Platform/Platform.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Platform/Platform.fs @@ -1,4 +1,4 @@ -namespace EmittedIL +namespace EmittedIL open Xunit open FSharp.Test @@ -23,120 +23,134 @@ module Platform = |> asExe |> withName "PlatformedExe.exe" - [] + [] let platformExeAnyCpuDefault compilation = compilation + |> getCompilation |> withReferences [ buildPlatformedExe |> withPlatform ExecutionPlatform.Anycpu ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformExeAnyCpu32BitPreferred compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedExe |> withPlatform ExecutionPlatform.AnyCpu32bitPreferred ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformExeArm compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedExe |> withPlatform ExecutionPlatform.Arm ] |> if isArm then compileExeAndRun else compile |> shouldSucceed - [] + [] let platformExeArm64 compilation = compilation + |> getCompilation |> asExe |> withPlatform ExecutionPlatform.Arm64 |> withReferences [ buildPlatformedExe |> withPlatform ExecutionPlatform.Arm64 ] |> if isArm then compileExeAndRun else compile |> shouldSucceed - [] + [] let platformExeItanium compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedExe |> withPlatform ExecutionPlatform.Itanium ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformExeX86 compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedExe |> withPlatform ExecutionPlatform.X86 ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformExeX64 compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedExe |> withPlatform ExecutionPlatform.X64 ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformDllDefault compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedDll ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformDllAnyCpuDefault compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedDll |> withPlatform ExecutionPlatform.Anycpu ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformDllArm compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedDll |> withPlatform ExecutionPlatform.Arm ] |> if isArm then compileExeAndRun else compile |> shouldSucceed - [] + [] let platformDllArm64 compilation = compilation + |> getCompilation |> asExe |> withPlatform ExecutionPlatform.Arm64 |> withReferences [ buildPlatformedDll |> withPlatform ExecutionPlatform.Arm64 ] |> if isArm then compileExeAndRun else compile |> shouldSucceed - [] + [] let platformDllItanium compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedDll |> withPlatform ExecutionPlatform.Itanium ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformDllX86 compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedDll |> withPlatform ExecutionPlatform.X86 ] |> compileExeAndRun |> shouldSucceed - [] + [] let platformDllX64 compilation = compilation + |> getCompilation |> asExe |> withReferences [ buildPlatformedDll |> withPlatform ExecutionPlatform.X64 ] |> compileExeAndRun |> shouldSucceed - [] + [] let withRefOnlyGeneratesMvidSection compilation = let mvidReader = @@ -150,6 +164,7 @@ module Platform = |> withRefOnly compilation + |> getCompilation |> asExe |> withReferences [mvidReader] |> withReferences [assemblyHasMvidSection] @@ -157,7 +172,7 @@ module Platform = |> compileExeAndRun |> shouldSucceed - [] + [] let withoutRefOnlyGeneratesNoMvidSection compilation = let mvidReader = @@ -169,6 +184,7 @@ module Platform = |> asLibrary compilation + |> getCompilation |> asExe |> withReferences [mvidReader] |> withReferences [assemblyHasMvidSection] diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/QueryExpressionStepping.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/QueryExpressionStepping.fs index ff590c10dae..bc205b74721 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/QueryExpressionStepping.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/QueryExpressionStepping/QueryExpressionStepping.fs @@ -24,138 +24,71 @@ module QueryExpressionStepping = |> verifyILBaseline // SOURCE=Linq101Aggregates01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Aggregates01.exe" # Linq101Aggregates01.fs - CodeGen - [] - let ``Linq101Aggregates01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Linq101Aggregates01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - [] - let ``Linq101Aggregates01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=Linq101ElementOperators01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101ElementOperators01.exe" # Linq101ElementOperators01.fs - CodeGen - [] - let ``Linq101ElementOperators01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - // SOURCE=Linq101ElementOperators01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101ElementOperators01.exe" # Linq101ElementOperators01.fs - CodeGen - [] - let ``Linq101ElementOperators01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Linq101Grouping01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Grouping01.exe" # Linq101Grouping01.fs - CodeGen - [] - let ``Linq101Grouping01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Linq101ElementOperators01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Linq101Grouping01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Grouping01.exe" # Linq101Grouping01.fs - CodeGen - [] - let ``Linq101Grouping01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Linq101Joins01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Joins01.exe" # Linq101Joins01.fs - CodeGen - [] - let ``Linq101Joins01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Linq101Grouping01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Linq101Joins01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Joins01.exe" # Linq101Joins01.fs - CodeGen - [] - let ``Linq101Joins01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Linq101Ordering01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Ordering01.exe" # Linq101Ordering01.fs - CodeGen - [] - let ``Linq101Ordering01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Linq101Joins01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Linq101Ordering01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Ordering01.exe" # Linq101Ordering01.fs - CodeGen - [] - let ``Linq101Ordering01_RealInternalSignatureOff_fs`` compilation = + [] + let ``Linq101Ordering01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=Linq101Partitioning01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Partitioning01.exe" # Linq101Partitioning01.fs - CodeGen - [] - let ``Linq101Partitioning01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Linq101Partitioning01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=Linq101Partitioning01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Partitioning01.exe" # Linq101Partitioning01.fs - CodeGen - [] - let ``Linq101Partitioning01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=Linq101Quantifiers01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Quantifiers01.exe" # Linq101Quantifiers01.fs - CodeGen - [] - let ``Linq101Quantifiers01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - [] - let ``Linq101Quantifiers01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Linq101Select01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Select01.exe" # Linq101Select01.fs - CodeGen - [] - let ``Linq101Select01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Linq101Quantifiers01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation - // SOURCE=Linq101Select01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Select01.exe" # Linq101Select01.fs - CodeGen - [] - let ``Linq101Select01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Linq101SetOperators01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101SetOperators01.exe" # Linq101SetOperators01.fs - CodeGen - [] - let ``Linq101SetOperators01_RealInternalSignatureOn_fs`` compilation = + // SOURCE=Linq101Select01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Select01.exe" # Linq101Select01.fs - CodeGen + [] + let ``Linq101Select01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Linq101SetOperators01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101SetOperators01.exe" # Linq101SetOperators01.fs - CodeGen - [] - let ``Linq101SetOperators01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Linq101Where01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Where01.exe" # Linq101Where01.fs - CodeGen - [] - let ``Linq101Where01_RealInternalSignatureOn_fs`` compilation = + [] + let ``Linq101SetOperators01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Linq101Where01.fs SCFLAGS="-r:Utils.dll -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Linq101Where01.exe" # Linq101Where01.fs - CodeGen - [] - let ``Linq101Where01_RealInternalSignatureOff_fs`` compilation = + [] + let ``Linq101Where01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionStepping.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionStepping.fs index 01a3c5d6fc4..01971f4d183 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionStepping.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionStepping.fs @@ -18,101 +18,52 @@ module SeqExpressionStepping = |> verifyILBaseline //Retry SOURCE=SeqExpressionSteppingTest01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest1.exe" # SeqExpressionSteppingTest1.fs - - [] - let ``SeqExpressionSteppingTest01_RealInternalSignatureOn_fs`` compilation = + [] + let ``SeqExpressionSteppingTest01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //Retry SOURCE=SeqExpressionSteppingTest01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest1.exe" # SeqExpressionSteppingTest1.fs - - [] - let ``SeqExpressionSteppingTest01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=SeqExpressionSteppingTest02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest2.exe" # SeqExpressionSteppingTest2.fs - - [] - let ``SeqExpressionSteppingTest02_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=SeqExpressionSteppingTest02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest2.exe" # SeqExpressionSteppingTest2.fs - - [] - let ``SeqExpressionSteppingTest02_RealInternalSignatureOff_fs`` compilation = + [] + let ``SeqExpressionSteppingTest02_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=SeqExpressionSteppingTest03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest3.exe" # SeqExpressionSteppingTest3.fs - - [] - let ``SeqExpressionSteppingTest03_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //SOURCE=SeqExpressionSteppingTest03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest3.exe" # SeqExpressionSteppingTest3.fs - - [] - let ``SeqExpressionSteppingTest03_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=SeqExpressionSteppingTest04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest4.exe" # SeqExpressionSteppingTest4.fs - - [] - let ``SeqExpressionSteppingTest04_RealInternalSignatureOn_fs`` compilation = + [] + let ``SeqExpressionSteppingTest03_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=SeqExpressionSteppingTest04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest4.exe" # SeqExpressionSteppingTest4.fs - - [] - let ``SeqExpressionSteppingTest04_RealInternalSignatureOff_fs`` compilation = + [] + let ``SeqExpressionSteppingTest04_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=SeqExpressionSteppingTest05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest5.exe" # SeqExpressionSteppingTest5.fs - - [] - let ``SeqExpressionSteppingTest05_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=SeqExpressionSteppingTest05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest5.exe" # SeqExpressionSteppingTest5.fs - - [] - let ``SeqExpressionSteppingTest05_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=SeqExpressionSteppingTest06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest6.exe" # SeqExpressionSteppingTest6.fs - - [] - let ``SeqExpressionSteppingTest06_RealInternalSignatureOn_fs`` compilation = + [] + let ``SeqExpressionSteppingTest05_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=SeqExpressionSteppingTest06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest6.exe" # SeqExpressionSteppingTest6.fs - - [] - let ``SeqExpressionSteppingTest06_RealInternalSignatureOff_fs`` compilation = + [] + let ``SeqExpressionSteppingTest06_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation #if NETCOREAPP // SOURCE=SeqExpressionSteppingTest07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest7.exe" # SeqExpressionSteppingTest7.fs - - [] - let ``SeqExpressionSteppingTest07_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=SeqExpressionSteppingTest07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest7.exe" # SeqExpressionSteppingTest7.fs - - [] - let ``SeqExpressionSteppingTest07_RealInternalSignatureOff_fs`` compilation = + [] + let ``SeqExpressionSteppingTest07_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation #endif \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls.fs index 55245346fa0..b9fc3e0a54a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls.fs @@ -19,13 +19,15 @@ module SeqExpressionTailCalls = |> verifyILBaseline // SOURCE=SeqExpressionTailCalls01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionTailCalls01.exe" # SeqExpressionTailCalls01.fs - - [] + [] let ``SeqExpressionTailCalls01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SeqExpressionTailCalls02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionTailCalls02.exe" # SeqExpressionTailCalls02.fs - - [] + [] let ``SeqExpressionTailCalls02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/SerializableAttribute.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/SerializableAttribute.fs index 3a801ed3dce..9e4053528bc 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/SerializableAttribute.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/SerializableAttribute.fs @@ -18,60 +18,31 @@ module SerializableAttribute = |> verifyILBaseline // SOURCE=ToplevelModule.fs SCFLAGS="-a -g --out:TopLevelModule.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelModule.dll" # ToplevelModule.fs - Desktop - [] - let ``ToplevelModule_RealInternalSignatureOn_fs`` compilation = + [] + let ``ToplevelModule_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ToplevelModule.fs SCFLAGS="-a -g --out:TopLevelModule.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelModule.dll" # ToplevelModule.fs - Desktop - [] - let ``ToplevelModule_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ToplevelNamespace.fs SCFLAGS="-a -g --out:ToplevelNamespace.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelNamespace.dll" # ToplevelNamespace.fs - Desktop - [] - let ``ToplevelNamespace_RealInternalSignatureOn_fs`` compilation = + [] + let ``ToplevelNamespace_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ToplevelNamespace.fs SCFLAGS="-a -g --out:ToplevelNamespace.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelNamespace.dll" # ToplevelNamespace.fs - Desktop - [] - let ``ToplevelNamespacec_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=ToplevelModule.fs SCFLAGS="-a -g --langversion:6.0 --out:TopLevelModule-preview.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelModule-preview.dll" # ToplevelModule.fs - Desktop preview - [] - let ``ToplevelModule_LangVersion60_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> withLangVersion60 - |> verifyCompilation - - [] - let ``ToplevelModule_LangVersion60_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> withLangVersion60 - |> verifyCompilation - - // SOURCE=ToplevelNamespace.fs SCFLAGS="-a -g --langversion:6.0 --out:ToplevelNamespace-preview.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelNamespace-preview.dll" # ToplevelNamespace.fs - Desktop preview - [] - let ``ToplevelNamespace_LangVersion60_RealInternalSignatureOn_fs`` compilation = + [] + let ``ToplevelModule_LangVersion60_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> withLangVersion60 |> verifyCompilation // SOURCE=ToplevelNamespace.fs SCFLAGS="-a -g --langversion:6.0 --out:ToplevelNamespace-preview.dll --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ToplevelNamespace-preview.dll" # ToplevelNamespace.fs - Desktop preview - [] - let ``ToplevelNamespace_LangVersion60_RealInternalSignatureOff_fs`` compilation = + [] + let ``ToplevelNamespace_LangVersion60_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> withLangVersion60 |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit.fs index 2f9a1277528..6b12f4a145b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit.fs @@ -18,57 +18,29 @@ module StaticInit = |> verifyILBaseline // SOURCE=LetBinding01.fs SCFLAGS=" -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd LetBinding01.exe" # LetBinding01.fs - [] - let ``LetBinding01_RealInternalSignatureOn_fs`` compilation = + [] + let ``LetBinding01_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=LetBinding01.fs SCFLAGS=" -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd LetBinding01.exe" # LetBinding01.fs - [] - let ``LetBinding01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=StaticInit_Struct01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Struct01.dll" # StaticInit_Struct01.fs - - [] - let ``StaticInit_Struct01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=StaticInit_Struct01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Struct01.dll" # StaticInit_Struct01.fs - - [] - let ``StaticInit_Struct01_RealInternalSignatureOff_fs`` compilation = + [] + let ``StaticInit_Struct01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=StaticInit_Class01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Class01.dll" # StaticInit_Class01.fs - - [] - let ``StaticInit_Class01_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=StaticInit_Class01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Class01.dll" # StaticInit_Class01.fs - - [] - let ``StaticInit_Class01_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=StaticInit_Module01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Module01.dll" # StaticInit_Module01.fs - - [] - let ``StaticInit_Module01_RealInternalSignatureOn_fs`` compilation = + [] + let ``StaticInit_Class01_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=StaticInit_Module01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd StaticInit_Module01.dll" # StaticInit_Module01.fs - - [] - let ``StaticInit_Module01_RealInternalSignatureOff_fs`` compilation = + [] + let ``StaticInit_Module01_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch.fs index d10e4561e56..d1298a98d40 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch.fs @@ -19,55 +19,64 @@ module SteppingMatch = // SOURCE=SteppingMatch01.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch01.dll" # SteppingMatch01.fs - [] + [] let ``SteppingMatch01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch02.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch02.dll" # SteppingMatch02.fs - [] + [] let ``SteppingMatch02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch03.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch03.dll" # SteppingMatch03.fs - [] + [] let ``SteppingMatch03_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch04.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch04.dll" # SteppingMatch04.fs - [] + [] let ``SteppingMatch04_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch05.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch05.dll" # SteppingMatch05.fs - [] + [] let ``SteppingMatch05_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch06.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch06.dll" # SteppingMatch06.fs - - [] + [] let ``SteppingMatch06_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch07.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch07.dll" # SteppingMatch07.fs - - [] + [] let ``SteppingMatch07_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch08.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch08.dll" # SteppingMatch08.fs - [] + [] let ``SteppingMatch08_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=SteppingMatch09.fs SCFLAGS="-a -g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SteppingMatch09.dll" # SteppingMatch09.fs - [] + [] let ``SteppingMatch09_fs`` compilation = compilation + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/StringEncoding.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/StringEncoding.fs index e0d0b1eacef..da3fa57a537 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/StringEncoding.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StringEncoding/StringEncoding.fs @@ -81,28 +81,31 @@ module StringEncoding = |> shouldSucceed //SOURCE="dummy.fs testcase.fs" PRECMD="\$FSI_PIPE --exec NormalizationFormD.fsx > oracle.cs && \$CSC_PIPE oracle.cs && oracle.exe>testcase.fs" # FormD - [] + [] let ``NormalizationForm_D`` compilation = compilation + |> getCompilation |> withReferences([normalization_CSharp "FormD" 0; normalization_FSharp "FormD" 0]) |> withReferences([normalization_CSharp "FormD" 0x80; normalization_FSharp "FormD" 0x80]) |> compileExeAndRun |> shouldSucceed //SOURCE="dummy.fs testcase.fs" PRECMD="\$FSI_PIPE --exec NormalizationFormKC.fsx > oracle.cs && \$CSC_PIPE oracle.cs && oracle.exe>testcase.fs" # FormKC - [] + [] let ``NormalizationForm_KC`` compilation = compilation + |> getCompilation |> withReferences([normalization_CSharp "FormKC" 0; normalization_FSharp "FormKC" 0]) |> withReferences([normalization_CSharp "FormKC" 0x80; normalization_FSharp "FormKC" 0x80]) |> compileExeAndRun |> shouldSucceed //SOURCE="dummy.fs testcase.fs" PRECMD="\$FSI_PIPE --exec NormalizationFormKD.fsx > oracle.cs && \$CSC_PIPE oracle.cs && oracle.exe>testcase.fs" # FormKD - [] + [] let ``NormalizationForm_KD`` compilation = compilation + |> getCompilation |> withReferences([normalization_CSharp "FormKD" 0; normalization_FSharp "FormKD" 0]) |> withReferences([normalization_CSharp "FormKD" 0x80; normalization_FSharp "FormKD" 0x80]) - |> compileExeAndRun + |> compileExeAndRun |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_1.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_1.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_1.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_1.fs.il.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_1.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_1.fs.il.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_2.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_2.fs.il.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_2.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_2.fs.il.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_2.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_2.fs deleted file mode 100644 index 01e8d833c73..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles_2.fs +++ /dev/null @@ -1,39 +0,0 @@ -// =========================================================================================================================== -// Test case for GenericEqualityERFast with floats/doubles -// Ensures that matrix of values evaluate to the same values as the shipping compiler -// =========================================================================================================================== -module floatsanddoubles - -open System -open System - -type Float = - struct - val F : float - new (f:float) = { F = f } - end - -type Double = - struct - val D : double - new (d:double) = { D = d } - end - -let floats = [| Float(Double.Epsilon); Float(Double.MinValue); Float(Double.MaxValue);Float(Double.NegativeInfinity);Float(Double.PositiveInfinity);Float(Double.NaN); Float(7.1)|] -let doubles = [| Double(Double.Epsilon); Double(Double.MinValue); Double(Double.MaxValue);Double(Double.NegativeInfinity);Double(Double.PositiveInfinity);Double(Double.NaN); Double(8.1)|] -let names = [| "Epsilon"; "MinValue"; "MaxValue";"NegativeInfinity";"PositiveInfinity";"NaN";"Number" |] - -[] -let main argv = - - for i in 0 .. doubles.Length - 1 do - for j in 0 .. doubles.Length - 1 do - printfn "Doubles: %-17s = %-17s is: %-5b Values %f = %f" (names.[i]) (names.[j]) (doubles.[i].Equals(doubles.[j])) (doubles.[i].D) (doubles.[j].D) - printfn "" - - for i in 0 .. floats.Length - 1 do - for j in 0 .. floats.Length - 1 do - printfn "Floats: %-17s = %-17s is: %-5b Values %f = %f" (names.[i]) (names.[j]) (floats.[i].Equals(floats.[j])) (floats.[i].F) (floats.[j].F) - printfn "" - - 0 // return an integer exit code diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/StructFieldEquality.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/StructFieldEquality.fs index edf76bdf4c8..1b51ba93f5b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/StructFieldEquality.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/StructFieldEquality.fs @@ -6,9 +6,10 @@ open FSharp.Test.Compiler module Operators = - [] + [] let ``Validate that non generic (fast) code is emitted for comparison involving decimals`` compilation = compilation + |> getCompilation |> asExe |> ignoreWarnings |> verifyILBaseline \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Structure.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Structure.fs index 2d542bddee5..264f10eaba1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Structure.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/Structure.fs @@ -43,176 +43,194 @@ module Structure = // SOURCE=AttributesOnLet01.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnLet01.fs - [] + [] let ``AttributesOnLet01_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=AttributesOnLet02.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnLet02.fs - [] + [] let ``AttributesOnLet02_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=AttributesOnProperty.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnProperty.fs - [] + [] let ``AttributesOnProperty_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=AttributesOnPropertyGetter.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnPropertyGetter.fs - [] + [] let ``AttributesOnPropertyGetter_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=AttributesOnPropertyGetterSetter.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnPropertyGetterSetter.fs - [] + [] let ``AttributesOnPropertyGetterSetter_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=AttributesOnPropertySetter.fs SCFLAGS="-r:CodeGenHelper.dll" # AttributesOnPropertySetter.fs - [] + [] let ``AttributesOnPropertySetter_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=ClassArity01.fs SCFLAGS="-r:CodeGenHelper.dll" # ClassArity01.fs - [] + [] let ``ClassArity01_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=Delegates01.fs SCFLAGS="-r:CodeGenHelper.dll" # Delegates01.fs - [] + [] let ``Delegates01_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=ReadOnlyStructFromLib.fs SCFLAGS="-r:ReadWriteLib.dll" PRECMD="\$CSC_PIPE /target:library /reference:System.Core.dll ReadWriteLib.cs" # ReadOnlyStructFromLib.fs - [] + [] let ``ReadOnlyStructFromLib_fs`` compilation = let readWriteLib = CSharpFromPath (Path.Combine(__SOURCE_DIRECTORY__, "ReadWriteLib.cs")) |> withName "ReadWriteLib" compilation + |> getCompilation |> withReferences([readWriteLib]) |> verifyCompilation // SOURCE=DiscUnionCodeGen1.fs SCFLAGS="-r:CodeGenHelper.dll" # DiscUnionCodeGen1.fs - [] + [] let ``DiscUnionCodeGen1_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Equality01.fs # Equality01.fs - [] + [] let ``Equality01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Events01.fs SCFLAGS="-r:CodeGenHelper.dll" # Events01.fs - [] + [] let ``Events01_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=Events02.fs SCFLAGS="-r:CodeGenHelper.dll" # Events02.fs - [] + [] let ``Events02_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=Extensions01.fs SCFLAGS="-r:CodeGenHelper.dll" # Extensions01.fs - [] + [] let ``Extensions01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Extensions02.fs SCFLAGS="-r:CodeGenHelper.dll" # Extensions02.fs - [] + [] let ``Extensions02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=FloatsAndDoubles_1.fs SCFLAGS="-g --out:FloatsAndDoubles.exe" COMPILE_ONLY=1 POSTCMD="comparebsl.cmd FloatsAndDoubles.exe" # FloatsAndDoubles.fs - [] - let ``FloatsAndDoubles_1_fs`` compilation = + [] + let ``FloatsAndDoubles_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyIl - - // SOURCE=FloatsAndDoubles_2.fs SCFLAGS="-g --out:FloatsAndDoubles.exe" COMPILE_ONLY=1 POSTCMD="comparebsl.cmd FloatsAndDoubles.exe" # FloatsAndDoubles.fs - [] - let ``FloatsAndDoubles_2_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyIl // SOURCE=FunctionArity01.fs SCFLAGS="-r:CodeGenHelper.dll" # FunctionArity01.fs - [] + [] let ``FunctionArity01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=LocalTypeFunctionInIf.fs # LocalTypeFunctionInIf.fs - [] + [] let ``LocalTypeFunctionInIf_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=ModuleArity01.fs SCFLAGS="-r:CodeGenHelper.dll" # ModuleArity01.fs - [] + [] let ``ModuleArity01_fs`` compilation = compilation + |> getCompilation |> verifyExecution #if false && !NETCOREAPP && !NETSTANDARD // SOURCE=NativePtr01.fs PEVER=/Exp_Fail SCFLAGS="-r:CodeGenHelper.dll" # NativePtr01.fs - [] + [] let ``NativePtr01_fs`` compilation = compilation + |> getCompilation |> setupCompilation |> PEVerifier.verifyPEFile |> PEVerifier.shouldFail #endif // SOURCE=ObjectExpressions01.fs SCFLAGS="-r:CodeGenHelper.dll" # ObjectExpressions01.fs - [] + [] let ``ObjectExpressions01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE="UnionTypeWithSignature01.fsi UnionTypeWithSignature01.fs" SCFLAGS="-r:CodeGenHelper.dll" # UnionTypeWithSignature01.fs - [] + [] let ``UnionTypeWithSignature01_fsi`` compilation = compilation + |> getCompilation |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "UnionTypeWithSignature01.fs")) |> verifyExecution // SOURCE="UnionTypeWithSignature02.fsi UnionTypeWithSignature02.fs" SCFLAGS="-r:CodeGenHelper.dll" # UnionTypeWithSignature02.fs - [] + [] let ``UnionTypeWithSignature02_fsi`` compilation = compilation + |> getCompilation |> withAdditionalSourceFile (SourceFromPath (__SOURCE_DIRECTORY__ ++ "UnionTypeWithSignature02.fs")) |> verifyCompilation // SOURCE=UnitsOfMeasure01.fs SCFLAGS="-r:CodeGenHelper.dll" # UnitsOfMeasure01.fs - [] + [] let ``UnitsOfMeasure01_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=UnitsOfMeasure02.fs SCFLAGS="-r:CodeGenHelper.dll" # UnitsOfMeasure02.fs - [] + [] let ``UnitsOfMeasure02_fs`` compilation = compilation + |> getCompilation |> verifyExecution // SOURCE=UnitsOfMeasure03.fs SCFLAGS="-r:CodeGenHelper.dll" # UnitsOfMeasure03.fs - [] + [] let ``UnitsOfMeasure03_fs`` compilation = compilation + |> getCompilation |> verifyExecution diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOff.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOff.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOn.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOn.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOn.fs deleted file mode 100644 index e2cd598647c..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4_RealInternalSignatureOn.fs +++ /dev/null @@ -1,14 +0,0 @@ -// #Regression #NoMono #NoMT #CodeGen #EmittedIL -// Regression test for FSHARP1.0:2484 -// Note: we might see changes related to another bug -// related to spans -#light - -[] -let Null = null - -let x = 5 - -match box x with // bp here - | Null -> printfn "Is null" // bp here - | _ -> () diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOn.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOn.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOn.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOn.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOn.fs deleted file mode 100644 index 0a15c1e7f3e..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22_RealInternalSignatureOn.fs +++ /dev/null @@ -1,3 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOn.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOn.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOn.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOn.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOn.fs deleted file mode 100644 index b0bb870e52c..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b_RealInternalSignatureOn.fs +++ /dev/null @@ -1,3 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -let _ = System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOn.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOn.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOn.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOn.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOn.fs deleted file mode 100644 index 107a0547a4c..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c_RealInternalSignatureOn.fs +++ /dev/null @@ -1,3 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -let () = System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOn.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOn.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOn.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOn.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOn.fs deleted file mode 100644 index 9e9cf22b6dd..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d_RealInternalSignatureOn.fs +++ /dev/null @@ -1,3 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -do System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOn.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOn.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOn.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOn.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOn.fs deleted file mode 100644 index ef4a3242125..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e_RealInternalSignatureOn.fs +++ /dev/null @@ -1,4 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -while true do - System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs.il.netcore .bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.netcore .bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs.il.netcore .bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOn.il.netcore .bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs deleted file mode 100644 index 6fd7e43ade2..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f_RealInternalSignatureOn.fs +++ /dev/null @@ -1,5 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -match "A" with - | "A" -> System.Console.WriteLine() - | _ -> System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOn.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOn.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOn.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOn.fs deleted file mode 100644 index 4a90531ba66..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g_RealInternalSignatureOn.fs +++ /dev/null @@ -1,3 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -if true then System.Console.WriteLine() else System.Console.WriteLine() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOff.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOff.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOff.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.il.netcore.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOff.fs.il.netcore.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOff.il.netcore.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs.il.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.net472.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs.il.net472.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.net472.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs.il.netcore .bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.netcore .bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs.il.netcore .bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h.fs.RealInternalSignatureOn.il.netcore .bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs deleted file mode 100644 index 5281549e50e..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22h_RealInternalSignatureOn.fs +++ /dev/null @@ -1,37 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -#light -let test1() = - try - System.Console.WriteLine() - with - // should not generate a filter - | _ -> System.Console.WriteLine() - -let test2() = - try - System.Console.WriteLine() - with - // should generate a filter - | :? System.ArgumentException -> System.Console.WriteLine() - -let test3() = - try - System.Console.WriteLine() - with - // should generate a filter - | :? System.ArgumentException as a -> System.Console.WriteLine(a.Message) - -let test4() = - try - System.Console.WriteLine() - with - // should generate a filter - | MatchFailureException ( msg, _, _) -> System.Console.WriteLine(msg) - -let test5() = - try - System.Console.WriteLine() - with - // should generate a filter - | :? System.ArgumentException as a -> System.Console.WriteLine(a.Message) - | MatchFailureException ( msg, _, _) -> System.Console.WriteLine(msg) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunctions.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunctions.fs index 9b2ce64194e..3f17c4d1db2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunctions.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunctions.fs @@ -27,360 +27,288 @@ module TestFunctions = |> verifyILBaseline //SOURCE=TestFunction01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction01.exe" # TestFunction01.fs - [] + [] let ``TestFunction01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction02.exe" # TestFunction02.fs - [] + [] let ``TestFunction02_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction03.exe" # TestFunction03.fs - - [] + [] let ``TestFunction03_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction03b.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction03b.exe" # TestFunction03b.fs - - [] + [] let ``TestFunction03b_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction03c.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction03c.exe" # TestFunction03c.fs - - [] + [] let ``TestFunction03c_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction04.exe" # TestFunction04.fs - [] + [] let ``TestFunction04_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction05.exe" # TestFunction05.fs - [] + [] let ``TestFunction05_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction06.exe" # TestFunction06.fs - [] + [] let ``TestFunction06_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction07.exe" # TestFunction07.fs - [] + [] let ``TestFunction07_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction08.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction08.exe" # TestFunction08.fs - [] + [] let ``TestFunction08_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction09.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09.exe" # TestFunction09.fs - [] + [] let ``TestFunction09_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction09b.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b.exe" # TestFunction09b.fs - [] + [] let ``TestFunction09b_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction09b1.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b1.exe" # TestFunction09b1.fs - [] + [] let ``TestFunction09b1_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction09b2.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b2.exe" # TestFunction09b2.fs - [] + [] let ``TestFunction09b2_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction09b3.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b3.exe" # TestFunction09b3.fs - [] + [] let ``TestFunction09b3_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction09b4.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b4.exe" # TestFunction09b4.fs - [] - let ``TestFunction09b4_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction09b4_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - //SOURCE=TestFunction09b4.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction09b4.exe" # TestFunction09b4.fs - [] - let ``TestFunction09b4_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation //SOURCE=TestFunction10.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction10.exe" # TestFunction10.fs - - [] + [] let ``TestFunction10_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction11.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction11.exe" # TestFunction11.fs - [] + [] let ``TestFunction11_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction12.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction12.exe" # TestFunction12.fs - [] + [] let ``TestFunction12_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction13.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction13.exe" # TestFunction13.fs - - [] + [] let ``TestFunction13_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction14.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction14.exe" # TestFunction14.fs - - [] + [] let ``TestFunction14_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction15.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction15.exe" # TestFunction15.fs - [] + [] let ``TestFunction15_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction16.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction16.exe" # TestFunction16.fs - - [] + [] let ``TestFunction16_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction17.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction17.exe" # TestFunction17.fs - - [] + [] let ``TestFunction17_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction18.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction18.exe" # TestFunction18.fs - [] + [] let ``TestFunction18_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction19.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction19.exe" # TestFunction19.fs - - [] + [] let ``TestFunction19_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction20.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction20.exe" # TestFunction20.fs - - [] + [] let ``TestFunction20_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction21.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction21.exe" # TestFunction21.fs - - [] + [] let ``TestFunction21_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22.exe" # TestFunction22.fs - [] - let ``TestFunction22_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - //SOURCE=TestFunction22.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22.exe" # TestFunction22.fs - [] - let ``TestFunction22_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //SOURCE=TestFunction22b.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22b.exe" # TestFunction22b.fs - [] - let ``TestFunction22b_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction22_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22b.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22b.exe" # TestFunction22b.fs - [] - let ``TestFunction22b_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //SOURCE=TestFunction22c.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22c.exe" # TestFunction22c.fs - [] - let ``TestFunction22c_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction22b_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22c.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22c.exe" # TestFunction22c.fs - [] - let ``TestFunction22c_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //SOURCE=TestFunction22d.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22d.exe" # TestFunction22d.fs - [] - let ``TestFunction22d_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction22c_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22d.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22d.exe" # TestFunction22d.fs - [] - let ``TestFunction22d_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //SOURCE=TestFunction22e.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22e.exe" # TestFunction22e.fs - [] - let ``TestFunction22e_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction22d_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22e.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22e.exe" # TestFunction22e.fs - [] - let ``TestFunction22e_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //SOURCE=TestFunction22f.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22f.exe" # TestFunction22f.fs - [] - let ``TestFunction22f_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction22e_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22f.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22f.exe" # TestFunction22f.fs - [] - let ``TestFunction22f_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - //SOURCE=TestFunction22g.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22g.exe" # TestFunction22g.fs - [] - let ``TestFunction22g_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction22f_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22g.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22g.exe" # TestFunction22g.fs - [] - let ``TestFunction22g_RealInternalSignatureOn_fs`` compilation = + [] + let ``TestFunction22g_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22h.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22h.exe" # TestFunction22h.fs - - [] - let ``TestFunction22h_RealInternalSignatureOff_fs`` compilation = + [] + let ``TestFunction22h_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation //SOURCE=TestFunction22h.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction22h.exe" # TestFunction22h.fs - - [] - let ``TestFunction22h_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation //SOURCE=TestFunction23.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction23.exe" # TestFunction23.fs - - [] + [] let ``TestFunction23_fs`` compilation = compilation + |> getCompilation |> verifyCompilation //SOURCE=TestFunction24.fs SCFLAGS="-g --optimize-" PEVER=/Exp_Fail COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TestFunction24.exe" # TestFunction24.fs - - [] + [] let ``TestFunction24_fs`` compilation = compilation + |> getCompilation |> withLangVersion70 |> verifyCompilation - // Verify IL 13043 - [] - let ``Verify13043_RealInternalSignatureOff_fs`` compilation = - compilation - |> withDebug - |> withRealInternalSignatureOff - |> verifyCompilation - - // Verify IL 13043 - [] - let ``Verify13043_RealInternalSignatureOn_fs`` compilation = - compilation - |> withDebug - |> withRealInternalSignatureOn - |> verifyCompilation - // Verify Execution 13043 run it built not optimized with debug - [] - let ``Verify13043_Verify13043_RealInternalSignatureOff_execution_noopt`` compilation = + [] + let ``Verify13043_CompileAndRun`` compilation = compilation + |> getCompilation |> withDebug |> withRealInternalSignatureOff |> verifyCompileAndRun - |> shouldSucceed // Verify Execution 13043 run it built not optimized with debug - [] - let ``Verify13043_Verify13043_RealInternalSignatureOn_execution_noopt`` compilation = + [] + let ``Verify13043_Baselines`` compilation = compilation + |> getCompilation |> withDebug - |> withRealInternalSignatureOn - |> verifyCompileAndRun - |> shouldSucceed - - // Verify Execution 13043 --- run it built optimized no debug - [] - let ``Verify13043_RealInternalSignatureOff_execution_opt`` compilation = - compilation - |> asExe - |> withOptions [ "--test:EmitFeeFeeAs100001"; "--nowarn:988"; "--nowarn:3370"] - |> withOptimize - |> withNoDebug |> withRealInternalSignatureOff - |> compileAndRun - |> shouldSucceed - - // Verify Execution 13043 --- run it built optimized no debug - [] - let ``Verify13043_RealInternalSignatureOn_execution_opt`` compilation = - compilation - |> asExe - |> withOptions [ "--test:EmitFeeFeeAs100001"; "--nowarn:988"; "--nowarn:3370"] - |> withOptimize - |> withNoDebug - |> withRealInternalSignatureOn - |> compileAndRun - |> shouldSucceed + |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOff.il.bsl new file mode 100644 index 00000000000..3198f042779 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -0,0 +1,391 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested assembly beforefieldinit f@8 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s l + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + IL_0038: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_003d: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f@27-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s _arg1 + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + IL_0038: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_003d: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/matchResult@38 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/matchResult@38::.ctor() + IL_0005: stsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/functionResult@43 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/functionResult@43::.ctor() + IL_0005: stsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_000a: ret + } + + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_0005: ret + } + + .method public static bool condition(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0005: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0005: ret + } + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + list() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + matchResult() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + functionResult() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list@3 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 matchResult@38 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 functionResult@43 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: ldc.i4.3 + IL_0003: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0008: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_000d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0012: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0017: dup + IL_0018: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_001d: stloc.0 + IL_001e: ldsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_0023: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0028: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_002d: dup + IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0033: stloc.1 + IL_0034: ldstr "Match: %A" + IL_0039: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor(string) + IL_003e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0043: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + IL_0048: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_004d: pop + IL_004e: ldsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_0053: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_005d: dup + IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0063: stloc.2 + IL_0064: ldstr "Function: %A" + IL_0069: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor(string) + IL_006e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0073: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + IL_0078: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_007d: pop + IL_007e: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.bsl new file mode 100644 index 00000000000..3198f042779 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -0,0 +1,391 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested assembly beforefieldinit f@8 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s l + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + IL_0038: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_003d: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f@27-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s _arg1 + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + IL_0038: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_003d: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/matchResult@38 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/matchResult@38::.ctor() + IL_0005: stsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/functionResult@43 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/functionResult@43::.ctor() + IL_0005: stsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_000a: ret + } + + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_0005: ret + } + + .method public static bool condition(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0005: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0005: ret + } + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + list() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + matchResult() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + functionResult() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list@3 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 matchResult@38 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 functionResult@43 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: ldc.i4.3 + IL_0003: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0008: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_000d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0012: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0017: dup + IL_0018: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_001d: stloc.0 + IL_001e: ldsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_0023: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0028: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_002d: dup + IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0033: stloc.1 + IL_0034: ldstr "Match: %A" + IL_0039: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor(string) + IL_003e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0043: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + IL_0048: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_004d: pop + IL_004e: ldsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_0053: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_005d: dup + IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0063: stloc.2 + IL_0064: ldstr "Function: %A" + IL_0069: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor(string) + IL_006e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0073: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + IL_0078: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_007d: pop + IL_007e: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOff.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOff.fs.il.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOff.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOff.fs.il.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.il.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOff.il.bsl new file mode 100644 index 00000000000..3198f042779 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -0,0 +1,391 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested assembly beforefieldinit f@8 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s l + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + IL_0038: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_003d: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f@27-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s _arg1 + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + IL_0038: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_003d: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/matchResult@38 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/matchResult@38::.ctor() + IL_0005: stsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/functionResult@43 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/functionResult@43::.ctor() + IL_0005: stsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_000a: ret + } + + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_0005: ret + } + + .method public static bool condition(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0005: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0005: ret + } + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + list() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + matchResult() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + functionResult() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list@3 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 matchResult@38 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 functionResult@43 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: ldc.i4.3 + IL_0003: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0008: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_000d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0012: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0017: dup + IL_0018: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_001d: stloc.0 + IL_001e: ldsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_0023: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0028: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_002d: dup + IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0033: stloc.1 + IL_0034: ldstr "Match: %A" + IL_0039: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor(string) + IL_003e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0043: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + IL_0048: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_004d: pop + IL_004e: ldsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_0053: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_005d: dup + IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0063: stloc.2 + IL_0064: ldstr "Function: %A" + IL_0069: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor(string) + IL_006e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0073: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + IL_0078: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_007d: pop + IL_007e: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.bsl new file mode 100644 index 00000000000..3198f042779 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -0,0 +1,391 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested assembly beforefieldinit f@8 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/f@8::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s l + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + IL_0038: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_003d: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f@27-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0008: brfalse.s IL_000c + + IL_000a: br.s IL_0012 + + IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0011: ret + + IL_0012: ldloc.0 + IL_0013: stloc.1 + IL_0014: ldloc.1 + IL_0015: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001a: stloc.2 + IL_001b: ldloc.1 + IL_001c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0021: stloc.3 + IL_0022: nop + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/'f@27-1'::condition + IL_0029: ldloc.3 + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: brfalse.s IL_0036 + + IL_0031: ldloc.2 + IL_0032: starg.s _arg1 + IL_0034: br.s IL_0000 + + IL_0036: ldloc.3 + IL_0037: ldloc.2 + IL_0038: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_003d: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/matchResult@38 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/matchResult@38::.ctor() + IL_0005: stsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/functionResult@43 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/functionResult@43::.ctor() + IL_0005: stsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_000a: ret + } + + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_0005: ret + } + + .method public static bool condition(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.3 + IL_0002: clt + IL_0004: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/f@8::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 ) + + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> V_0) + IL_0000: ldarg.0 + IL_0001: newobj instance void assembly/'f@27-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldarg.1 + IL_0009: tail. + IL_000b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Invoke(!0) + IL_0010: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_matchResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0005: ret + } + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0005: ret + } + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + list() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + matchResult() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + functionResult() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list@3 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 matchResult@38 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 functionResult@43 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_2) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: ldc.i4.3 + IL_0003: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0008: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_000d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0012: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0017: dup + IL_0018: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::list@3 + IL_001d: stloc.0 + IL_001e: ldsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_0023: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0028: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithMatch(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_002d: dup + IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::matchResult@38 + IL_0033: stloc.1 + IL_0034: ldstr "Match: %A" + IL_0039: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor(string) + IL_003e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0043: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_matchResult() + IL_0048: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_004d: pop + IL_004e: ldsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_0053: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_list() + IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::dropWhileWithFunction(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_005d: dup + IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 + IL_0063: stloc.2 + IL_0064: ldstr "Function: %A" + IL_0069: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor(string) + IL_006e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0073: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::get_functionResult() + IL_0078: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_007d: pop + IL_007e: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOn.fs.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOn.fs.il.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOn.fs.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOn.fs.il.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.il.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOn.fs deleted file mode 100644 index 3c7a8cceb80..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043_RealInternalSignatureOn.fs +++ /dev/null @@ -1,44 +0,0 @@ -module Verify13043 - -let list = [1; 2; 3] -let condition n = n < 3 - -let dropWhileWithMatch condition list = - let rec f (l : List) : List = - match l with - | [] -> [] - | head :: tail -> - match condition head with - | true -> f tail - | false -> head :: tail - - f list - -(* - This function caused an Unhandled exception at execution time: - - Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. - at Program.f@14-1.Invoke(FSharpList`1 _arg1) in /workspaces/function-rec-fsharp-dotnet7-bug-demo/Program.fs:line 18 - at Program.dropWhileWithFunction(FSharpFunc`2 condition, FSharpList`1 list) in /workspaces/function-rec-fsharp-dotnet7-bug-demo/Program.fs:line 21 - at .$Program.main@() in /workspaces/function-rec-fsharp-dotnet7-bug-demo/Program.fs:line 29 -*) -let dropWhileWithFunction condition list = - let rec f : List -> List = - function - | [] -> [] - | head :: tail -> - match condition head with - | true -> f tail - | false -> head :: tail - - f list - - -// this runs fine: -let matchResult = dropWhileWithMatch condition list -printfn "Match: %A" matchResult - - -// and this results in a null reference exception -let functionResult = dropWhileWithFunction condition list -printfn "Function: %A" functionResult diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/TryCatch.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/TryCatch.fs index 70ca6baa84e..e40fd039fe0 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/TryCatch.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/TryCatch.fs @@ -1,74 +1,78 @@ -module EmittedIL.TryCatch +namespace EmittedIL -open System.IO open Xunit open FSharp.Test open FSharp.Test.Compiler +open System.IO +module TryCatch = -let setupCompilation compilation = - compilation - |> withOptions [ "--test:EmitFeeFeeAs100001" ] - |> withNoWarn 75 //The command-line option '--generate-filter-blocks' has been deprecated - |> withNoWarn 52 //The value has been copied to ensure the original is not mutated - |> asExe - |> withNoOptimize - |> withNoInterfaceData - |> withNoOptimizationData - |> withNoDebug - |> ignoreWarnings + let setupCompilation compilation = + compilation + |> withOptions [ "--test:EmitFeeFeeAs100001" ] + |> withNoWarn 75 //The command-line option '--generate-filter-blocks' has been deprecated + |> withNoWarn 52 //The value has been copied to ensure the original is not mutated + |> asExe + |> withNoOptimize + |> withNoInterfaceData + |> withNoOptimizationData + |> withNoDebug + |> ignoreWarnings -let verifyCompilation compilation = - setupCompilation compilation - |> verifyILBaseline + let verifyCompilation compilation = + setupCompilation compilation + |> verifyILBaseline -[] -let ``TryCatch with active pattern`` compilation = - compilation - |> verifyCompilation + [] + let ``TryCatch with active pattern`` compilation = + compilation + |> getCompilation + |> verifyCompilation -[] -let ``TryCatch with active pattern and filter blocks switch`` compilation = - compilation - |> withOptions ["--generate-filter-blocks"] - |> verifyCompilation + [] + let ``TryCatch with active pattern and filter blocks switch`` compilation = + compilation + |> withOptions ["--generate-filter-blocks"] + |> verifyCompilation -[] -let ``TryCatch with explicit guard`` compilation = - compilation - |> verifyCompilation + [] + let ``TryCatch with explicit guard`` compilation = + compilation + |> getCompilation + |> verifyCompilation -[] -let ``TryCatch with explicit guard and filter blocks switch`` compilation = - compilation - |> withOptions ["--generate-filter-blocks"] - |> verifyCompilation + [] + let ``TryCatch with explicit guard and filter blocks switch`` compilation = + compilation + |> withOptions ["--generate-filter-blocks"] + |> verifyCompilation -[] -let ``Stackoverflow reproduction`` compilation = - let compilationResult = - compilation - |> setupCompilation - // I cannot just `compileAndRun` this in process now, because it will crash entire test host. - |> compile - match compilationResult with - | CompilationResult.Success ({OutputPath = Some dllFile} as s) -> - let fsharpCoreFile = typeof>.Assembly.Location - File.Copy(fsharpCoreFile, Path.Combine(Path.GetDirectoryName(dllFile), Path.GetFileName(fsharpCoreFile)), true) - let result = CompilerAssert.ExecuteAndReturnResult (dllFile, isFsx=false, deps = s.Dependencies, newProcess=true) + [] + let ``Stackoverflow reproduction`` compilation = + let compilationResult = + compilation + |> getCompilation + |> setupCompilation + // I cannot just `compileAndRun` this in process now, because it will crash entire test host. + |> compile - Assert.True(result.StdErr.Contains "stack overflow" || result.StdErr.Contains "StackOverflow") + match compilationResult with + | CompilationResult.Success ({OutputPath = Some dllFile} as s) -> + let fsharpCoreFile = typeof>.Assembly.Location + File.Copy(fsharpCoreFile, Path.Combine(Path.GetDirectoryName(dllFile), Path.GetFileName(fsharpCoreFile)), true) + let result = CompilerAssert.ExecuteAndReturnResult (dllFile, isFsx=false, deps = s.Dependencies, newProcess=true) - | _ -> failwith (sprintf "%A" compilationResult) + Assert.True(result.StdErr.Contains "stack overflow" || result.StdErr.Contains "StackOverflow") -[] -let ``Stackoverflow prevention`` compilation = - compilation - |> setupCompilation - |> withOptions ["--generate-filter-blocks"] - |> compileAndRun - |> shouldSucceed - |> verifyOutput "System.OperationCanceledException" + | _ -> failwith (sprintf "%A" compilationResult) - \ No newline at end of file + [] + let ``Stackoverflow prevention`` compilation = + compilation + |> getCompilation + |> setupCompilation + |> withOptions ["--generate-filter-blocks"] + |> compileAndRun + |> shouldSucceed + |> verifyOutput "System.OperationCanceledException" diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple06.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple06.fs.RealInternalSignatureOn.il.bsl index 121a095fb13..13afd6ba16b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple06.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple06.fs.RealInternalSignatureOn.il.bsl @@ -16,16 +16,6 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -54,7 +44,7 @@ IL_000c: ret } - .method assembly static void staticInitialization@() cil managed + .method assembly specialname static void staticInitialization@() cil managed { .maxstack 8 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuples.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuples.fs index fc7aa7b8a4e..97d84b94d52 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuples.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuples.fs @@ -18,138 +18,85 @@ module Tuples = |> verifyILBaseline // SOURCE=Tuple01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple01.exe" # Tuple01.fs - [] + [] let ``Tuple01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=Tuple02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple02.exe" # Tuple02.fs - - [] - let ``Tuple02_RealInternalSignatureOn_fs`` compilation = + [] + let ``Tuple02_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=Tuple02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple02.exe" # Tuple02.fs - - [] - let ``Tuple02_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Tuple03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple03.exe" # Tuple03.fs - - [] - let ``Tuple03_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Tuple03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple03.exe" # Tuple03.fs - - [] - let ``Tuple03_RealInternalSignatureOff_fs`` compilation = + [] + let ``Tuple03_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=Tuple04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple04.exe" # Tuple04.fs - - [] - let ``Tuple04_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=Tuple04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple04.exe" # Tuple04.fs - - [] - let ``Tuple04_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Tuple05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple05.exe" # Tuple05.fs - - [] - let ``Tuple05_RealInternalSignatureOn_fs`` compilation = + [] + let ``Tuple04_fs`` compilation = compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Tuple05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple05.exe" # Tuple05.fs - - [] - let ``Tuple05_RealInternalSignatureOff_fs`` compilation = + [] + let ``Tuple05_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=Tuple06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple06.exe" # Tuple06.fs - - [] - let ``Tuple06_RealInternalSignatureOff_fs`` compilation = + [] + let ``Tuple06_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=Tuple07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple07.exe" # Tuple07.fs - - [] - let ``Tuple07_RealInternalSignatureOn_fs`` compilation = + [] + let ``Tuple07_fs`` compilation = compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=Tuple07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple07.exe" # Tuple07.fs - - [] - let ``Tuple07_RealInternalSignatureOff_fs`` compilation = - compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=Tuple08.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple08.exe" # Tuple08.fs - - [] - let ``Tuple08_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=Tuple08.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple08.exe" # Tuple08.fs - - [] - let ``Tuple08_RealInternalSignatureOff_fs`` compilation = + [] + let ``Tuple08_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation // SOURCE=OptionalArg01.fs SCFLAGS="-g --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd OptionalArg01.exe" # OptionalArg01.fs - test optimizations - [] + [] let ``OptionalArg01_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=TupleMonster.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TupleMonster.exe" # TupleMonster.fs - - [] - let ``TupleMonster_RealInternalSignatureOff_fs`` compilation = + [] + let ``TupleMonster_fs`` compilation = compilation - |> withRealInternalSignatureOff - |> verifyCompilation - - // SOURCE=TupleMonster.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TupleMonster.exe" # TupleMonster.fs - - [] - let ``TupleMonster_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn + |> getCompilation |> verifyCompilation // SOURCE=TupleElimination.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TupleElimination.exe" # TupleElimination.fs - - [] + [] let ``TupleElimination_fs`` compilation = compilation + |> getCompilation |> verifyCompilation // SOURCE=ValueTupleAliasConstructor.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ValueTupleAliasConstructor.exe" # ValueTupleAliasConstructor.fs - - [] - let ``ValueTupleAliasConstructor_RealInternalSignatureOn_fs`` compilation = - compilation - |> withRealInternalSignatureOn - |> verifyCompilation - - // SOURCE=ValueTupleAliasConstructor.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ValueTupleAliasConstructor.exe" # ValueTupleAliasConstructor.fs - - [] - let ``ValueTupleAliasConstructor_RealInternalSignatureOff_fs`` compilation = + [] + let ``ValueTupleAliasConstructor_fs`` compilation = compilation - |> withRealInternalSignatureOff + |> getCompilation |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/Operators.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/Operators.fs index a6b967742fe..463bf57950e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/Operators.fs +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/Operators.fs @@ -7,18 +7,10 @@ open FSharp.Test.Compiler module Operators = // ``Validate that non generic (fast) code is emitted for comparison involving decimals RealInternalSignatureOff`` compilation = - [] - let ``Non generic (fast) code emitted for decimal comparison RealInternalSignatureOff`` compilation = + [] + let ``Non generic (fast) code emitted for decimal comparison`` compilation = compilation + |> getCompilation |> asExe - |> withRealInternalSignatureOff - |> ignoreWarnings - |> verifyILBaseline - - [] - let ``Non generic (fast) code emitted for decimal comparison RealInternalSignatureOn`` compilation = - compilation - |> asExe - |> withRealInternalSignatureOn |> ignoreWarnings |> verifyILBaseline diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.net472.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.net472.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.net472.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.net472.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.netcore.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.netcore.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.netcore.release.bsl similarity index 97% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.netcore.release.bsl index cccb0f3431a..0e21e7ba7b5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOff.fs.il.netcore.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.netcore.release.bsl @@ -17,16 +17,6 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -40,13 +30,13 @@ -.class public abstract auto ansi sealed Decimal_comparison_RealInternalSignatureOff +.class public abstract auto ansi sealed Decimal_comparison extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) } -.class private abstract auto ansi sealed ''.$Decimal_comparison_RealInternalSignatureOff +.class private abstract auto ansi sealed ''.$Decimal_comparison extends [runtime]System.Object { .field static assembly int32 init@ diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.net472.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.net472.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.net472.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.net472.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.net472.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.net472.release.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.net472.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.net472.release.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.netcore.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.netcore.debug.bsl similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.netcore.debug.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.netcore.debug.bsl diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.netcore.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.netcore.release.bsl similarity index 96% rename from tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.netcore.release.bsl rename to tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.netcore.release.bsl index 9de0631aca0..e50b5c153fd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs.il.netcore.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOn.il.netcore.release.bsl @@ -17,16 +17,6 @@ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 -} -.mresource public FSharpSignatureCompressedData.assembly -{ - - -} -.mresource public FSharpOptimizationCompressedData.assembly -{ - - } .module assembly.exe @@ -40,7 +30,7 @@ -.class public abstract auto ansi sealed Decimal_comparison_RealInternalSignatureOn +.class public abstract auto ansi sealed Decimal_comparison extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) @@ -49,8 +39,8 @@ .maxstack 8 IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$Decimal_comparison_RealInternalSignatureOn::init@ - IL_0006: ldsfld int32 ''.$Decimal_comparison_RealInternalSignatureOn::init@ + IL_0001: stsfld int32 ''.$Decimal_comparison::init@ + IL_0006: ldsfld int32 ''.$Decimal_comparison::init@ IL_000b: pop IL_000c: ret } @@ -250,7 +240,7 @@ } -.class private abstract auto ansi sealed ''.$Decimal_comparison_RealInternalSignatureOn +.class private abstract auto ansi sealed ''.$Decimal_comparison extends [runtime]System.Object { .field static assembly int32 init@ @@ -262,7 +252,7 @@ .entrypoint .maxstack 8 - IL_0000: call void Decimal_comparison_RealInternalSignatureOn::staticInitialization@() + IL_0000: call void Decimal_comparison::staticInitialization@() IL_0005: ret } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs deleted file mode 100644 index 1097b688029..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison_RealInternalSignatureOn.fs +++ /dev/null @@ -1,11 +0,0 @@ -// #NoMono #NoMT #CodeGen #EmittedIL -// Validate we emit non-generic (=fast) code for comparison involving decimals -// See DevDiv:217807 (1.0M < 2.0M should be fast, not go through generic comparison code path) -let _ = 1.0M < 2.0M -let _ = 1.0M <= 2.0M -let _ = 1.0M > 2.0M -let _ = 1.0M >= 2.0M -let _ = 1.0M = 2.0M -let _ = 1.0M <> 2.0M -let _ = 1.0M = 2.0M -let _ = compare 1.0M 2.0M diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnionCasePatternMatchingErrors.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnionCasePatternMatchingErrors.fs index df94ca89e0e..6cffe31c236 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnionCasePatternMatchingErrors.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnionCasePatternMatchingErrors.fs @@ -1,12 +1,14 @@ -module ErrorMessages.UnionCasePatternMatchingErrors +namespace ErrorMessages open FSharp.Test open Xunit open FSharp.Test.Compiler -[] -let ``Union matching error - Incomplete union fields`` () = - FSharp """ +module UnionCasePatternMatchingErrors = + + [] + let ``Union matching error - Incomplete union fields`` () = + FSharp """ module Tests type U = | B of f1:int list * {|X:string|} * f3:U * f4: (int * System.String) @@ -15,18 +17,18 @@ let x : U = failwith "" let myVal = match x with | B -> 42""" - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Error 727, Line 9, Col 7, Line 9, Col 8, - "This union case expects 4 arguments in tupled form, but was given 0. The missing field arguments may be any of: + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 727, Line 9, Col 7, Line 9, Col 8, + "This union case expects 4 arguments in tupled form, but was given 0. The missing field arguments may be any of: \tf1: int list \t{| X: string |} \tf3: U \tf4: (int * System.String)") -[] -let ``Union matching error - Named args - Name used twice`` () = - FSharp """ + [] + let ``Union matching error - Named args - Name used twice`` () = + FSharp """ module Tests type U = | B of field: int * int @@ -34,13 +36,13 @@ let x : U = failwith "" let myVal = match x with | B (field = x; field = z) -> let y = x + z + 1 in ()""" - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Error 3175, Line 8, Col 21, Line 8, Col 26, "Union case/exception field 'field' cannot be used more than once.") + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 3175, Line 8, Col 21, Line 8, Col 26, "Union case/exception field 'field' cannot be used more than once.") -[] -let ``Union matching error - Multiple tupled args`` () = - FSharp """ + [] + let ``Union matching error - Multiple tupled args`` () = + FSharp """ module Tests type U = | B of field: int * int @@ -49,15 +51,15 @@ let x : U = failwith "" let myVal = match x with | B x z -> let y = x + z + 1 in ()""" - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Error 727, Line 9, Col 7, Line 9, Col 12, "This union case expects 2 arguments in tupled form, but was given 0. The missing field arguments may be any of: + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 727, Line 9, Col 7, Line 9, Col 12, "This union case expects 2 arguments in tupled form, but was given 0. The missing field arguments may be any of: \tfield: int \tint") -[] -let ``Union matching error - Missing field`` () = - FSharp """ + [] + let ``Union matching error - Missing field`` () = + FSharp """ module Tests type U = | A @@ -67,14 +69,14 @@ let myVal = match A with | A -> 15 | B (x, _) -> 16""" - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Error 727, Line 10, Col 7, Line 10, Col 15, "This union case expects 3 arguments in tupled form, but was given 2. The missing field arguments may be any of: + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 727, Line 10, Col 7, Line 10, Col 15, "This union case expects 3 arguments in tupled form, but was given 2. The missing field arguments may be any of: \tint") -[] -let ``Union Pattern discard not allowed for union case that takes no data with Lang preview`` () = - FSharp """ + [] + let ``Union Pattern discard not allowed for union case that takes no data with Lang preview`` () = + FSharp """ module Tests type X = X @@ -83,14 +85,14 @@ let x: X = X let myVal = match x with | X _ -> ()""" - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Warning 3548, Line 9, Col 7, Line 9, Col 10, "Pattern discard is not allowed for union case that takes no data.") + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 3548, Line 9, Col 7, Line 9, Col 10, "Pattern discard is not allowed for union case that takes no data.") -[] -let ``Union Pattern discard allowed for union case that takes no data with Lang version 7`` () = - FSharp """ + [] + let ``Union Pattern discard allowed for union case that takes no data with Lang version 7`` () = + FSharp """ module Tests type X = X @@ -99,13 +101,13 @@ let x: X = X let myVal = match x with | X _ -> ()""" - |> withLangVersion70 - |> typecheck - |> shouldSucceed + |> withLangVersion70 + |> typecheck + |> shouldSucceed -[] -let ``Union function Pattern discard allowed for union case that takes no data with Lang version 7`` () = - FSharp """ + [] + let ``Union function Pattern discard allowed for union case that takes no data with Lang version 7`` () = + FSharp """ module Tests type X = X @@ -114,13 +116,13 @@ let x: X = X let myVal = function | X _ -> ()""" - |> withLangVersion70 - |> typecheck - |> shouldSucceed + |> withLangVersion70 + |> typecheck + |> shouldSucceed -[] -let ``Union function Pattern discard not allowed for union case that takes no data with Lang version preview`` () = - FSharp """ + [] + let ``Union function Pattern discard not allowed for union case that takes no data with Lang version preview`` () = + FSharp """ module Tests type X = X @@ -129,14 +131,14 @@ let x: X = X let myVal = function | X _ -> ()""" - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Warning 3548, Line 9, Col 7, Line 9, Col 10, "Pattern discard is not allowed for union case that takes no data.") + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 3548, Line 9, Col 7, Line 9, Col 10, "Pattern discard is not allowed for union case that takes no data.") -[] -let ``Pattern discard not allowed for union case that takes no data with Lang preview`` () = - FSharp """ + [] + let ``Pattern discard not allowed for union case that takes no data with Lang preview`` () = + FSharp """ module Tests type U = | A @@ -150,14 +152,14 @@ let myVal = | A _ -> 15 | B (x, _, _) -> 16 | C _ -> 17""" - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Warning 3548, Line 12, Col 7, Line 12, Col 10, "Pattern discard is not allowed for union case that takes no data.") + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 3548, Line 12, Col 7, Line 12, Col 10, "Pattern discard is not allowed for union case that takes no data.") -[] -let ``Pattern function discard not allowed for union case that takes no data with Lang preview`` () = - FSharp """ + [] + let ``Pattern function discard not allowed for union case that takes no data with Lang preview`` () = + FSharp """ module Tests type U = | A @@ -171,14 +173,14 @@ let myVal = | A _ -> 15 | B (x, _, _) -> 16 | C _ -> 17""" - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Warning 3548, Line 12, Col 7, Line 12, Col 10, "Pattern discard is not allowed for union case that takes no data.") + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 3548, Line 12, Col 7, Line 12, Col 10, "Pattern discard is not allowed for union case that takes no data.") -[] -let ``Pattern discard allowed for union case that takes no data with Lang version 7`` () = - FSharp """ + [] + let ``Pattern discard allowed for union case that takes no data with Lang version 7`` () = + FSharp """ module Tests type U = | A @@ -192,13 +194,13 @@ let myVal = | A _ -> 15 | B (x, _, _) -> 16 | C _ -> 17""" - |> withLangVersion70 - |> typecheck - |> shouldSucceed + |> withLangVersion70 + |> typecheck + |> shouldSucceed -[] -let ``Grouped Pattern discard not allowed for union case that takes no data with Lang preview`` () = - FSharp """ + [] + let ``Grouped Pattern discard not allowed for union case that takes no data with Lang preview`` () = + FSharp """ module Tests type U = | A @@ -212,14 +214,14 @@ let myVal = | A _ | B _ | C _ -> 17""" - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withSingleDiagnostic (Warning 3548, Line 12, Col 7, Line 12, Col 10, "Pattern discard is not allowed for union case that takes no data.") + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 3548, Line 12, Col 7, Line 12, Col 10, "Pattern discard is not allowed for union case that takes no data.") -[] -let ``Multiple pattern discards not allowed for union case that takes no data with Lang preview`` () = - FSharp """ + [] + let ``Multiple pattern discards not allowed for union case that takes no data with Lang preview`` () = + FSharp """ module Tests type U = | A @@ -237,17 +239,17 @@ let myVal = | A _, D -> 15 | B (x, _, _), D _ -> 16 | C _, _ -> 17""" - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Warning 3548, Line 16, Col 7, Line 16, Col 10, "Pattern discard is not allowed for union case that takes no data.") - (Warning 3548, Line 17, Col 20, Line 17, Col 23, "Pattern discard is not allowed for union case that takes no data.") - ] + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 3548, Line 16, Col 7, Line 16, Col 10, "Pattern discard is not allowed for union case that takes no data.") + (Warning 3548, Line 17, Col 20, Line 17, Col 23, "Pattern discard is not allowed for union case that takes no data.") + ] -[] -let ``Multiple pattern discards not allowed for union case that takes no data with Lang 7`` () = - FSharp """ + [] + let ``Multiple pattern discards not allowed for union case that takes no data with Lang 7`` () = + FSharp """ module Tests type U = | A @@ -265,13 +267,13 @@ let myVal = | A _, D -> 15 | B (x, _, _), D _ -> 16 | C _, _ -> 17""" - |> withLangVersion70 - |> typecheck - |> shouldSucceed + |> withLangVersion70 + |> typecheck + |> shouldSucceed -[] -let ``Multiple function pattern discards is not allowed for union case that takes no data with Lang preview`` () = - FSharp """ + [] + let ``Multiple function pattern discards is not allowed for union case that takes no data with Lang preview`` () = + FSharp """ module Tests type U = | A @@ -289,17 +291,17 @@ let myVal = | A _, D -> 15 | B (x, _, _), D _ -> 16 | C _, _ -> 17""" - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Warning 3548, Line 16, Col 7, Line 16, Col 10, "Pattern discard is not allowed for union case that takes no data.") - (Warning 3548, Line 17, Col 20, Line 17, Col 23, "Pattern discard is not allowed for union case that takes no data.") - ] + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 3548, Line 16, Col 7, Line 16, Col 10, "Pattern discard is not allowed for union case that takes no data.") + (Warning 3548, Line 17, Col 20, Line 17, Col 23, "Pattern discard is not allowed for union case that takes no data.") + ] -[] -let ``Multiple function pattern discards is not allowed for union case that takes no data with Lang 7`` () = - FSharp """ + [] + let ``Multiple function pattern discards is not allowed for union case that takes no data with Lang 7`` () = + FSharp """ module Tests type U = | A @@ -318,62 +320,64 @@ let myVal = | A _, D -> 15 | B (x, _, _), D _ -> 16 | C _, _ -> 17""" - |> withLangVersion70 - |> typecheck - |> shouldSucceed + |> withLangVersion70 + |> typecheck + |> shouldSucceed -[] -let ``Pattern named not allowed union case does not take any arguments with Lang 7`` compilation = - compilation - |> asFs - |> withLangVersion70 - |> withOptions ["--nowarn:25"] - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Error 725, Line 8, Col 3, Line 8, Col 9, "This union case does not take arguments"); - (Error 725, Line 11, Col 3, Line 11, Col 14, "This union case does not take arguments") - (Error 725, Line 14, Col 3, Line 14, Col 10, "This union case does not take arguments") - (Error 725, Line 17, Col 3, Line 17, Col 12, "This union case does not take arguments") - (Error 725, Line 20, Col 3, Line 20, Col 17, "This union case does not take arguments") - (Error 725, Line 23, Col 3, Line 23, Col 13, "This union case does not take arguments") - (Error 725, Line 26, Col 3, Line 26, Col 14, "This union case does not take arguments") - (Error 725, Line 29, Col 3, Line 29, Col 13, "This union case does not take arguments") - (Error 725, Line 35, Col 3, Line 35, Col 9, "This union case does not take arguments") - (Error 725, Line 38, Col 3, Line 38, Col 14, "This union case does not take arguments") - (Error 725, Line 42, Col 3, Line 42, Col 11, "This union case does not take arguments") - (Error 725, Line 48, Col 3, Line 48, Col 8, "This union case does not take arguments") - (Error 725, Line 51, Col 3, Line 51, Col 7, "This union case does not take arguments") - (Error 725, Line 55, Col 25, Line 55, Col 28, "This union case does not take arguments") - (Error 725, Line 57, Col 25, Line 57, Col 29, "This union case does not take arguments") - (Error 725, Line 59, Col 24, Line 59, Col 32, "This union case does not take arguments") - ] + [] + let ``Pattern named not allowed union case does not take any arguments with Lang 7`` compilation = + compilation + |> getCompilation + |> asFs + |> withLangVersion70 + |> withOptions ["--nowarn:25"] + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 725, Line 8, Col 3, Line 8, Col 9, "This union case does not take arguments"); + (Error 725, Line 11, Col 3, Line 11, Col 14, "This union case does not take arguments") + (Error 725, Line 14, Col 3, Line 14, Col 10, "This union case does not take arguments") + (Error 725, Line 17, Col 3, Line 17, Col 12, "This union case does not take arguments") + (Error 725, Line 20, Col 3, Line 20, Col 17, "This union case does not take arguments") + (Error 725, Line 23, Col 3, Line 23, Col 13, "This union case does not take arguments") + (Error 725, Line 26, Col 3, Line 26, Col 14, "This union case does not take arguments") + (Error 725, Line 29, Col 3, Line 29, Col 13, "This union case does not take arguments") + (Error 725, Line 35, Col 3, Line 35, Col 9, "This union case does not take arguments") + (Error 725, Line 38, Col 3, Line 38, Col 14, "This union case does not take arguments") + (Error 725, Line 42, Col 3, Line 42, Col 11, "This union case does not take arguments") + (Error 725, Line 48, Col 3, Line 48, Col 8, "This union case does not take arguments") + (Error 725, Line 51, Col 3, Line 51, Col 7, "This union case does not take arguments") + (Error 725, Line 55, Col 25, Line 55, Col 28, "This union case does not take arguments") + (Error 725, Line 57, Col 25, Line 57, Col 29, "This union case does not take arguments") + (Error 725, Line 59, Col 24, Line 59, Col 32, "This union case does not take arguments") + ] -[] -let ``Pattern named not allowed union case does not take any arguments with Lang preview`` compilation = - compilation - |> asFs - |> withLangVersion80 - |> withOptions ["--nowarn:25"] - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Error 725, Line 8, Col 3, Line 8, Col 9, "This union case does not take arguments") - (Error 725, Line 11, Col 3, Line 11, Col 14, "This union case does not take arguments") - (Error 725, Line 14, Col 3, Line 14, Col 10, "This union case does not take arguments") - (Error 725, Line 17, Col 3, Line 17, Col 12, "This union case does not take arguments") - (Error 725, Line 20, Col 3, Line 20, Col 17, "This union case does not take arguments") - (Error 725, Line 23, Col 3, Line 23, Col 13, "This union case does not take arguments") - (Error 725, Line 26, Col 3, Line 26, Col 14, "This union case does not take arguments") - (Error 725, Line 29, Col 3, Line 29, Col 13, "This union case does not take arguments") - (Warning 3548, Line 32, Col 3, Line 32, Col 9, "Pattern discard is not allowed for union case that takes no data.") - (Error 725, Line 35, Col 3, Line 35, Col 9, "This union case does not take arguments") - (Error 725, Line 38, Col 3, Line 38, Col 14, "This union case does not take arguments") - (Error 725, Line 42, Col 3, Line 42, Col 11, "This union case does not take arguments") - (Error 725, Line 48, Col 3, Line 48, Col 8, "This union case does not take arguments") - (Error 725, Line 51, Col 3, Line 51, Col 7, "This union case does not take arguments") - (Warning 3548, Line 53, Col 24, Line 53, Col 27, "Pattern discard is not allowed for union case that takes no data.") - (Error 725, Line 55, Col 25, Line 55, Col 28, "This union case does not take arguments") - (Error 725, Line 57, Col 25, Line 57, Col 29, "This union case does not take arguments") - (Error 725, Line 59, Col 24, Line 59, Col 32, "This union case does not take arguments") - ] \ No newline at end of file + [] + let ``Pattern named not allowed union case does not take any arguments with Lang preview`` compilation = + compilation + |> getCompilation + |> asFs + |> withLangVersion80 + |> withOptions ["--nowarn:25"] + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 725, Line 8, Col 3, Line 8, Col 9, "This union case does not take arguments") + (Error 725, Line 11, Col 3, Line 11, Col 14, "This union case does not take arguments") + (Error 725, Line 14, Col 3, Line 14, Col 10, "This union case does not take arguments") + (Error 725, Line 17, Col 3, Line 17, Col 12, "This union case does not take arguments") + (Error 725, Line 20, Col 3, Line 20, Col 17, "This union case does not take arguments") + (Error 725, Line 23, Col 3, Line 23, Col 13, "This union case does not take arguments") + (Error 725, Line 26, Col 3, Line 26, Col 14, "This union case does not take arguments") + (Error 725, Line 29, Col 3, Line 29, Col 13, "This union case does not take arguments") + (Warning 3548, Line 32, Col 3, Line 32, Col 9, "Pattern discard is not allowed for union case that takes no data.") + (Error 725, Line 35, Col 3, Line 35, Col 9, "This union case does not take arguments") + (Error 725, Line 38, Col 3, Line 38, Col 14, "This union case does not take arguments") + (Error 725, Line 42, Col 3, Line 42, Col 11, "This union case does not take arguments") + (Error 725, Line 48, Col 3, Line 48, Col 8, "This union case does not take arguments") + (Error 725, Line 51, Col 3, Line 51, Col 7, "This union case does not take arguments") + (Warning 3548, Line 53, Col 24, Line 53, Col 27, "Pattern discard is not allowed for union case that takes no data.") + (Error 725, Line 55, Col 25, Line 55, Col 28, "This union case does not take arguments") + (Error 725, Line 57, Col 25, Line 57, Col 29, "This union case does not take arguments") + (Error 725, Line 59, Col 24, Line 59, Col 32, "This union case does not take arguments") + ] \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index e8f044ed2f4..0256cea8d95 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -35,7 +35,7 @@ - + @@ -64,7 +64,7 @@ - + diff --git a/tests/FSharp.Compiler.ComponentTests/Globalization/GlobalizationTestCases.fs b/tests/FSharp.Compiler.ComponentTests/Globalization/GlobalizationTestCases.fs index 536ad488203..d5fad6b87ca 100644 --- a/tests/FSharp.Compiler.ComponentTests/Globalization/GlobalizationTestCases.fs +++ b/tests/FSharp.Compiler.ComponentTests/Globalization/GlobalizationTestCases.fs @@ -10,56 +10,57 @@ module ``Globalization Test Cases`` = let ``Compile global source file`` compilation = compilation + |> getCompilation |> asExe |> ignoreWarnings |> compile |> shouldSucceed |> withDiagnostics [ ] - [] + [] let ``Compile Arabic source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile gb18030 source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile HexCharEncode source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile Hindi source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile Mongolian source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile RightToLeft source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile Surrogates source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile Tamil source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile Tibetan source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile utf16 source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile utf8 source file`` compilation = ``Compile global source file`` compilation - [] + [] let ``Compile Yi source file`` compilation = ``Compile global source file`` compilation diff --git a/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs index 9d98106bcdb..d64262e856b 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs @@ -1,22 +1,23 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -// Run sequentially because of shared fsiSession. -[] -module Language.SequenceExpression.SequenceExpressionTests +namespace Language open FSharp.Test open Xunit open FSharp.Test.Compiler open FSharp.Test.ScriptHelpers +// Run sequentially because of shared fsiSession. +[] +module SequenceExpression = -let fsiSession = getSessionForEval [||] LangVersion.Preview + let fsiSession = getSessionForEval [||] LangVersion.Preview -let runCode = evalInSharedSession fsiSession + let runCode = evalInSharedSession fsiSession -[] -let ``Basic recursive case uses tail recursion``() = - Fsx """ + [] + let ``Basic recursive case uses tail recursion``() = + Fsx """ let rec f () = seq { try yield 123 @@ -25,44 +26,44 @@ let rec f () = seq { yield 789 yield! f() } - """ - |> withLangVersion80 - |> compile - |> verifyIL [" - .class auto ansi serializable sealed nested assembly beforefieldinit 'f@3-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field static assembly initonly class Test/'f@3-1' @_instance - .method assembly specialname rtspecialname - instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + """ + |> withLangVersion80 + |> compile + |> verifyIL [" + .class auto ansi serializable sealed nested assembly beforefieldinit 'f@3-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class Test/'f@3-1' @_instance + .method assembly specialname rtspecialname + instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ret - } - - .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerable`1 - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } + + .method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerable`1 + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { - .maxstack 8 - IL_0000: ldc.i4.s 123 - IL_0002: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Singleton(!!0) - IL_0007: ldsfld class Test/'f@5-2' Test/'f@5-2'::@_instance - IL_000c: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0011: tail. - IL_0013: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Append(class [runtime]System.Collections.Generic.IEnumerable`1, - class [runtime]System.Collections.Generic.IEnumerable`1) - IL_0018: ret - } "] - -[] -let ``A seq{try/with} happy path with multiple language elements``() = - Fsx """ + .maxstack 8 + IL_0000: ldc.i4.s 123 + IL_0002: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Singleton(!!0) + IL_0007: ldsfld class Test/'f@5-2' Test/'f@5-2'::@_instance + IL_000c: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0011: tail. + IL_0013: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Append(class [runtime]System.Collections.Generic.IEnumerable`1, + class [runtime]System.Collections.Generic.IEnumerable`1) + IL_0018: ret + } "] + + [] + let ``A seq{try/with} happy path with multiple language elements``() = + Fsx """ let rec mySeq inputEnumerable = seq { for x in inputEnumerable do @@ -85,13 +86,13 @@ let rec mySeq inputEnumerable = if (mySeq [0..5] |> Seq.sum) <> (1+(1+3)+3+4+5+5) then failwith $"Sum was {(mySeq [0..5] |> Seq.sum)} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``Inner try-finally's Dispose is executed before yielding from outer try-with``() = - Fsx """ + [] + let ``Inner try-finally's Dispose is executed before yielding from outer try-with``() = + Fsx """ let mutable l = [] let s() = seq { try @@ -124,16 +125,16 @@ let expectedList = "After sum"] if l<> expectedList then failwith $" List is %A{l}" - """ - |> runCode - |> shouldSucceed - -[] -[] -[] -[] -let ``A sequence expression can recurse itself from with clause``(recLevel:int) = - Fsx $""" + """ + |> runCode + |> shouldSucceed + + [] + [] + [] + [] + let ``A sequence expression can recurse itself from with clause``(recLevel:int) = + Fsx $""" let rec f () = seq {{ try yield 1 @@ -144,13 +145,13 @@ let rec f () = seq {{ let topNsum = f() |> Seq.take {recLevel} |> Seq.sum if topNsum <> {recLevel} then failwith $"Sum was {{topNsum}} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can yield from with clause``() = - Fsx """ + [] + let ``A sequence expression can yield from with clause``() = + Fsx """ let sum = seq { for x in [0;1] do @@ -162,13 +163,13 @@ let sum = |> Seq.sum if sum <> 110 then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can have try-with around foreach``() = - Fsx """ + [] + let ``A sequence expression can have try-with around foreach``() = + Fsx """ let mySeq (providedInput: seq) = seq { try @@ -180,13 +181,13 @@ let mySeq (providedInput: seq) = let mySum = (mySeq [3;2;1;0]) |> Seq.sum if mySum <> (6/3 + 6/2 + 6/1 + 100) then failwith $"Sum was {mySum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can have try-with around while``() = - Fsx """ + [] + let ``A sequence expression can have try-with around while``() = + Fsx """ let mySeq () = seq { let mutable x = 3 @@ -200,13 +201,13 @@ let mySeq () = let mySum = (mySeq () |> Seq.truncate 10) |> Seq.sum if mySum <> (6/3 + 6/2 + 6/1 + 100) then failwith $"Sum was {mySum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can yield! from with clause``() = - Fsx """ + [] + let ``A sequence expression can yield! from with clause``() = + Fsx """ let sum = seq { for x in [0;1] do @@ -218,13 +219,13 @@ let sum = |> Seq.sum if sum <> 16 then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can fail later in try/with and still get caught``() = - Fsx """ + [] + let ``A sequence expression can fail later in try/with and still get caught``() = + Fsx """ let sum = seq { try @@ -238,13 +239,13 @@ let sum = |> Seq.sum if sum <> (1+2+3) then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can have inner seq{try/with} in an outer try/with``() = - Fsx """ + [] + let ``A sequence expression can have inner seq{try/with} in an outer try/with``() = + Fsx """ let sum = seq { try @@ -256,13 +257,13 @@ let sum = |> Seq.sum if sum <> (1+1+1) then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can do multiple yields from try/with clause``() = - Fsx """ + [] + let ``A sequence expression can do multiple yields from try/with clause``() = + Fsx """ let sum = seq { for x in [0;1] do @@ -277,13 +278,13 @@ let sum = |> Seq.sum if sum <> (1+100+100+1+10+2) then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can yield from try and have empty with``() = - Fsx """ + [] + let ``A sequence expression can yield from try and have empty with``() = + Fsx """ let sum = seq { for x in [1;0] do @@ -295,13 +296,13 @@ let sum = |> Seq.sum if sum <> 10 then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can yield from with and have empty try``() = - Fsx """ + [] + let ``A sequence expression can yield from with and have empty try``() = + Fsx """ let sum = seq { for x in [1;0] do @@ -314,14 +315,14 @@ let sum = |> Seq.sum if sum <> 100 then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``A sequence expression can have implicit yields in try-with``() = - Fsx """ + [] + let ``A sequence expression can have implicit yields in try-with``() = + Fsx """ let sum = seq { for x in [0;1] do @@ -333,14 +334,14 @@ let sum = |> Seq.sum if sum <> 110 then failwith $"Sum was {sum} instead" - """ - |> runCode - |> shouldSucceed + """ + |> runCode + |> shouldSucceed -[] -let ``With clause in seq expression can bind specific exn type``() = + [] + let ``With clause in seq expression can bind specific exn type``() = - Fsx """ + Fsx """ open System let whatIsIt = seq { @@ -350,24 +351,24 @@ let whatIsIt = | :? AggregateException as exc when (exc.InnerException :? OperationCanceledException) -> () } |> Seq.head - """ - |> compile - |> verifyIL [ - """IL_0000: ldarg.1 - IL_0001: isinst [runtime]System.AggregateException - IL_0006: stloc.0 - IL_0007: ldloc.0"""; - - """IL_000a: ldloc.0 - IL_000b: callvirt instance class [runtime]System.Exception [runtime]System.Exception::get_InnerException() - IL_0010: stloc.1 - IL_0011: ldloc.1 - IL_0012: isinst [runtime]System.OperationCanceledException"""] - -[] -let ``With clause in seq expression can bind many exn subtypes``() = - - Fsx """ + """ + |> compile + |> verifyIL [ + """IL_0000: ldarg.1 + IL_0001: isinst [runtime]System.AggregateException + IL_0006: stloc.0 + IL_0007: ldloc.0"""; + + """IL_000a: ldloc.0 + IL_000b: callvirt instance class [runtime]System.Exception [runtime]System.Exception::get_InnerException() + IL_0010: stloc.1 + IL_0011: ldloc.1 + IL_0012: isinst [runtime]System.OperationCanceledException"""] + + [] + let ``With clause in seq expression can bind many exn subtypes``() = + + Fsx """ open System let whatIsIt = seq { @@ -381,17 +382,17 @@ let whatIsIt = | _ -> yield 1 } |> Seq.head - """ - |> runCode - |> shouldSucceed - -[] -[] -[] -[] -[] -let ``Propper type matching in seq{try/with} with implicit yield``(valInTry,valInWith1,valInWith2) = - Fsx $""" + """ + |> runCode + |> shouldSucceed + + [] + [] + [] + [] + [] + let ``Propper type matching in seq{try/with} with implicit yield``(valInTry,valInWith1,valInWith2) = + Fsx $""" let typedSeq = seq {{ for x in [0;1] do @@ -401,16 +402,16 @@ let typedSeq = |_ when x = 0 -> %s{valInWith1} |_ when x = 0 -> %s{valInWith2} }} - """ - |> withLangVersion80 - |> typecheck - |> shouldSucceed - -[] -[] -[] -let ``seq{try/with} using yield or implicit must be consistent``(valInTry,valInWith1,valInWith2) = - Fsx $""" + """ + |> withLangVersion80 + |> typecheck + |> shouldSucceed + + [] + [] + [] + let ``seq{try/with} using yield or implicit must be consistent``(valInTry,valInWith1,valInWith2) = + Fsx $""" let typedSeq = seq {{ for x in [0;1] do @@ -420,16 +421,16 @@ let typedSeq = |_ when x = 0 -> %s{valInWith1} |_ when x = 0 -> %s{valInWith2} }} - """ - |> withLangVersion80 - |> typecheck - |> shouldSucceed - -[] -[] -[] -let ``seq{try/with} mismatch implicit vs yield``(valInTry,valInWith1,valInWith2) = - Fsx $""" + """ + |> withLangVersion80 + |> typecheck + |> shouldSucceed + + [] + [] + [] + let ``seq{try/with} mismatch implicit vs yield``(valInTry,valInWith1,valInWith2) = + Fsx $""" let typedSeq = seq {{ for x in [0;1] do @@ -439,19 +440,19 @@ let typedSeq = |_ when x = 0 -> %s{valInWith1} |_ when x = 0 -> %s{valInWith2} }} - """ - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withDiagnosticMessageMatches "This expression returns a value of type 'int' but is implicitly discarded." - |> withDiagnosticMessageMatches "If you intended to use the expression as a value in the sequence then use an explicit 'yield'." - -[] -[] -[] -[] -let ``Type mismatch error in seq{try/with}``(valInTry,valInWith1,valInWith2) = - Fsx $""" + """ + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withDiagnosticMessageMatches "This expression returns a value of type 'int' but is implicitly discarded." + |> withDiagnosticMessageMatches "If you intended to use the expression as a value in the sequence then use an explicit 'yield'." + + [] + [] + [] + [] + let ``Type mismatch error in seq{try/with}``(valInTry,valInWith1,valInWith2) = + Fsx $""" let typedSeq = seq {{ for x in [0;1] do @@ -461,22 +462,22 @@ let typedSeq = |_ when x = 0 -> %s{valInWith1} |_ when x = 0 -> %s{valInWith2} }} - """ - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withErrorCode 1 - |> withDiagnosticMessageMatches "This expression was expected to have type" - - -[] -let printCode = """ printfn "Hello there" """ - -[] -[] -[] -let ``Missing result type in seq{try/with}``(valInTry,valInWith1,valInWith2) = - Fsx $""" + """ + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withErrorCode 1 + |> withDiagnosticMessageMatches "This expression was expected to have type" + + + [] + let printCode = """ printfn "Hello there" """ + + [] + [] + [] + let ``Missing result type in seq{try/with}``(valInTry,valInWith1,valInWith2) = + Fsx $""" let typedSeq = seq {{ for x in [0;1] do @@ -486,157 +487,161 @@ let typedSeq = |_ when x = 0 -> %s{valInWith1} |_ when x = 0 -> %s{valInWith2} }} - """ - |> withLangVersion80 - |> typecheck - |> shouldFail - |> withErrorCode 30 - |> withDiagnosticMessageMatches "Value restriction: The value 'typedSeq' has an inferred generic type" - |> withDiagnosticMessageMatches "val typedSeq: '_a seq" + """ + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withErrorCode 30 + |> withDiagnosticMessageMatches "Value restriction: The value 'typedSeq' has an inferred generic type" + |> withDiagnosticMessageMatches "val typedSeq: '_a seq" -[] -let ``yield may only be used within list, array, and sequence expressions``() = - Fsx """ + [] + let ``yield may only be used within list, array, and sequence expressions``() = + Fsx """ let f1 = yield [ 3; 4 ] let f2 = yield! [ 3; 4 ] - """ - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Error 747, Line 2, Col 10, Line 2, Col 15, "This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq { ... }', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements"); - (Error 747, Line 3, Col 10, Line 3, Col 16, "This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq { ... }', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements") - ] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 747, Line 2, Col 10, Line 2, Col 15, "This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq { ... }', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements"); + (Error 747, Line 3, Col 10, Line 3, Col 16, "This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq { ... }', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements") + ] -[] -let ``return may only be used within list, array, and sequence expressions``() = - Fsx """ + [] + let ``return may only be used within list, array, and sequence expressions``() = + Fsx """ let f1 = return [ 3; 4 ] let f2 = return! [ 3; 4 ] - """ - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Error 748, Line 2, Col 10, Line 2, Col 16, "This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'."); - (Error 748, Line 3, Col 10, Line 3, Col 17, "This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'.") - ] - -[] -let ``Sequence(SynExpr.Sequential) expressions should be of the form 'seq { ... } lang version 9``() = - Fsx """ + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 748, Line 2, Col 10, Line 2, Col 16, "This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'."); + (Error 748, Line 3, Col 10, Line 3, Col 17, "This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'.") + ] + + [] + let ``Sequence(SynExpr.Sequential) expressions should be of the form 'seq { ... } lang version 9``() = + Fsx """ { 1;10 } [| { 1;10 } |] let a = { 1;10 } let b = [| { 1;10 } |] let c = [ { 1;10 } ] - """ - |> withOptions [ "--nowarn:0020" ] - |> withLangVersion90 - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Error 740, Line 2, Col 1, Line 2, Col 9, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 3, Col 4, Line 3, Col 12, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 4, Col 9, Line 4, Col 17, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 5, Col 12, Line 5, Col 20, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 6, Col 11, Line 6, Col 19, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - ] + """ + |> withOptions [ "--nowarn:0020" ] + |> withLangVersion90 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 740, Line 2, Col 1, Line 2, Col 9, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 3, Col 4, Line 3, Col 12, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 4, Col 9, Line 4, Col 17, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 5, Col 12, Line 5, Col 20, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 6, Col 11, Line 6, Col 19, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + ] -[] -let ``Sequence(SynExpr.Sequential) expressions should be of the form 'seq { ... } lang version preview``() = - Fsx """ + [] + let ``Sequence(SynExpr.Sequential) expressions should be of the form 'seq { ... } lang version preview``() = + Fsx """ { 1;10 } [| { 1;10 } |] let a = { 1;10 } let b = [| { 1;10 } |] let c = [ { 1;10 } ] - """ - |> withOptions [ "--nowarn:0020" ] - |> withLangVersionPreview - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Error 740, Line 2, Col 1, Line 2, Col 9, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 3, Col 4, Line 3, Col 12, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 4, Col 9, Line 4, Col 17, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 5, Col 12, Line 5, Col 20, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - (Error 740, Line 6, Col 11, Line 6, Col 19, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") - ] - -// SOURCE=E_SequenceExpressions01.fs # E_SequenceExpressions01.fs -[] -let ``E_SequenceExpressions01 lang version 9`` compilation = - compilation - |> withOptions [ "--nowarn:0020" ] - |> withLangVersion90 - |> typecheck - |> shouldSucceed - -// SOURCE=E_SequenceExpressions01.fs # E_SequenceExpressions01.fs -[] -let ``E_SequenceExpressions01 lang version preview`` compilation = - compilation - |> withOptions [ "--nowarn:0020" ] - |> withLangVersionPreview - |> typecheck - |> shouldFail - |> withDiagnostics [ - (Warning 3873, Line 1, Col 1, Line 1, Col 10, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 3, Col 1, Line 3, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 5, Col 4, Line 5, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 7, Col 4, Line 7, Col 16, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 9, Col 9, Line 9, Col 18, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 11, Col 10, Line 11, Col 23, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 13, Col 12, Line 13, Col 21, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 15, Col 13, Line 15, Col 26, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 17, Col 11, Line 17, Col 20, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 19, Col 4, Line 19, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 21, Col 10, Line 21, Col 19, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 23, Col 3, Line 23, Col 12, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 25, Col 3, Line 25, Col 16, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 27, Col 9, Line 27, Col 18, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 29, Col 9, Line 29, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 31, Col 13, Line 31, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 33, Col 13, Line 33, Col 26, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 35, Col 34, Line 35, Col 51, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 37, Col 35, Line 37, Col 52, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 39, Col 10, Line 39, Col 19, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 41, Col 10, Line 41, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 45, Col 12, Line 45, Col 20, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 47, Col 13, Line 47, Col 25, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 49, Col 14, Line 49, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 51, Col 33, Line 51, Col 50, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 55, Col 12, Line 55, Col 21, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 57, Col 1, Line 57, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 59, Col 28, Line 59, Col 34, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 61, Col 44, Line 61, Col 52, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 61, Col 53, Line 61, Col 61, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 61, Col 62, Line 61, Col 71, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 65, Col 17, Line 65, Col 23, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 65, Col 34, Line 65, Col 44, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 67, Col 7, Line 67, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 67, Col 15, Line 67, Col 21, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 67, Col 23, Line 67, Col 30, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 69, Col 14, Line 69, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 71, Col 24, Line 71, Col 32, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 73, Col 25, Line 73, Col 33, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 74, Col 25, Line 74, Col 33, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - (Warning 3873, Line 76, Col 13, Line 76, Col 20, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") - ] - -// SOURCE=SequenceExpressions01.fs # SequenceExpressions01.fs -[] -let ``SequenceExpressions01 lang version 9`` compilation = - compilation - |> withOptions [ "--nowarn:0020" ] - |> withLangVersion90 - |> typecheck - |> shouldSucceed + """ + |> withOptions [ "--nowarn:0020" ] + |> withLangVersionPreview + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 740, Line 2, Col 1, Line 2, Col 9, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 3, Col 4, Line 3, Col 12, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 4, Col 9, Line 4, Col 17, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 5, Col 12, Line 5, Col 20, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + (Error 740, Line 6, Col 11, Line 6, Col 19, "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'") + ] + + // SOURCE=E_SequenceExpressions01.fs # E_SequenceExpressions01.fs + [] + let ``E_SequenceExpressions01 lang version 9`` compilation = + compilation + |> getCompilation + |> withOptions [ "--nowarn:0020" ] + |> withLangVersion90 + |> typecheck + |> shouldSucceed + + // SOURCE=E_SequenceExpressions01.fs # E_SequenceExpressions01.fs + [] + let ``E_SequenceExpressions01 lang version preview`` compilation = + compilation + |> getCompilation + |> withOptions [ "--nowarn:0020" ] + |> withLangVersionPreview + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 3873, Line 1, Col 1, Line 1, Col 10, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 3, Col 1, Line 3, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 5, Col 4, Line 5, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 7, Col 4, Line 7, Col 16, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 9, Col 9, Line 9, Col 18, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 11, Col 10, Line 11, Col 23, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 13, Col 12, Line 13, Col 21, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 15, Col 13, Line 15, Col 26, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 17, Col 11, Line 17, Col 20, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 19, Col 4, Line 19, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 21, Col 10, Line 21, Col 19, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 23, Col 3, Line 23, Col 12, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 25, Col 3, Line 25, Col 16, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 27, Col 9, Line 27, Col 18, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 29, Col 9, Line 29, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 31, Col 13, Line 31, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 33, Col 13, Line 33, Col 26, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 35, Col 34, Line 35, Col 51, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 37, Col 35, Line 37, Col 52, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 39, Col 10, Line 39, Col 19, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 41, Col 10, Line 41, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 45, Col 12, Line 45, Col 20, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 47, Col 13, Line 47, Col 25, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 49, Col 14, Line 49, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 51, Col 33, Line 51, Col 50, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 55, Col 12, Line 55, Col 21, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 57, Col 1, Line 57, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 59, Col 28, Line 59, Col 34, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 61, Col 44, Line 61, Col 52, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 61, Col 53, Line 61, Col 61, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 61, Col 62, Line 61, Col 71, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 65, Col 17, Line 65, Col 23, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 65, Col 34, Line 65, Col 44, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 67, Col 7, Line 67, Col 13, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 67, Col 15, Line 67, Col 21, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 67, Col 23, Line 67, Col 30, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 69, Col 14, Line 69, Col 22, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 71, Col 24, Line 71, Col 32, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 73, Col 25, Line 73, Col 33, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 74, Col 25, Line 74, Col 33, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + (Warning 3873, Line 76, Col 13, Line 76, Col 20, "This construct is deprecated. Sequence expressions should be of the form 'seq { ... }'") + ] + + // SOURCE=SequenceExpressions01.fs # SequenceExpressions01.fs + [] + let ``SequenceExpressions01 lang version 9`` compilation = + compilation + |> getCompilation + |> withOptions [ "--nowarn:0020" ] + |> withLangVersion90 + |> typecheck + |> shouldSucceed -// SOURCE=SequenceExpressions01.fs # SequenceExpressions01.fs -[] -let ``SequenceExpressions01 lang version preview`` compilation = - compilation - |> withOptions [ "--nowarn:0020" ] - |> withLangVersionPreview - |> typecheck - |> shouldSucceed \ No newline at end of file + // SOURCE=SequenceExpressions01.fs # SequenceExpressions01.fs + [] + let ``SequenceExpressions01 lang version preview`` compilation = + compilation + |> getCompilation + |> withOptions [ "--nowarn:0020" ] + |> withLangVersionPreview + |> typecheck + |> shouldSucceed \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/Miscellaneous/ListLiterals.fs b/tests/FSharp.Compiler.ComponentTests/Miscellaneous/ListLiterals.fs index 8c560628592..c866b61212d 100644 --- a/tests/FSharp.Compiler.ComponentTests/Miscellaneous/ListLiterals.fs +++ b/tests/FSharp.Compiler.ComponentTests/Miscellaneous/ListLiterals.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. namespace Miscellaneous @@ -8,9 +8,10 @@ open FSharp.Test.Compiler module ListLiterals = - [] + [] let ``List literals still have limited length in langversion 6`` compilation = compilation + |> getCompilation |> asFsx |> withLangVersion60 |> compile @@ -18,9 +19,10 @@ module ListLiterals = |> withErrorCode 742 |> withDiagnosticMessageMatches "This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList." - [] + [] let ``List literals have no limited length in langversion preview`` compilation = compilation + |> getCompilation |> asFsx |> withLangVersion70 |> compile diff --git a/tests/FSharp.Compiler.ComponentTests/OCamlCompat/OCamlCompat.fs b/tests/FSharp.Compiler.ComponentTests/OCamlCompat/OCamlCompat.fs index f3155e4c5cb..0e880debc61 100644 --- a/tests/FSharp.Compiler.ComponentTests/OCamlCompat/OCamlCompat.fs +++ b/tests/FSharp.Compiler.ComponentTests/OCamlCompat/OCamlCompat.fs @@ -9,9 +9,10 @@ open FSharp.Test.Compiler module ``OCamlCompat test cases`` = // SOURCE=E_IndentOff01.fs COMPILE_ONLY=1 SCFLAGS="--warnaserror --test:ErrorRanges" # E_IndentOff01.fs - [] + [] let ``E_IndentOff01_fs --warnaserror --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -21,9 +22,10 @@ module ``OCamlCompat test cases`` = ] - [] + [] let ``IndentOff02_fs --warnaserror"; "--mlcompatibility`` compilation = compilation + |> getCompilation |> asFsx |> withOcamlCompat |> withLangVersion50 @@ -32,9 +34,10 @@ module ``OCamlCompat test cases`` = //This construct is for ML compatibility\. Consider using a file with extension '\.ml' or '\.mli' instead\. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'\.$ - [] + [] let ``W_IndentOff03_fs --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -45,9 +48,10 @@ module ``OCamlCompat test cases`` = //NoMT SOURCE=IndentOff04.fsx COMPILE_ONLY=1 SCFLAGS="--warnaserror --mlcompatibility" FSIMODE=PIPE # IndentOff04.fsx - [] + [] let ``IndentOff04_fsx --warnaserror --mlcompatibility`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> withOcamlCompat @@ -59,9 +63,10 @@ module ``OCamlCompat test cases`` = //NoMT SOURCE=W_IndentOff05.fsx COMPILE_ONLY=1 SCFLAGS="--test:ErrorRanges" FSIMODE=PIPE # W_IndentOff05.fsx - [] + [] let ``W_IndentOff05_fsx --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -72,9 +77,10 @@ module ``OCamlCompat test cases`` = //NoMT SOURCE=E_IndentOff06.fsx COMPILE_ONLY=1 SCFLAGS="--warnaserror" FSIMODE=PIPE # E_IndentOff06.fsx - [] + [] let ``E_IndentOff06_fsx --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile @@ -85,18 +91,20 @@ module ``OCamlCompat test cases`` = // SOURCE=E_mlExtension01.ml COMPILE_ONLY=1 SCFLAGS="--warnaserror --test:ErrorRanges" # E_mlExtension01.ml - [] + [] let ``E_mlExtension01_ml --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--test:ErrorRanges"] |> compile |> shouldSucceed // SOURCE=mlExtension02.ml COMPILE_ONLY=1 SCFLAGS="--warnaserror --mlcompatibility" # mlExtension02.ml - [] + [] let ``mlExtension02_ml --warnaserror --mlcompatibility`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnaserror"; "--mlcompatibility"] |> withLangVersion50 @@ -105,9 +113,10 @@ module ``OCamlCompat test cases`` = // SOURCE=W_mlExtension03.ml COMPILE_ONLY=1 SCFLAGS="--test:ErrorRanges" # W_mlExtension03.ml - [] + [] let `` W_mlExtension03_ml --test:ErrorRanges`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--test:ErrorRanges"] |> compile @@ -115,9 +124,10 @@ module ``OCamlCompat test cases`` = // SOURCE=Hat01.fs COMPILE_ONLY=1 SCFLAGS="--test:ErrorRanges" # Hat01.fs - [] + [] let ``Hat01_fs --warnaserror --mlcompatibility`` compilation = compilation + |> getCompilation |> asFsx |> withOptions ["--warnaserror"; "--mlcompatibility"] |> withLangVersion50 @@ -126,9 +136,10 @@ module ``OCamlCompat test cases`` = // SOURCE=W_Hat01.fs COMPILE_ONLY=1 SCFLAGS="--test:ErrorRanges" # W_Hat01.fs - [] + [] let ``W_Hat01_fs --warnaserror --mlcompatibility`` compilation = compilation + |> getCompilation |> asExe |> withOptions ["--test:ErrorRanges"; "--mlcompatibility"] |> withLangVersion50 @@ -137,18 +148,20 @@ module ``OCamlCompat test cases`` = // SOURCE=NoParensInLet01.fs COMPILE_ONLY=1 SCFLAGS="--test:ErrorRanges" # NoParensInLet01.fs - [] + [] let ``NoParensInLet01_fs`` compilation = compilation + |> getCompilation |> asExe |> compile |> shouldSucceed // SOURCE=W_MultiArgumentGenericType.fs # W_MultiArgumentGenericType.fs - [] + [] let ``W_MultiArgumentGenericType_fs``compilation = compilation + |> getCompilation |> asExe |> ignoreWarnings |> compile @@ -159,9 +172,10 @@ module ``OCamlCompat test cases`` = // SOURCE=OCamlStyleArrayIndexing.fs SCFLAGS="--mlcompatibility" # OCamlStyleArrayIndexing.fs - [] + [] let ``OCamlStyleArrayIndexing_fs --mlcompatibility`` compilation = compilation + |> getCompilation |> asExe |> withOcamlCompat |> withLangVersion50 diff --git a/tests/FSharp.Compiler.ComponentTests/OnOverridesAndIFaceImpl.fs b/tests/FSharp.Compiler.ComponentTests/OnOverridesAndIFaceImpl.fs deleted file mode 100644 index c5d41598aa1..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/OnOverridesAndIFaceImpl.fs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Conformance.DeclarationElements.AccessibilityAnnotations - -open Xunit -open FSharp.Test -open FSharp.Test.Compiler - -module Basic = - - let verifyCompile compilation = - compilation - |> asExe - |> withOptions ["--nowarn:988"] - |> compile - - let verifyCompileAndRun compilation = - compilation - |> asExe - |> withOptions ["--nowarn:988"] - |> compileAndRun - - // SOURCE=E_InterfaceImpl01.fs SCFLAGS="--test:ErrorRanges" # E_InterfaceImpl01.fs - [] - let ``E_InterfaceImpl01.fs`` compilation = - compilation - |> verifyCompile - |> shouldFail - |> withDiagnostics [ - (Error 410, Line 5, Col 19, Line 5, Col 20, "The type 'A' is less accessible than the value, member or type 'x' it is used in.") - ] - - // SOURCE=E_OnOverrides01.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides01.fs - [] - let ``E_OnOverrides01.fs`` compilation = - compilation - |> verifyCompile - |> shouldFail - |> withDiagnostics [ - (Error 410, Line 5, Col 19, Line 5, Col 20, "The type 'A' is less accessible than the value, member or type 'x' it is used in.") - ] - - // SOURCE=E_OnOverrides02.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides02.fs - [] - let ``E_OnOverrides02.fs`` compilation = - compilation - |> verifyCompile - |> shouldFail - |> withDiagnostics [ - (Error 410, Line 5, Col 19, Line 5, Col 20, "The type 'A' is less accessible than the value, member or type 'x' it is used in.") - ] - - // SOURCE=E_OnOverrides03.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides03.fs - [] - let ``E_OnOverrides03.fs`` compilation = - compilation - |> verifyCompile - |> shouldFail - |> withDiagnostics [ - (Error 410, Line 5, Col 19, Line 5, Col 20, "The type 'A' is less accessible than the value, member or type 'x' it is used in.") - ] - - // SOURCE=E_OnOverrides04.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides04.fs - [] - let ``E_OnOverrides04.fs`` compilation = - compilation - |> verifyCompile - |> shouldFail - |> withDiagnostics [ - (Error 410, Line 5, Col 19, Line 5, Col 20, "The type 'A' is less accessible than the value, member or type 'x' it is used in.") - ] - - // SOURCE=E_OnOverrides05.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides05.fs - [] - let ``E_OnOverrides05.fs`` compilation = - compilation - |> verifyCompile - |> shouldFail - |> withDiagnostics [ - (Error 410, Line 5, Col 19, Line 5, Col 20, "The type 'A' is less accessible than the value, member or type 'x' it is used in.") - ] diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index 3c2253aeb44..2909ee6696f 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -409,17 +409,22 @@ module rec Compiler = let CSharpFromPath (path: string) : CompilationUnit = csFromString (SourceFromPath path) |> CS - let asFsx (cUnit: CompilationUnit) : CompilationUnit = - match cUnit with - | FS src -> FS {src with Source=SourceCodeFileKind.Fsx({FileName=src.Source.GetSourceFileName; SourceText=src.Source.GetSourceText})} - | _ -> failwith "Only F# compilation can be of type Fsx." - let asFs (cUnit: CompilationUnit) : CompilationUnit = match cUnit with | FS { Source = SourceCodeFileKind.Fsi _} -> cUnit | FS src -> FS {src with Source=SourceCodeFileKind.Fs({FileName=src.Source.GetSourceFileName; SourceText=src.Source.GetSourceText})} | _ -> failwith "Only F# compilation can be of type Fs." + let asFsi (cUnit: CompilationUnit) : CompilationUnit = + match cUnit with + | FS src -> FS {src with Source=SourceCodeFileKind.Fsi({FileName=src.Source.GetSourceFileName; SourceText=src.Source.GetSourceText})} + | _ -> failwith "Only F# compilation can be of type Fsi." + + let asFsx (cUnit: CompilationUnit) : CompilationUnit = + match cUnit with + | FS src -> FS {src with Source=SourceCodeFileKind.Fsx({FileName=src.Source.GetSourceFileName; SourceText=src.Source.GetSourceText})} + | _ -> failwith "Only F# compilation can be of type Fsx." + let withName (name: string) (cUnit: CompilationUnit) : CompilationUnit = match cUnit with | FS src -> FS { src with Name = Some name } diff --git a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj index 61d1a6cfe7a..c4f6d806c1f 100644 --- a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj +++ b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj @@ -43,7 +43,7 @@ - + diff --git a/tests/FSharp.Test.Utilities/InlineFileDataAttribute.fs b/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs similarity index 79% rename from tests/FSharp.Test.Utilities/InlineFileDataAttribute.fs rename to tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs index 4d1445b9520..958de12ea57 100644 --- a/tests/FSharp.Test.Utilities/InlineFileDataAttribute.fs +++ b/tests/FSharp.Test.Utilities/FileInlineDataAttribute.fs @@ -33,11 +33,13 @@ type BooleanOptions = /// Takes a file, relative to current test suite's root. /// Returns a CompilationUnit with encapsulated source code, error baseline and IL baseline (if any). [] -type FileInlineData (directory: string, filename: string) = +type FileInlineData(filename: string, realsig: BooleanOptions option, optimize: BooleanOptions option, []directory: string) = inherit DataAttribute() - let mutable optimize: BooleanOptions option = None - let mutable realsig: BooleanOptions option = None + let mutable directory: string = directory + let mutable filename: string = filename + let mutable optimize: BooleanOptions option = optimize + let mutable realsig: BooleanOptions option = realsig static let computeBoolValues opt = match opt with @@ -46,11 +48,15 @@ type FileInlineData (directory: string, filename: string) = | Some BooleanOptions.Both -> [|Some true; Some false|] | _ -> [|None|] - static let convertToNullableBool (opt: bool option): obj = + static let convertToBoxed opt = match opt with | None -> null | Some opt -> box opt + new (filename: string, []directory: string) = FileInlineData(filename, None, None, directory) + + member _.Directory with set v = directory <- v + member _.Optimize with set v = optimize <- Some v member _.Realsig with set v = realsig <- Some v @@ -59,7 +65,7 @@ type FileInlineData (directory: string, filename: string) = let getOptions realsig optimize = - let compilationHelper = CompilationHelper(filename, directory, convertToNullableBool realsig, convertToNullableBool optimize) + let compilationHelper = CompilationHelper(filename, directory, convertToBoxed realsig, convertToBoxed optimize) [| box (compilationHelper) |] let results = @@ -74,7 +80,8 @@ type FileInlineData (directory: string, filename: string) = results // realsig and optimized are boxed so null = not set, true or false = set -and CompilationHelper internal (filename: string, directory: string, realsig: obj, optimize: obj) = +and [] + CompilationHelper internal (filename: obj, directory: obj, realsig: obj, optimize: obj) = let mutable filename = filename let mutable directory = directory @@ -104,18 +111,24 @@ and CompilationHelper internal (filename: string, directory: string, realsig: ob | None, Some opt -> Some $"{opt}" | _ -> None - new() = CompilationHelper("", "", null, null) + new() = CompilationHelper(null, null, null, null) - // Define the implicit conversion operator - static member op_Implicit(helper: CompilationHelper) : CompilationUnit = + static member getCompilation(helper: CompilationHelper) : CompilationUnit = helper.Value () - member _.Value(): CompilationUnit = + member private _.Value(): CompilationUnit = let frame = StackTrace().GetFrame(1) // Get the calling method's frame let methodInfo = frame.GetMethod() :?> MethodInfo + let directory = + let path = string directory + if File.Exists(path) then + Path.GetDirectoryName(path) + else + path let directoryAttribute = DirectoryAttribute(directory) - directoryAttribute.Includes <- [| filename |] + + if not (isNull filename) then directoryAttribute.Includes <- [| string filename |] let realsigBsl = (getBaseline realsig ".RealInternalSignature") let optimizeBsl = (getBaseline optimize ".Optimize") diff --git a/tests/fsharp/typecheck/sigs/neg110.bsl b/tests/fsharp/typecheck/sigs/neg110.bsl index 1cdd563a742..60cae991283 100644 --- a/tests/fsharp/typecheck/sigs/neg110.bsl +++ b/tests/fsharp/typecheck/sigs/neg110.bsl @@ -1,2 +1,2 @@ -neg110.fs(5,3,5,15): typecheck error FS3242: This type does not inherit Attribute, it will not work correctly with other .NET languages. +neg110.fs(5,3,5,15): typecheck error FS3242: This type does not inherit Attribute, it will not work correctly with other .NET languages.