Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Voorhees <mrvoorhe@users.noreply.github.com>2020-09-11 11:55:20 +0300
committerGitHub <noreply@github.com>2020-09-11 11:55:20 +0300
commitd0e1175e94367dc5c0871fb51a3ee11e6e9004a4 (patch)
treee95e44dffb218b3475a5cd33b2148f110e09d340 /test/Mono.Linker.Tests.Cases/TypeForwarding
parent4f11a35ee8ad2bb16e9d66091023891cd31a0a73 (diff)
Fix some tests (#1481)
Every test .cs file must be able to resolve a type of the same name during test execution. Otherwise it triggers a warning and if warnings ever accumulate it becomes impossible to notice when you have a test type name that doesn't match the file name The rule of thumb to follow is, never #if out the test case type definition. Include an ignore and and exclude any code that can't compile. * Fix `DebuggerDisplayAttributeOnTypeCopy` only existing when `NETCOREAPP` is defined. I just removed the define. I don't see why it wouldn't work on .NET Framework * Fix `DefaultInterfaceMethodCallIntoClass` only existing when `NETCOREAPP` is defined. I most of the test is #if away when not `NETCOREAPP` app and an `[IgnoreTestCase]` is included * Fix `GenericDefaultInterfaceMethods` only existing when `NETCOREAPP` is defined. I most of the test is #if away when not `NETCOREAPP` app and an `[IgnoreTestCase]` is included * Fix `SimpleDefaultInterfaceMethod` only existing when `NETCOREAPP` is defined. I most of the test is #if away when not `NETCOREAPP` app and an `[IgnoreTestCase]` is included * Fix `UnusedDefaultInterfaceImplementation` only existing when `NETCOREAPP` is defined. I most of the test is #if away when not `NETCOREAPP` app and an `[IgnoreTestCase]` is included * Fix `AttributeScopeUpdated`. The type name did not match the file name.
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/TypeForwarding')
-rw-r--r--test/Mono.Linker.Tests.Cases/TypeForwarding/AttributesScopeUpdated.cs7
1 files changed, 4 insertions, 3 deletions
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 ()
{