diff options
author | Sven Boemer <sbomer@gmail.com> | 2020-12-11 00:29:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-11 00:29:23 +0300 |
commit | 9c88abd291fafd57076ca4c26deaaf3c6c0a4c7a (patch) | |
tree | 15f103a6255a493252052227f5dd6526dcc2b81f /test/Mono.Linker.Tests.Cases/TestFramework | |
parent | a86658f4602e616d71e5d6db23a30940534132e2 (diff) |
Restrict embedded XML (#1675)
* Restrict embedded XML
Embedded attributes and substitutions may only modify the containing assembly.
* Allow specifying resource name in referenced assembly
In the test infrastructure.
* Fix formatting
* PR feedback
- Allow '*' in corelib embedded attribute XML
- Reword warning messages
- Avoid calling virtual method from ctor
* Fix test on mono
Macking the core library causes problems for PEVerify:
- Removed reference to corelib creates invalid typerefs
- System types like Object aren't found
* PR feedback
* PR feedback
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/TestFramework')
3 files changed, 9 insertions, 9 deletions
diff --git a/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResources.cs b/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResources.cs index b6bfba94a..bcbc70ec5 100644 --- a/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResources.cs +++ b/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResources.cs @@ -1,4 +1,4 @@ -using Mono.Linker.Tests.Cases.Expectations.Assertions; +using Mono.Linker.Tests.Cases.Expectations.Assertions; using Mono.Linker.Tests.Cases.Expectations.Metadata; using Mono.Linker.Tests.Cases.TestFramework.Dependencies; @@ -6,12 +6,12 @@ namespace Mono.Linker.Tests.Cases.TestFramework { [SetupCompileBefore ("library.dll", new[] { "Dependencies/CanCompileReferencesWithResources_Lib1.cs" }, - resources: new[] { "Dependencies/CanCompileReferencesWithResources_Lib1.txt" })] + resources: new object[] { "Dependencies/CanCompileReferencesWithResources_Lib1.txt" })] // Compile the same assembly again with another resource to get coverage on SetupCompileAfter [SetupCompileAfter ("library.dll", new[] { "Dependencies/CanCompileReferencesWithResources_Lib1.cs" }, - resources: new[] { "Dependencies/CanCompileReferencesWithResources_Lib1.txt", "Dependencies/CanCompileReferencesWithResources_Lib1.log" })] + resources: new object[] { "Dependencies/CanCompileReferencesWithResources_Lib1.txt", "Dependencies/CanCompileReferencesWithResources_Lib1.log" })] [KeptResourceInAssembly ("library.dll", "CanCompileReferencesWithResources_Lib1.txt")] [KeptResourceInAssembly ("library.dll", "CanCompileReferencesWithResources_Lib1.log")] diff --git a/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResourcesWithCsc.cs b/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResourcesWithCsc.cs index 62431c05b..845f353da 100644 --- a/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResourcesWithCsc.cs +++ b/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResourcesWithCsc.cs @@ -1,4 +1,4 @@ -using Mono.Linker.Tests.Cases.Expectations.Assertions; +using Mono.Linker.Tests.Cases.Expectations.Assertions; using Mono.Linker.Tests.Cases.Expectations.Metadata; using Mono.Linker.Tests.Cases.TestFramework.Dependencies; @@ -6,13 +6,13 @@ namespace Mono.Linker.Tests.Cases.TestFramework { [SetupCompileBefore ("library.dll", new[] { "Dependencies/CanCompileReferencesWithResources_Lib1.cs" }, - resources: new[] { "Dependencies/CanCompileReferencesWithResources_Lib1.txt" }, + resources: new object[] { "Dependencies/CanCompileReferencesWithResources_Lib1.txt" }, compilerToUse: "csc")] // Compile the same assembly again with another resource to get coverage on SetupCompileAfter [SetupCompileAfter ("library.dll", new[] { "Dependencies/CanCompileReferencesWithResources_Lib1.cs" }, - resources: new[] { "Dependencies/CanCompileReferencesWithResources_Lib1.txt", "Dependencies/CanCompileReferencesWithResources_Lib1.log" }, + resources: new object[] { "Dependencies/CanCompileReferencesWithResources_Lib1.txt", "Dependencies/CanCompileReferencesWithResources_Lib1.log" }, compilerToUse: "csc")] [KeptResourceInAssembly ("library.dll", "CanCompileReferencesWithResources_Lib1.txt")] diff --git a/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResourcesWithMcs.cs b/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResourcesWithMcs.cs index 4b6a828d0..d166fb115 100644 --- a/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResourcesWithMcs.cs +++ b/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileReferencesWithResourcesWithMcs.cs @@ -1,4 +1,4 @@ -using Mono.Linker.Tests.Cases.Expectations.Assertions; +using Mono.Linker.Tests.Cases.Expectations.Assertions; using Mono.Linker.Tests.Cases.Expectations.Metadata; using Mono.Linker.Tests.Cases.TestFramework.Dependencies; @@ -9,13 +9,13 @@ namespace Mono.Linker.Tests.Cases.TestFramework #endif [SetupCompileBefore ("library.dll", new[] { "Dependencies/CanCompileReferencesWithResources_Lib1.cs" }, - resources: new[] { "Dependencies/CanCompileReferencesWithResources_Lib1.txt" }, + resources: new object[] { "Dependencies/CanCompileReferencesWithResources_Lib1.txt" }, compilerToUse: "mcs")] // Compile the same assembly again with another resource to get coverage on SetupCompileAfter [SetupCompileAfter ("library.dll", new[] { "Dependencies/CanCompileReferencesWithResources_Lib1.cs" }, - resources: new[] { "Dependencies/CanCompileReferencesWithResources_Lib1.txt", "Dependencies/CanCompileReferencesWithResources_Lib1.log" }, + resources: new object[] { "Dependencies/CanCompileReferencesWithResources_Lib1.txt", "Dependencies/CanCompileReferencesWithResources_Lib1.log" }, compilerToUse: "mcs")] [KeptResourceInAssembly ("library.dll", "CanCompileReferencesWithResources_Lib1.txt")] |