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:
authorMichael Voorhees <michaelv@unity3d.com>2020-03-11 18:13:28 +0300
committerMarek Safar <marek.safar@gmail.com>2020-03-13 01:09:38 +0300
commit9e030cd22f14f4304c2ccd34b13aea0dae978257 (patch)
treecc1a92cb1f9585fecd3a0111a0446f76acfc8dc8
parentf28d88f95244adf876613e69b8396aad71fc5487 (diff)
Fixes to reflection tests when running on windows
Need to explicitly use roslyn in order for these tests to pass on windows. Otherwise they fail complaining about the nameof() usages in attributes.
-rw-r--r--test/Mono.Linker.Tests.Cases/Reflection/ActivatorCreateInstance.cs2
-rw-r--r--test/Mono.Linker.Tests.Cases/Reflection/ConstructorUsedViaReflection.cs2
-rw-r--r--test/Mono.Linker.Tests.Cases/Reflection/CoreLibMessages.cs3
-rw-r--r--test/Mono.Linker.Tests.Cases/Reflection/EventUsedViaReflection.cs2
-rw-r--r--test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallString.cs1
-rw-r--r--test/Mono.Linker.Tests.Cases/Reflection/FieldUsedViaReflection.cs2
-rw-r--r--test/Mono.Linker.Tests.Cases/Reflection/MethodUsedViaReflection.cs2
-rw-r--r--test/Mono.Linker.Tests.Cases/Reflection/PropertyUsedViaReflection.cs2
-rw-r--r--test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflection.cs2
-rw-r--r--test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflectionTypeDoesntExist.cs2
10 files changed, 19 insertions, 1 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Reflection/ActivatorCreateInstance.cs b/test/Mono.Linker.Tests.Cases/Reflection/ActivatorCreateInstance.cs
index d1d0291d4..8bfabf5af 100644
--- a/test/Mono.Linker.Tests.Cases/Reflection/ActivatorCreateInstance.cs
+++ b/test/Mono.Linker.Tests.Cases/Reflection/ActivatorCreateInstance.cs
@@ -1,9 +1,11 @@
using System;
using System.Reflection;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
+using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Reflection
{
+ [SetupCSharpCompilerToUse ("csc")]
public class ActivatorCreateInstance
{
[UnrecognizedReflectionAccessPattern(
diff --git a/test/Mono.Linker.Tests.Cases/Reflection/ConstructorUsedViaReflection.cs b/test/Mono.Linker.Tests.Cases/Reflection/ConstructorUsedViaReflection.cs
index 0bfdf1b8f..e57d7d6bd 100644
--- a/test/Mono.Linker.Tests.Cases/Reflection/ConstructorUsedViaReflection.cs
+++ b/test/Mono.Linker.Tests.Cases/Reflection/ConstructorUsedViaReflection.cs
@@ -1,9 +1,11 @@
using System;
using System.Reflection;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
+using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Reflection
{
+ [SetupCSharpCompilerToUse ("csc")]
public class ConstructorUsedViaReflection {
public static void Main ()
{
diff --git a/test/Mono.Linker.Tests.Cases/Reflection/CoreLibMessages.cs b/test/Mono.Linker.Tests.Cases/Reflection/CoreLibMessages.cs
index deb3ddd99..98af67248 100644
--- a/test/Mono.Linker.Tests.Cases/Reflection/CoreLibMessages.cs
+++ b/test/Mono.Linker.Tests.Cases/Reflection/CoreLibMessages.cs
@@ -3,8 +3,9 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Reflection
{
+ [SetupCSharpCompilerToUse ("csc")]
[SetupLinkerAction ("copy", "CoreLibEmulator")]
- [SetupCompileBefore ("CoreLibEmulator.dll", new string [] { "Dependencies/CoreLibEmulator.cs" }, null, new string [] { "INCLUDE_CORELIB_IMPL" })]
+ [SetupCompileBefore ("CoreLibEmulator.dll", new string [] { "Dependencies/CoreLibEmulator.cs" }, null, new string [] { "INCLUDE_CORELIB_IMPL" }, compilerToUse: "csc")]
// Validate that calls from one overload of Type.Get* to another overload of the same method don't produce warning
[LogDoesNotContain ("Reflection call 'System.Reflection.ConstructorInfo System.Type::GetConstructor\\([^)]*\\)' inside 'System.Reflection.ConstructorInfo System.Type::GetConstructor\\([^)]*\\)' does not use detectable instance type extraction")]
diff --git a/test/Mono.Linker.Tests.Cases/Reflection/EventUsedViaReflection.cs b/test/Mono.Linker.Tests.Cases/Reflection/EventUsedViaReflection.cs
index 6ff55dc48..d5ecafb8d 100644
--- a/test/Mono.Linker.Tests.Cases/Reflection/EventUsedViaReflection.cs
+++ b/test/Mono.Linker.Tests.Cases/Reflection/EventUsedViaReflection.cs
@@ -1,7 +1,9 @@
using System;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
+using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Reflection {
+ [SetupCSharpCompilerToUse ("csc")]
public class EventUsedViaReflection {
public static void Main ()
{
diff --git a/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallString.cs b/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallString.cs
index 7ec418ccc..2a835c20f 100644
--- a/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallString.cs
+++ b/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallString.cs
@@ -6,6 +6,7 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Reflection
{
+ [SetupCSharpCompilerToUse ("csc")]
[Reference ("System.Core.dll")]
public class ExpressionCallString
{
diff --git a/test/Mono.Linker.Tests.Cases/Reflection/FieldUsedViaReflection.cs b/test/Mono.Linker.Tests.Cases/Reflection/FieldUsedViaReflection.cs
index 93ea47364..5ff8883df 100644
--- a/test/Mono.Linker.Tests.Cases/Reflection/FieldUsedViaReflection.cs
+++ b/test/Mono.Linker.Tests.Cases/Reflection/FieldUsedViaReflection.cs
@@ -1,8 +1,10 @@
using System;
using System.Reflection;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
+using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Reflection {
+ [SetupCSharpCompilerToUse ("csc")]
public class FieldUsedViaReflection {
public static void Main ()
{
diff --git a/test/Mono.Linker.Tests.Cases/Reflection/MethodUsedViaReflection.cs b/test/Mono.Linker.Tests.Cases/Reflection/MethodUsedViaReflection.cs
index e1dd54767..b895d3058 100644
--- a/test/Mono.Linker.Tests.Cases/Reflection/MethodUsedViaReflection.cs
+++ b/test/Mono.Linker.Tests.Cases/Reflection/MethodUsedViaReflection.cs
@@ -1,9 +1,11 @@
using System;
using System.Reflection;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
+using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Reflection {
+ [SetupCSharpCompilerToUse ("csc")]
[VerifyAllReflectionAccessPatternsAreValidated]
public class MethodUsedViaReflection {
public static void Main ()
diff --git a/test/Mono.Linker.Tests.Cases/Reflection/PropertyUsedViaReflection.cs b/test/Mono.Linker.Tests.Cases/Reflection/PropertyUsedViaReflection.cs
index a9113f0e7..297150602 100644
--- a/test/Mono.Linker.Tests.Cases/Reflection/PropertyUsedViaReflection.cs
+++ b/test/Mono.Linker.Tests.Cases/Reflection/PropertyUsedViaReflection.cs
@@ -1,7 +1,9 @@
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using System;
+using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Reflection {
+ [SetupCSharpCompilerToUse ("csc")]
public class PropertyUsedViaReflection {
public static void Main ()
{
diff --git a/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflection.cs b/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflection.cs
index 35e92521a..51dac0e50 100644
--- a/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflection.cs
+++ b/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflection.cs
@@ -1,7 +1,9 @@
using System;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
+using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Reflection {
+ [SetupCSharpCompilerToUse ("csc")]
public class TypeUsedViaReflection {
public static void Main ()
{
diff --git a/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflectionTypeDoesntExist.cs b/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflectionTypeDoesntExist.cs
index f29e9c25e..882ae545e 100644
--- a/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflectionTypeDoesntExist.cs
+++ b/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflectionTypeDoesntExist.cs
@@ -1,7 +1,9 @@
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using System;
+using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Reflection {
+ [SetupCSharpCompilerToUse ("csc")]
[VerifyAllReflectionAccessPatternsAreValidated]
public class TypeUsedViaReflectionTypeDoesntExist {
[UnrecognizedReflectionAccessPatternAttribute (