diff options
Diffstat (limited to 'test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs')
-rw-r--r-- | test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs b/test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs index 5d6c8c35a..2607e356e 100644 --- a/test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs +++ b/test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs @@ -36,7 +36,7 @@ namespace Mono.Linker.Tests.TestCasesRunner public NPath CompileTestIn (NPath outputDirectory, string outputName, IEnumerable<string> sourceFiles, string[] commonReferences, string[] mainAssemblyReferences, IEnumerable<string> defines, NPath[] resources, string[] additionalArguments) { var originalCommonReferences = commonReferences.Select (r => r.ToNPath ()).ToArray (); - var originalDefines = defines?.ToArray () ?? new string[0]; + var originalDefines = defines?.ToArray () ?? Array.Empty<string> (); Prepare (outputDirectory); @@ -89,8 +89,8 @@ namespace Mono.Linker.Tests.TestCasesRunner protected virtual CompilerOptions CreateOptionsForSupportingAssembly (SetupCompileInfo setupCompileInfo, NPath outputDirectory, NPath[] sourceFiles, NPath[] references, string[] defines, NPath[] resources) { - var allDefines = defines.Concat (setupCompileInfo.Defines ?? new string[0]).ToArray (); - var allReferences = references.Concat (setupCompileInfo.References?.Select (p => MakeSupportingAssemblyReferencePathAbsolute (outputDirectory, p)) ?? new NPath[0]).ToArray (); + var allDefines = defines.Concat (setupCompileInfo.Defines ?? Array.Empty<string> ()).ToArray (); + var allReferences = references.Concat (setupCompileInfo.References?.Select (p => MakeSupportingAssemblyReferencePathAbsolute (outputDirectory, p)) ?? Array.Empty<NPath> ()).ToArray (); string[] additionalArguments = string.IsNullOrEmpty (setupCompileInfo.AdditionalArguments) ? null : new[] { setupCompileInfo.AdditionalArguments }; return new CompilerOptions { OutputPath = outputDirectory.Combine (setupCompileInfo.OutputName), |