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>2019-08-05 16:22:42 +0300
committerMarek Safar <marek.safar@gmail.com>2019-08-05 16:22:42 +0300
commit58a047a0533740569c05f7a61e56a2b90637ce40 (patch)
tree6e397aea2d4145877d2f9fc1d25a2b0c58c569e7 /test/Mono.Linker.Tests
parent739ef3ab9ceb7fa61f1aab777be073a75c3d441e (diff)
Add a test with an unmanaged constraint (#623)
Only added a test for when used-attrs-only is used for 2 reasons 1) That's the more interesting scenario 2) Annotating all of the compiler generated types that would survive without used-attrs-only is not possible with the current test framework abilities
Diffstat (limited to 'test/Mono.Linker.Tests')
-rw-r--r--test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs b/test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs
index d40db5766..14ac2e85d 100644
--- a/test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs
+++ b/test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs
@@ -201,7 +201,7 @@ namespace Mono.Linker.Tests.TestCasesRunner {
#if NETCOREAPP
protected virtual NPath CompileCSharpAssemblyWithRoslyn (CompilerOptions options)
{
- var parseOptions = new CSharpParseOptions (preprocessorSymbols: options.Defines);
+ var languageVersion = LanguageVersion.Default;
var compilationOptions = new CSharpCompilationOptions (
outputKind: options.OutputPath.FileName.EndsWith (".exe") ? OutputKind.ConsoleApplication : OutputKind.DynamicallyLinkedLibrary,
assemblyIdentityComparer: DesktopAssemblyIdentityComparer.Default
@@ -231,9 +231,14 @@ namespace Mono.Linker.Tests.TestCasesRunner {
emitPdb = true;
debugType = DebugInformationFormat.Embedded;
break;
+ case "/langversion:7.3":
+ languageVersion = LanguageVersion.CSharp7_3;
+ break;
+
}
}
}
+ var parseOptions = new CSharpParseOptions (preprocessorSymbols: options.Defines, languageVersion: languageVersion);
var emitOptions = new EmitOptions (debugInformationFormat: debugType);
var pdbPath = (!emitPdb || debugType == DebugInformationFormat.Embedded) ? null : options.OutputPath.ChangeExtension (".pdb").ToString ();