diff options
6 files changed, 33 insertions, 15 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Attributes.Debugger/DebuggerDisplayAttributeOnTypeCopy.cs b/test/Mono.Linker.Tests.Cases/Attributes.Debugger/DebuggerDisplayAttributeOnTypeCopy.cs index 174894e50..a3c6ee987 100644 --- a/test/Mono.Linker.Tests.Cases/Attributes.Debugger/DebuggerDisplayAttributeOnTypeCopy.cs +++ b/test/Mono.Linker.Tests.Cases/Attributes.Debugger/DebuggerDisplayAttributeOnTypeCopy.cs @@ -1,6 +1,4 @@ -#if NETCOREAPP - -using System.Diagnostics; +using System.Diagnostics; using Mono.Linker.Tests.Cases.Expectations.Assertions; using Mono.Linker.Tests.Cases.Expectations.Metadata; @@ -41,4 +39,3 @@ namespace Mono.Linker.Tests.Cases.Attributes.Debugger } } } -#endif diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/DefaultInterfaceMethodCallIntoClass.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/DefaultInterfaceMethodCallIntoClass.cs index 111d2dde7..c5e8e3ee7 100644 --- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/DefaultInterfaceMethodCallIntoClass.cs +++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/DefaultInterfaceMethodCallIntoClass.cs @@ -6,14 +6,19 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata; namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods { -#if NETCOREAPP +#if !NETCOREAPP + [IgnoreTestCase ("Requires support for default interface methods")] +#endif class DefaultInterfaceMethodCallIntoClass { public static void Main () { +#if NETCOREAPP ((IBase) new Derived ()).Frob (); +#endif } +#if NETCOREAPP [Kept] interface IBase { @@ -46,6 +51,6 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods [Kept] public void Actual () { } } - } #endif + } } diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/GenericDefaultInterfaceMethods.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/GenericDefaultInterfaceMethods.cs index 1660980a8..6e4d6f1ab 100644 --- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/GenericDefaultInterfaceMethods.cs +++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/GenericDefaultInterfaceMethods.cs @@ -5,15 +5,20 @@ using Mono.Linker.Tests.Cases.Expectations.Assertions; namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods { -#if NETCOREAPP +#if !NETCOREAPP + [IgnoreTestCase ("Requires support for default interface methods")] +#endif class GenericDefaultInterfaceMethods { public static void Main () { +#if NETCOREAPP ((IFoo<int>) new Bar ()).Method (12); ((IFoo<int>) new Baz ()).Method (12); +#endif } +#if NETCOREAPP [Kept] interface IFoo<T> { @@ -61,6 +66,6 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods { } } - } #endif + } } diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/SimpleDefaultInterfaceMethod.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/SimpleDefaultInterfaceMethod.cs index bac1df652..7838085d3 100644 --- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/SimpleDefaultInterfaceMethod.cs +++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/SimpleDefaultInterfaceMethod.cs @@ -6,14 +6,19 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata; namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods { -#if NETCOREAPP +#if !NETCOREAPP + [IgnoreTestCase ("Requires support for default interface methods")] +#endif class SimpleDefaultInterfaceMethod { public static void Main () { +#if NETCOREAPP ((IBasic) new Basic ()).DoSomething (); +#endif } +#if NETCOREAPP [Kept] interface IBasic { @@ -51,6 +56,6 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods [Kept] public Basic () { } } - } #endif + } } diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/UnusedDefaultInterfaceImplementation.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/UnusedDefaultInterfaceImplementation.cs index b882c4388..15114d3c5 100644 --- a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/UnusedDefaultInterfaceImplementation.cs +++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/UnusedDefaultInterfaceImplementation.cs @@ -5,14 +5,19 @@ using Mono.Linker.Tests.Cases.Expectations.Assertions; namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods { -#if NETCOREAPP +#if !NETCOREAPP + [IgnoreTestCase ("Requires support for default interface methods")] +#endif class UnusedDefaultInterfaceImplementation { public static void Main () { +#if NETCOREAPP ((IFoo) new Foo ()).InterfaceMethod (); +#endif } +#if NETCOREAPP [Kept] interface IFoo { @@ -39,6 +44,6 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods { } } - } #endif + } } diff --git a/test/Mono.Linker.Tests.Cases/TypeForwarding/AttributesScopeUpdated.cs b/test/Mono.Linker.Tests.Cases/TypeForwarding/AttributesScopeUpdated.cs index d9fdf913f..233f4f5ec 100644 --- a/test/Mono.Linker.Tests.Cases/TypeForwarding/AttributesScopeUpdated.cs +++ b/test/Mono.Linker.Tests.Cases/TypeForwarding/AttributesScopeUpdated.cs @@ -21,23 +21,24 @@ namespace Mono.Linker.Tests.Cases.TypeForwarding [RemovedAssembly ("Forwarder.dll")] [KeptMemberInAssembly ("Implementation.dll", typeof (ImplementationLibrary))] - static class AttributeScopeUpdated + static class AttributesScopeUpdated { static void Main () { } [Kept] - public static void Test_1 ([TestType3 (typeof (ImplementationLibrary))] int arg) + public static void Test_1 ([KeptAttributeAttribute (typeof (TestType3Attribute))] [TestType3 (typeof (ImplementationLibrary))] int arg) { } [Kept] - public static void Test_2<[TestType3 (typeof (ImplementationLibrary))] T> () + public static void Test_2<[KeptAttributeAttribute (typeof (TestType3Attribute))] [TestType3 (typeof (ImplementationLibrary))] T> () { } [Kept] + [return: KeptAttributeAttribute (typeof (TestType3Attribute))] [return: TestType3 (typeof (ImplementationLibrary))] public static void Test_3 () { |