diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/Basic.fs new file mode 100644 index 0000000000000000000000000000000000000000..3101f6d20472a04daf61bcb5c0ed4142c618a978 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/Basic.fs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.ComponentTests.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_ExposeLessVisible01.fs # E_ExposeLessVisible01.fs + [] + let ``E_ExposeLessVisible01_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_BaseIFaceLessAccessible01.fs SCFLAGS="-a --test:ErrorRanges" # E_BaseIFaceLessAccessible01.fs + [] + let ``E_BaseIFaceLessAccessible01_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 410, Line 11, Col 8, Line 11, Col 23, "The type 'I1' is less accessible than the value, member or type 'IAmAnInterface1' it is used in.") + ] + + //SOURCE=E_LocalLetBinding02.fs SCFLAGS="--test:ErrorRanges" # E_LocalLetBinding02.fs + [] + let ``E_LocalLetBinding02_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 646, Line 7, Col 13, Line 7, Col 16, "Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions.") + ] + + //SOURCE=E_privateThingsInaccessible.fs # E_privateThingsInaccessible.fs + [] + let ``E_privateThingsInaccessible_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 1094, Line 18, Col 17, Line 18, Col 41, "The value 'somePrivateField' is not accessible from this code location") + (Error 1094, Line 19, Col 17, Line 19, Col 42, "The value 'somePrivateMethod' is not accessible from this code location") + (Error 491, Line 23, Col 17, Line 23, Col 34, "The member or object constructor 'PrivateMethod' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + ] + + //SOURCE=E_privateThingsInaccessible02.fs SCFLAGS="--test:ErrorRanges" # E_privateThingsInaccessible02.fs + [] + let ``E_PrivateThingsInaccessible02_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 1092, Line 26, Col 19, Line 26, Col 32, "The type 'PrivateModule' is not accessible from this code location") + (Error 1094, Line 26, Col 17, Line 26, Col 34, "The value 'x' is not accessible from this code location") + (Error 1092, Line 27, Col 19, Line 27, Col 32, "The type 'PrivateModule' is not accessible from this code location") + (Error 1094, Line 27, Col 17, Line 27, Col 34, "The value 'f' is not accessible from this code location") + (Error 1094, Line 29, Col 17, Line 29, Col 20, "The value 'y' is not accessible from this code location") + (Error 1094, Line 30, Col 17, Line 30, Col 20, "The value 'g' is not accessible from this code location") + ] + + //SOURCE=E_privateThingsInaccessible03.fs SCFLAGS="--test:ErrorRanges" # E_privateThingsInaccessible03.fs + [] + let ``E_PrivateThingsInaccessible03_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 1092, Line 11, Col 15, Line 11, Col 28, "The type 'PrivateModule' is not accessible from this code location") + (Error 1094, Line 11, Col 13, Line 11, Col 30, "The value 'x' is not accessible from this code location") + (Error 39, Line 15, Col 13, Line 15, Col 26, "The value, namespace, type or module 'PrivateModule' is not defined.") + ] + + //SOURCE=E_privateThingsInaccessible04.fs SCFLAGS="--test:ErrorRanges" # E_privateThingsInaccessible04.fs + [] + let ``E_PrivateThingsInaccessible04_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 39, Line 25, Col 17, Line 25, Col 30, "The value, namespace, type or module 'PrivateModule' is not defined.") + (Error 39, Line 26, Col 17, Line 26, Col 30, "The value, namespace, type or module 'PrivateModule' is not defined.") + (Error 39, Line 28, Col 17, Line 28, Col 18, "The value or constructor 'y' is not defined.") + (Error 39, Line 29, Col 17, Line 29, Col 18, "The value or constructor 'g' is not defined.") + ] + + //SOURCE=E_privateThingsInaccessible05.fs SCFLAGS="--test:ErrorRanges" # E_privateThingsInaccessible05.fs + [] + let ``E_PrivateThingsInaccessible05_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 1096, Line 11, Col 9, Line 11, Col 24, "The record, struct or class field 'foo' is not accessible from this code location") + ] + + //SOURCE=E_PrivateImplicitCtor01.fs SCFLAGS="--test:ErrorRanges" # E_PrivateImplicitCtor01.fs + [] + let ``E_PrivateImplicitCtor01_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 509, Line 24, Col 10, Line 24, Col 18, "Method or object constructor 'C' not found") + ] + + //SOURCE=E_ProtectedThingsInaccessible01.fs SCFLAGS="--test:ErrorRanges" # E_ProtectedThingsInaccessible01.fs + [] + let ``E_ProtectedThingsInaccessible01_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 629, Line 11, Col 24, Line 11, Col 41, "Method 'MemberwiseClone' is not accessible from this code location") + ] + + //SOURCE=E_MoreAccessibleBaseClass01.fs # E_MoreAccessibleBaseClass01.fs + [] + let ``E_MoreAccessibleBaseClass01_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 410, Line 10, Col 6, Line 10, Col 8, "The type 'C1' is less accessible than the value, member or type 'C2' it is used in.") + ] + + //SOURCE=E_MoreAccessibleBaseClass02.fs # E_MoreAccessibleBaseClass02.fs + [] + let ``E_MoreAccessibleBaseClass02_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 410, Line 12, Col 6, Line 12, Col 7, "The type 'I2' is less accessible than the value, member or type 'D' it is used in.") + (Error 410, Line 18, Col 6, Line 18, Col 25, "The type 'I3' is less accessible than the value, member or type 'IAmAnotherInterface' it is used in.") + ] + + //SOURCE=InterfaceImplementationVisibility.fs # InterfaceImplementationVisibility.fs + [] + let ``InterfaceImplementationVisibility_fs`` compilation = + compilation + |> verifyCompileAndRun + |> shouldSucceed + + //SOURCE=InternalizedIFaces02.fs SCFLAGS="-a --warnaserror" # InternalizedIFaces02.fs + [] + let ``InternalizedIFaces02_fs`` compilation = + compilation + |> withOptions ["--nowarn:1178";] + |> verifyCompileAndRun + |> shouldSucceed + + //SOURCE=internalMethodsWorkCorrectly.fs # InternalMethodsWorkCorrectly.fs + [] + let ``InternalMethodsWorkCorrectly_fs`` compilation = + compilation + |> verifyCompileAndRun + |> shouldSucceed + + //SOURCE=LessOrMoreAccessibleCode01.fs # LessOrMoreAccessibleCode01.fs + [] + let ``LessOrMoreAccessibleCode01_fs`` compilation = + compilation + |> verifyCompileAndRun + |> shouldSucceed + + //SOURCE=LocalLetBinding01.fs SCFLAGS="-a --test:ErrorRanges" # LocalLetBinding01.fs + [] + let ``LocalLetBinding01_fs`` compilation = + compilation + |> verifyCompileAndRun + |> shouldSucceed diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_BaseIFaceLessAccessible01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_BaseIFaceLessAccessible01.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_BaseIFaceLessAccessible01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_BaseIFaceLessAccessible01.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_ExposeLessVisible01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_ExposeLessVisible01.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_ExposeLessVisible01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_ExposeLessVisible01.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_LocalLetBinding02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_LocalLetBinding02.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_LocalLetBinding02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_LocalLetBinding02.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_MoreAccessibleBaseClass01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_MoreAccessibleBaseClass01.fs similarity index 98% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_MoreAccessibleBaseClass01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_MoreAccessibleBaseClass01.fs index 3e6a29e0b485bbc3af9c768c1c80dd11b31c035f..9107f78af85ba95ced43f34fb20ffa024bc6c880 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_MoreAccessibleBaseClass01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_MoreAccessibleBaseClass01.fs @@ -13,5 +13,3 @@ type C2() = let c = C2() - -exit 1 diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_MoreAccessibleBaseClass02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_MoreAccessibleBaseClass02.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_MoreAccessibleBaseClass02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_MoreAccessibleBaseClass02.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_PrivateImplicitCtor01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_PrivateImplicitCtor01.fs similarity index 80% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_PrivateImplicitCtor01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_PrivateImplicitCtor01.fs index c1b56a80d9e1bc0aa430523b1f45d8055d4e0e64..370fa232ff145691e1d3d2bbb3d9747bde33c963 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_PrivateImplicitCtor01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_PrivateImplicitCtor01.fs @@ -14,12 +14,12 @@ type C private (x : int) = // OK: Access public ctor let t1 = new A(1) -if t1.Value <> 1 then exit 1 +if t1.Value <> 1 then failwith "Failed: 1" // OK: Access internal ctor let t2 = new B(2) -if t2.Value <> 2 then exit 1 +if t2.Value <> 2 then failwith "Failed: 2" // ERROR: Access private ctor let t3 = new C(3) -if t3.Value <> 3 then exit 1 +if t3.Value <> 3 then failwith "Failed: 3" diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_ProtectedThingsInaccessible01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_ProtectedThingsInaccessible01.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_ProtectedThingsInaccessible01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_ProtectedThingsInaccessible01.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_privateThingsInaccessible.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_privateThingsInaccessible.fs similarity index 95% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_privateThingsInaccessible.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_privateThingsInaccessible.fs index b27b9216a278b4e5fb98994e7257a83d9e9862d9..3dd086a4ed0b336c2067a315c99f2a9599df746e 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_privateThingsInaccessible.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_privateThingsInaccessible.fs @@ -22,5 +22,3 @@ module Module2 = let x = new Module1.Foo() let test3 = x.PrivateMethod() - // Shouldn't compile and get this far - exit 1 diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_privateThingsInaccessible02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_privateThingsInaccessible02.fs similarity index 97% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_privateThingsInaccessible02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_privateThingsInaccessible02.fs index 96ba19b6239495c4d4b2065d5fb7d7f821a940e0..a81ab93c2524b915d806c3b7fb1f107361006528 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_privateThingsInaccessible02.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_privateThingsInaccessible02.fs @@ -32,5 +32,3 @@ module Module1 = let test8 = M.PublicModule.x // OK let test9 = M.PublicModule.f 2 // OK -// Shouldn't compile and get this far -exit 1 diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_privateThingsInaccessible03.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_privateThingsInaccessible03.fs similarity index 99% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_privateThingsInaccessible03.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_privateThingsInaccessible03.fs index 34913d3b89feced49d42e622c82cd8ba71193581..6cbba2d08804eb3b96cc9cb2adf0bd6ca1d05699 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_privateThingsInaccessible03.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_privateThingsInaccessible03.fs @@ -13,5 +13,3 @@ module Module1 = module Module2 = open M let _ = PrivateModule.x - - diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_privateThingsInaccessible04.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_privateThingsInaccessible04.fs similarity index 92% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_privateThingsInaccessible04.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_privateThingsInaccessible04.fs index 965d40d1e4e083ae9e744ea728e1bac6f70134c5..ad8230267ad1937456d1d5775a6dbce7410eb4c2 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_privateThingsInaccessible04.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_privateThingsInaccessible04.fs @@ -30,12 +30,7 @@ module Module2 = let test8 = PublicModule.x // OK let test9 = PublicModule.f 2 // OK - - // Shouldn't compile and get this far - exit 1 -// Shouldn't compile and get this far -exit 1 diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_privateThingsInaccessible05.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_privateThingsInaccessible05.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/E_privateThingsInaccessible05.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/E_privateThingsInaccessible05.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/InterfaceImplementationVisibility.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/InterfaceImplementationVisibility.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/InterfaceImplementationVisibility.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/InterfaceImplementationVisibility.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/InternalMethodsWorkCorrectly.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/InternalMethodsWorkCorrectly.fs similarity index 89% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/InternalMethodsWorkCorrectly.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/InternalMethodsWorkCorrectly.fs index 68db6345dd53141dd29038e804059294c1566f26..63bf92bd336bfffca58644cf560a2c75d5d4e70d 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/InternalMethodsWorkCorrectly.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/InternalMethodsWorkCorrectly.fs @@ -19,6 +19,5 @@ module testModule = let result = x.InternalMethod_GetDevoweledString() - if result <> InternalModule.deVowelStr startingValue then exit 1 - - exit 0 + if result <> InternalModule.deVowelStr startingValue then failwith "Failed: 1" + diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/InternalizedIFaces02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/InternalizedIFaces02.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/InternalizedIFaces02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/InternalizedIFaces02.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/LessOrMoreAccessibleCode01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/LessOrMoreAccessibleCode01.fs similarity index 88% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/LessOrMoreAccessibleCode01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/LessOrMoreAccessibleCode01.fs index 12c891544c62de26bd18e40fc065da2e3f318566..01506866fccf4ef5911a1e0aed7462fc14826516 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/LessOrMoreAccessibleCode01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/LessOrMoreAccessibleCode01.fs @@ -17,6 +17,4 @@ let internal a = HelperModule.make 2 let b = Module.makeData 1 -if HelperModule.handle a <> 2 || Module.getInt b <> 1 then exit 1 - -exit 0 +if HelperModule.handle a <> 2 || Module.getInt b <> 1 then failwith "Failed: 1" diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/LocalLetBinding01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/LocalLetBinding01.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/LocalLetBinding01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/Basic/LocalLetBinding01.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_InterfaceImpl01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_InterfaceImpl01.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_InterfaceImpl01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_InterfaceImpl01.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides01.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides01.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides02.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides02.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides03.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides03.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides03.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides03.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides04.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides04.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides04.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides04.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides05.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides05.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides05.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/E_OnOverrides05.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/OnOverridesAndIFaceImpl.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/OnOverridesAndIFaceImpl.fs new file mode 100644 index 0000000000000000000000000000000000000000..5e549a0308652f23276e7e35d78f78c4a34e2ea1 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/OnOverridesAndIFaceImpl.fs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.ComponentTests.Conformance.DeclarationElements.AccessibilityAnnotations + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module OnOverridesAndIFaceImpl = + + 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 941, Line 19, Col 38, Line 19, Col 40, "Accessibility modifiers are not permitted on overrides or interface implementations") + (Error 941, Line 24, Col 39, Line 24, Col 41, "Accessibility modifiers are not permitted on overrides or interface implementations") + (Error 941, Line 29, Col 40, Line 29, Col 42, "Accessibility modifiers are not permitted on overrides or interface implementations") + ] + + // SOURCE=E_OnOverrides01.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides01.fs + [] + let ``E_OnOverrides01_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 941, Line 13, Col 33, Line 13, Col 34, "Accessibility modifiers are not permitted on overrides or interface implementations") + (Error 941, Line 18, Col 34, Line 18, Col 35, "Accessibility modifiers are not permitted on overrides or interface implementations") + (Error 941, Line 23, Col 35, Line 23, Col 36, "Accessibility modifiers are not permitted on overrides or interface implementations") + ] + + // SOURCE=E_OnOverrides02.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides02.fs + [] + let ``E_OnOverrides02_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 941, Line 14, Col 28, Line 14, Col 29, "Accessibility modifiers are not permitted on overrides or interface implementations") + (Error 941, Line 20, Col 28, Line 20, Col 29, "Accessibility modifiers are not permitted on overrides or interface implementations") + (Error 941, Line 26, Col 28, Line 26, Col 29, "Accessibility modifiers are not permitted on overrides or interface implementations") + ] + + // SOURCE=E_OnOverrides03.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides03.fs + [] + let ``E_OnOverrides03_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 941, Line 15, Col 28, Line 15, Col 29, "Accessibility modifiers are not permitted on overrides or interface implementations") + (Error 941, Line 21, Col 28, Line 21, Col 29, "Accessibility modifiers are not permitted on overrides or interface implementations") + (Error 941, Line 27, Col 28, Line 27, Col 29, "Accessibility modifiers are not permitted on overrides or interface implementations") + ] + + // SOURCE=E_OnOverrides04.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides04.fs + [] + let ``E_OnOverrides04_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 941, Line 14, Col 28, Line 14, Col 29, "Accessibility modifiers are not permitted on overrides or interface implementations") + (Error 941, Line 20, Col 28, Line 20, Col 29, "Accessibility modifiers are not permitted on overrides or interface implementations") + (Error 941, Line 26, Col 28, Line 26, Col 29, "Accessibility modifiers are not permitted on overrides or interface implementations") + ] + + // SOURCE=E_OnOverrides05.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides05.fs + [] + let ``E_OnOverrides05_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 941, Line 19, Col 28, Line 19, Col 29, "Accessibility modifiers are not permitted on overrides or interface implementations") + ] diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/AccessProtectedInstance01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/AccessProtectedInstance01.fs similarity index 89% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/AccessProtectedInstance01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/AccessProtectedInstance01.fs index 083666b1eb29e5a71e4d733ea0dee278b4bf7f0d..4072df095bb73e610405af6bc181a278f5be1c3e 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/AccessProtectedInstance01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/AccessProtectedInstance01.fs @@ -16,4 +16,4 @@ end let r1 = DerivedClass().SomeMethod() let r2 = DerivedClass.AnotherMethod() -exit <| if r1 <> 3 && r2 <> 4 then 1 else 0 +if r1 <> 3 && r2 <> 4 then failwith "Failed: 1" diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/AccessProtectedStatic01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/AccessProtectedStatic01.fs similarity index 77% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/AccessProtectedStatic01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/AccessProtectedStatic01.fs index 0f013c0202357030181bd527fa3fecd9daa0036b..b85a8f4ed542151d30315148cefddf26221d1424 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/AccessProtectedStatic01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/AccessProtectedStatic01.fs @@ -12,6 +12,6 @@ end try let r1 = DerivedClass().SomeMethod() let r2 = DerivedClass.AnotherMethod() - exit <| if r1 <> 3 && r2 <> 3 then 1 else 0 + if r1 <> 3 && r2 <> 3 then failwith "Failed: 1" with - | :? System.MethodAccessException -> exit 1 + | :? System.MethodAccessException -> failwith "Failed: 1" diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/BaseClass.cs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/BaseClass.cs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/BaseClass.cs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/BaseClass.cs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_AccessPrivateMember01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_AccessPrivateMember01.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_AccessPrivateMember01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_AccessPrivateMember01.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_AccessProtectedInstance01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_AccessProtectedInstance01.fs similarity index 98% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_AccessProtectedInstance01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_AccessProtectedInstance01.fs index 825897c850df0d0f3605217d5a92928c7107e13e..7aba4c34ce3a4a7cd1b06ffdc19645a469626362 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_AccessProtectedInstance01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_AccessProtectedInstance01.fs @@ -15,5 +15,3 @@ end let r3 = DerivedClass().SomeMethod2() let r4 = DerivedClass.AnotherMethod2() - -exit 1 diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_OnProperty01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_OnProperty01.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_OnProperty01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_OnProperty01.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_OnProperty02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_OnProperty02.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_OnProperty02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/E_OnProperty02.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/OnProperty01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/OnProperty01.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/OnProperty01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/OnProperty01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/OnTypeMembers.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/OnTypeMembers.fs new file mode 100644 index 0000000000000000000000000000000000000000..66dede8fded0dcdf23e79e7612af8277f1a37893 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/OnTypeMembers.fs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.ComponentTests.Conformance.DeclarationElements.AccessibilityAnnotations + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module OnTypeMembers = + + let verifyCompile compilation = + compilation + |> asExe + |> withOptions ["--nowarn:988"] + |> compile + + let verifyCompileAndRun compilation = + compilation + |> asExe + |> withOptions ["--nowarn:988"] + |> 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 + |> 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 + |> withReferences [lib] + |> verifyCompileAndRun + |> shouldSucceed + + // SOURCE=E_AccessPrivateMember01.fs SCFLAGS="--test:ErrorRanges" # E_AccessPrivateMember01.fs + [] + let ``E_AccessPrivateMember01_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Warning 1178, Line 9, Col 10, Line 9, Col 17, "The struct, record or union type 'SpecSet' is not structurally comparable because the type 'SpecMulti' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type 'SpecSet' to clarify that the type is not comparable") + (Error 491, Line 14, Col 13, Line 14, Col 28, "The member or object constructor 'Impl' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + ] + + // SOURCE=E_OnProperty01.fs # E_OnProperty01.fs + [] + let ``E_OnProperty01_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 491, Line 42, Col 1, Line 42, Col 6, "The member or object constructor 'Foo' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + (Error 491, Line 42, Col 9, Line 42, Col 16, "The member or object constructor 'test1' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + (Error 491, Line 42, Col 19, Line 42, Col 26, "The member or object constructor 'test2' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + (Error 491, Line 42, Col 29, Line 42, Col 36, "The member or object constructor 'test5' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + (Error 491, Line 42, Col 40, Line 42, Col 47, "The member or object constructor 'test6' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + (Error 807, Line 42, Col 60, Line 42, Col 67, "Property 'test8' is not readable") + (Error 491, Line 43, Col 1, Line 43, Col 13, "The member or object constructor 'test3' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + (Error 491, Line 44, Col 1, Line 44, Col 13, "The member or object constructor 'test4' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + (Error 491, Line 45, Col 1, Line 45, Col 13, "The member or object constructor 'test5' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + (Error 491, Line 46, Col 1, Line 46, Col 13, "The member or object constructor 'test6' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + (Error 810, Line 47, Col 1, Line 47, Col 8, "Property 'test7' cannot be set") + (Error 257, Line 47, Col 1, Line 47, Col 8, "Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'.") + ] + + // SOURCE=E_OnProperty02.fs SCFLAGS="--test:ErrorRanges" # E_OnProperty02.fs + [] + let ``E_OnProperty02_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 10, Line 15, Col 49, Line 15, Col 50, "Unexpected symbol ')' in pattern") + (Error 1244, Line 15, Col 48, Line 15, Col 50, "Attempted to parse this as an operator name, but failed") + (Error 558, Line 16, Col 36, Line 16, Col 50, "Multiple accessibilities given for property getter or setter") + (Error 558, Line 19, Col 35, Line 19, Col 56, "Multiple accessibilities given for property getter or setter") + (Error 10, Line 20, Col 49, Line 20, Col 50, "Unexpected identifier in pattern") + (Error 1244, Line 20, Col 48, Line 20, Col 57, "Attempted to parse this as an operator name, but failed") + (Error 10, Line 23, Col 36, Line 23, Col 42, "Unexpected keyword 'public' in member definition") + ] + + // SOURCE=OnProperty01.fs # OnProperty01.fs + [] + let ``OnProperty01_fs`` compilation = + compilation + |> verifyCompileAndRun + |> shouldSucceed diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface01.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface01.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface02.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface02.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface03.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface03.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface03.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface03.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface04.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface04.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface04.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface04.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface05.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface05.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface05.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface05.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface06.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface06.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface06.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnInterface06.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnRecords.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnRecords.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnRecords.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnRecords.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnRecords02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnRecords02.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnRecords02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_accessibilityOnRecords02.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_let01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_let01.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_let01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_let01.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_member01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_member01.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_member01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_member01.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_module01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_module01.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_module01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_module01.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_type01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_type01.fs similarity index 100% rename from tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_type01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/E_orderingOfAccessibilityKeyword_type01.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/PermittedLocations.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/PermittedLocations.fs new file mode 100644 index 0000000000000000000000000000000000000000..cd9ddeecf4cab22a309528e0948ee7b2aff5d7f2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/PermittedLocations.fs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.ComponentTests.Conformance.DeclarationElements.AccessibilityAnnotations + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module PermittedLocations = + + let verifyCompile compilation = + compilation + |> asExe + |> withOptions ["--nowarn:988"] + |> compile + + let verifyCompileAndRun compilation = + compilation + |> asExe + |> withOptions ["--nowarn:988"] + |> compileAndRun + + // SOURCE=E_accessibilityOnInterface.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface.fs + [] + let ``E_accessibilityOnInterface_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 561, Line 18, Col 5, Line 18, Col 62, "Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type.") + (Error 561, Line 19, Col 5, Line 19, Col 62, "Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type.") + (Error 561, Line 20, Col 5, Line 20, Col 62, "Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type.") + (Error 10, Line 21, Col 14, Line 21, Col 20, "Unexpected keyword 'public' in member definition. Expected identifier, '(', '(*)' or other token.") + (Error 561, Line 21, Col 14, Line 22, Col 62, "Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type.") + (Error 10, Line 23, Col 14, Line 23, Col 22, "Unexpected keyword 'internal' in member definition. Expected identifier, '(', '(*)' or other token.") + ] + + // SOURCE=E_accessibilityOnInterface01.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface01.fs + [] + let ``E_accessibilityOnInterface01_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 561, Line 13, Col 5, Line 13, Col 67, "Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type.") + ] + + // SOURCE=E_accessibilityOnInterface02.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface02.fs + [] + let ``E_accessibilityOnInterface02_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 561, Line 15, Col 5, Line 15, Col 68, "Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type.") + ] + + // SOURCE=E_accessibilityOnInterface03.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface03.fs + [] + let ``E_accessibilityOnInterface03_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 561, Line 15, Col 5, Line 15, Col 69, "Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type.") + ] + + // SOURCE=E_accessibilityOnInterface04.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface04.fs + [] + let ``E_accessibilityOnInterface04_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 10, Line 15, Col 14, Line 15, Col 20, "Unexpected keyword 'public' in member definition. Expected identifier, '(', '(*)' or other token.") + ] + + // SOURCE=E_accessibilityOnInterface05.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface05.fs + [] + let ``E_accessibilityOnInterface05_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 10, Line 15, Col 14, Line 15, Col 21, "Unexpected keyword 'private' in member definition. Expected identifier, '(', '(*)' or other token.") + ] + + // SOURCE=E_accessibilityOnInterface06.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface06.fs + [] + let ``E_accessibilityOnInterface06_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 10, Line 15, Col 14, Line 15, Col 22, "Unexpected keyword 'internal' in member definition. Expected identifier, '(', '(*)' or other token.") + ] + + // SOURCE=E_accessibilityOnRecords.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnRecords.fs + [] + let ``E_accessibilityOnRecords_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 575, Line 10, Col 21, Line 10, Col 41, "Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation.") + (Error 575, Line 11, Col 21, Line 11, Col 39, "Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation.") + (Error 575, Line 12, Col 21, Line 12, Col 37, "Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation.") + ] + + // SOURCE=E_accessibilityOnRecords02.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnRecords02.fs + [] + let ``E_accessibilityOnRecords02_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 575, Line 8, Col 13, Line 8, Col 28, "Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation.") + ] + + // SOURCE=E_orderingOfAccessibilityKeyword_let01.fs SCFLAGS="--test:ErrorRanges" # E_orderingOfAccessibilityKeyword_let01.fs + [] + let ``E_orderingOfAccessibilityKeyword_let01_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 531, Line 11, Col 13, Line 11, Col 20, "Accessibility modifiers should come immediately prior to the identifier naming a construct") + (Warning 58, Line 12, Col 23, Line 12, Col 26, "Possible incorrect indentation: this token is offside of context started at position (11:23). Try indenting this token further or using standard formatting conventions.") + (Error 531, Line 12, Col 13, Line 12, Col 19, "Accessibility modifiers should come immediately prior to the identifier naming a construct") + (Warning 58, Line 13, Col 23, Line 13, Col 26, "Possible incorrect indentation: this token is offside of context started at position (12:23). Try indenting this token further or using standard formatting conventions.") + (Error 531, Line 13, Col 13, Line 13, Col 21, "Accessibility modifiers should come immediately prior to the identifier naming a construct") + ] + + // SOURCE=E_orderingOfAccessibilityKeyword_member01.fs SCFLAGS="--test:ErrorRanges" # E_orderingOfAccessibilityKeyword_member01.fs + [] + let ``E_orderingOfAccessibilityKeyword_member01_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 531, Line 8, Col 26, Line 8, Col 32, "Accessibility modifiers should come immediately prior to the identifier naming a construct") + ] + + // SOURCE=E_orderingOfAccessibilityKeyword_module01.fs SCFLAGS="--test:ErrorRanges" # E_orderingOfAccessibilityKeyword_module01.fs + [] + let ``E_orderingOfAccessibilityKeyword_module01_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 531, Line 6, Col 1, Line 6, Col 7, "Accessibility modifiers should come immediately prior to the identifier naming a construct") + ] + + // SOURCE=E_orderingOfAccessibilityKeyword_type01.fs SCFLAGS="--test:ErrorRanges" # E_orderingOfAccessibilityKeyword_type01.fs + [] + let ``E_orderingOfAccessibilityKeyword_type01_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withDiagnostics [ + (Error 531, Line 8, Col 13, Line 8, Col 20, "Accessibility modifiers should come immediately prior to the identifier naming a construct") + ] diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index b1bd7ae99109ec3b3ce8d9fe9f3f81d62f18dd36..d459a4efc846da83245980bc815a5a794d344e7a 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -32,9 +32,10 @@ - - - + + + + @@ -157,6 +158,9 @@ %(RelativeDir)\TestSource\%(Filename)%(Extension) + + %(RelativeDir)\TestSource\%(Filename)%(Extension) + %(RelativeDir)\BaseLine\%(Filename)%(Extension) diff --git a/tests/FSharp.Compiler.ComponentTests/OnOverridesAndIFaceImpl.fs b/tests/FSharp.Compiler.ComponentTests/OnOverridesAndIFaceImpl.fs new file mode 100644 index 0000000000000000000000000000000000000000..b14eb81466d4d0ebf2d79dfb979ba6675080c261 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/OnOverridesAndIFaceImpl.fs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.ComponentTests.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/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/env.lst b/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/env.lst deleted file mode 100644 index e293321421359975d3a429b508fd15af8daeefb8..0000000000000000000000000000000000000000 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnOverridesAndIFaceImpl/env.lst +++ /dev/null @@ -1,6 +0,0 @@ - SOURCE=E_InterfaceImpl01.fs SCFLAGS="--test:ErrorRanges" # E_InterfaceImpl01.fs - SOURCE=E_OnOverrides01.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides01.fs - SOURCE=E_OnOverrides02.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides02.fs - SOURCE=E_OnOverrides03.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides03.fs - SOURCE=E_OnOverrides04.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides04.fs - SOURCE=E_OnOverrides05.fs SCFLAGS="--test:ErrorRanges" # E_OnOverrides05.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/env.lst b/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/env.lst deleted file mode 100644 index e9e0f6312db4f529b87077ad4b194838fcedc08d..0000000000000000000000000000000000000000 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/OnTypeMembers/env.lst +++ /dev/null @@ -1,7 +0,0 @@ - SOURCE=OnProperty01.fs # OnProperty01.fs - SOURCE=E_OnProperty01.fs # E_OnProperty01.fs - SOURCE=E_OnProperty02.fs SCFLAGS="--test:ErrorRanges" # E_OnProperty02.fs - - SOURCE=AccessProtectedStatic01.fs SCFLAGS="-r:BaseClass.dll" PRECMD="\$CSC_PIPE /target:library BaseClass.cs" # AccessProtectedStatic01.fs - SOURCE=E_AccessProtectedInstance01.fs SCFLAGS="-r:BaseClass.dll --test:ErrorRanges" PRECMD="\$CSC_PIPE /target:library BaseClass.cs" # AccessProtectedInstance01.fs - SOURCE=E_AccessPrivateMember01.fs SCFLAGS="--test:ErrorRanges" # E_AccessPrivateMember01.fs \ No newline at end of file diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/env.lst b/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/env.lst deleted file mode 100644 index 54a3fb403c9edac13c21c83917da463f75fe77f0..0000000000000000000000000000000000000000 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/PermittedLocations/env.lst +++ /dev/null @@ -1,18 +0,0 @@ -# -# Disabling until it is clear what the behavior is on multiple errors... -# SOURCE=E_accessibilityOnInterface.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface.fs -# - SOURCE=E_accessibilityOnRecords.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnRecords.fs - SOURCE=E_accessibilityOnRecords02.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnRecords02.fs - - SOURCE=E_orderingOfAccessibilityKeyword_let01.fs SCFLAGS="--test:ErrorRanges" # E_orderingOfAccessibilityKeyword_let01.fs - SOURCE=E_orderingOfAccessibilityKeyword_member01.fs SCFLAGS="--test:ErrorRanges" # E_orderingOfAccessibilityKeyword_member01.fs - SOURCE=E_orderingOfAccessibilityKeyword_module01.fs SCFLAGS="--test:ErrorRanges" # E_orderingOfAccessibilityKeyword_module01.fs - SOURCE=E_orderingOfAccessibilityKeyword_type01.fs SCFLAGS="--test:ErrorRanges" # E_orderingOfAccessibilityKeyword_type01.fs - - SOURCE=E_accessibilityOnInterface01.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface01.fs - SOURCE=E_accessibilityOnInterface02.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface02.fs - SOURCE=E_accessibilityOnInterface03.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface03.fs - SOURCE=E_accessibilityOnInterface04.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface04.fs - SOURCE=E_accessibilityOnInterface05.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface05.fs - SOURCE=E_accessibilityOnInterface06.fs SCFLAGS="--test:ErrorRanges" # E_accessibilityOnInterface06.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/env.lst b/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/env.lst deleted file mode 100644 index 42ee4cb3de7ff6155f2edeaa9f25f9bc23b03dea..0000000000000000000000000000000000000000 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/AccessibilityAnnotations/basic/env.lst +++ /dev/null @@ -1,25 +0,0 @@ - SOURCE=E_BaseIFaceLessAccessible01.fs SCFLAGS="-a --test:ErrorRanges" # E_BaseIFaceLessAccessible01.fs - SOURCE=InternalizedIFaces02.fs SCFLAGS="-a --warnaserror" # InternalizedIFaces02.fs - - SOURCE=LocalLetBinding01.fs SCFLAGS="-a --test:ErrorRanges" # LocalLetBinding01.fs - SOURCE=E_LocalLetBinding02.fs SCFLAGS="--test:ErrorRanges" # E_LocalLetBinding02.fs - - SOURCE=E_privateThingsInaccessible.fs # E_PrivateThingsInaccessible.fs - - SOURCE=E_privateThingsInaccessible02.fs SCFLAGS="--test:ErrorRanges" # E_PrivateThingsInaccessible02.fs - SOURCE=E_privateThingsInaccessible03.fs SCFLAGS="--test:ErrorRanges" # E_PrivateThingsInaccessible03.fs - SOURCE=E_privateThingsInaccessible04.fs SCFLAGS="--test:ErrorRanges" # E_PrivateThingsInaccessible04.fs - SOURCE=E_privateThingsInaccessible05.fs SCFLAGS="--test:ErrorRanges" # E_PrivateThingsInaccessible05.fs - - SOURCE=internalMethodsWorkCorrectly.fs # InternalMethodsWorkCorrectly.fs - SOURCE=E_PrivateImplicitCtor01.fs SCFLAGS="--test:ErrorRanges" # E_PrivateImplicitCtor01.fs - - SOURCE=E_ExposeLessVisible01.fs # E_ExposeLessVisible01.fs - SOURCE=LessOrMoreAccessibleCode01.fs # LessOrMoreAccessibleCode01.fs - SOURCE=E_ProtectedThingsInaccessible01.fs SCFLAGS="--test:ErrorRanges" # E_ProtectedThingsInaccessible01.fs - - SOURCE=E_MoreAccessibleBaseClass01.fs # E_MoreAccessibleBaseClass01.fs - SOURCE=E_MoreAccessibleBaseClass02.fs # E_MoreAccessibleBaseClass02.fs - - SOURCE=InterfaceImplementationVisibility.fs # InterfaceImplementationVisibility.fs - \ No newline at end of file