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
path: root/test
diff options
context:
space:
mode:
authorJackson Schuster <jschuster@microsoft.com>2021-12-10 20:43:22 +0300
committerJackson Schuster <jschuster@microsoft.com>2021-12-10 20:54:17 +0300
commit7eb668367d896e16e8a2da51478562351c54b172 (patch)
tree80657277af039ddb201ab01644b160c3d587ebc7 /test
parent359a51bd6ab157d6890aa18fb2fa76e7a2ac0a05 (diff)
Revert "Restore unnecessary changes and format"
This reverts commit 359a51bd6ab157d6890aa18fb2fa76e7a2ac0a05. Undo excessive formatting changes
Diffstat (limited to 'test')
-rw-r--r--test/ILLink.RoslynAnalyzer.Tests/CompilationExtensions.cs3
-rw-r--r--test/ILLink.RoslynAnalyzer.Tests/RequiresAssemblyFilesAnalyzerTests.cs2
-rw-r--r--test/ILLink.RoslynAnalyzer.Tests/TestCaseCompilation.cs2
-rw-r--r--test/ILLink.RoslynAnalyzer.Tests/TestCaseUtils.cs3
-rw-r--r--test/ILLink.RoslynAnalyzer.Tests/TestChecker.cs5
-rw-r--r--test/ILLink.RoslynAnalyzer.Tests/UnconditionalSuppressMessageCodeFixTests.cs4
-rw-r--r--test/ILLink.RoslynAnalyzer.Tests/Verifiers/CSharpAnalyzerVerifier`1.cs2
-rw-r--r--test/ILLink.RoslynAnalyzer.Tests/Verifiers/CSharpCodeFixVerifier`2.cs1
-rw-r--r--test/ILLink.Tasks.Tests/CreateRuntimeRootDescriptorFileTests.cs10
-rw-r--r--test/ILLink.Tasks.Tests/ILLink.Tasks.Tests.cs4
-rw-r--r--test/ILLink.Tasks.Tests/Mock.cs4
-rw-r--r--test/Mono.Linker.Tests/Extensions/NiceIO.cs6
-rw-r--r--test/Mono.Linker.Tests/TestCases/IndividualTests.cs6
-rw-r--r--test/Mono.Linker.Tests/TestCasesRunner/PeVerifier.cs1
-rw-r--r--test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs18
-rw-r--r--test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs6
-rw-r--r--test/Mono.Linker.Tests/TestCasesRunner/TestCaseMetadataProvider.cs2
-rw-r--r--test/Mono.Linker.Tests/TestCasesRunner/TestReflectionPatternRecorder.cs2
-rw-r--r--test/Mono.Linker.Tests/TestCasesRunner/TestRunner.cs2
-rw-r--r--test/Mono.Linker.Tests/Tests/CecilVersionCheck.cs1
-rw-r--r--test/Mono.Linker.Tests/Tests/DocumentationSignatureParserTests.cs73
-rw-r--r--test/Mono.Linker.Tests/Tests/GetDisplayNameTests.cs32
-rw-r--r--test/Mono.Linker.Tests/Tests/ParseResponseFileLinesTests.cs2
23 files changed, 107 insertions, 84 deletions
diff --git a/test/ILLink.RoslynAnalyzer.Tests/CompilationExtensions.cs b/test/ILLink.RoslynAnalyzer.Tests/CompilationExtensions.cs
index 64b3eecbb..550a7e8e4 100644
--- a/test/ILLink.RoslynAnalyzer.Tests/CompilationExtensions.cs
+++ b/test/ILLink.RoslynAnalyzer.Tests/CompilationExtensions.cs
@@ -1,11 +1,14 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.IO;
using System.Linq;
+using System.Text;
using System.Threading;
+using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Emit;
using Xunit;
diff --git a/test/ILLink.RoslynAnalyzer.Tests/RequiresAssemblyFilesAnalyzerTests.cs b/test/ILLink.RoslynAnalyzer.Tests/RequiresAssemblyFilesAnalyzerTests.cs
index 386279369..7e27f2782 100644
--- a/test/ILLink.RoslynAnalyzer.Tests/RequiresAssemblyFilesAnalyzerTests.cs
+++ b/test/ILLink.RoslynAnalyzer.Tests/RequiresAssemblyFilesAnalyzerTests.cs
@@ -1,8 +1,10 @@
using System;
using System.Collections.Generic;
+using System.Linq;
using System.Threading.Tasks;
using ILLink.Shared;
using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Testing;
using Microsoft.CodeAnalysis.Text;
using Xunit;
diff --git a/test/ILLink.RoslynAnalyzer.Tests/TestCaseCompilation.cs b/test/ILLink.RoslynAnalyzer.Tests/TestCaseCompilation.cs
index f2764ef29..edca78bfe 100644
--- a/test/ILLink.RoslynAnalyzer.Tests/TestCaseCompilation.cs
+++ b/test/ILLink.RoslynAnalyzer.Tests/TestCaseCompilation.cs
@@ -4,7 +4,9 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
+using System.Diagnostics;
using System.Linq;
+using System.Text;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
diff --git a/test/ILLink.RoslynAnalyzer.Tests/TestCaseUtils.cs b/test/ILLink.RoslynAnalyzer.Tests/TestCaseUtils.cs
index eb7c2b4b4..194a1a96b 100644
--- a/test/ILLink.RoslynAnalyzer.Tests/TestCaseUtils.cs
+++ b/test/ILLink.RoslynAnalyzer.Tests/TestCaseUtils.cs
@@ -12,6 +12,7 @@ using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Testing;
using Microsoft.CodeAnalysis.Text;
using Xunit;
@@ -30,7 +31,7 @@ namespace ILLink.RoslynAnalyzer.Tests
.WithNuGetConfigFilePath (Path.Combine (TestCaseUtils.GetRepoRoot (), "NuGet.config"));
private static ImmutableArray<MetadataReference> s_net6Refs;
- public static async ValueTask<ImmutableArray<MetadataReference>> GetNet6References ()
+ public async static ValueTask<ImmutableArray<MetadataReference>> GetNet6References ()
{
if (s_net6Refs.IsDefault) {
var refs = await Net6PreviewAssemblies.ResolveAsync (null, default);
diff --git a/test/ILLink.RoslynAnalyzer.Tests/TestChecker.cs b/test/ILLink.RoslynAnalyzer.Tests/TestChecker.cs
index 2bc19c118..56b5c1e72 100644
--- a/test/ILLink.RoslynAnalyzer.Tests/TestChecker.cs
+++ b/test/ILLink.RoslynAnalyzer.Tests/TestChecker.cs
@@ -10,6 +10,7 @@ using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Text;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Xunit;
@@ -158,7 +159,7 @@ namespace ILLink.RoslynAnalyzer.Tests
}
}
- static bool IsExpectedDiagnostic (AttributeSyntax attribute)
+ bool IsExpectedDiagnostic (AttributeSyntax attribute)
{
switch (attribute.Name.ToString ()) {
case "ExpectedWarning":
@@ -281,7 +282,7 @@ namespace ILLink.RoslynAnalyzer.Tests
}
}
- missingDiagnosticMessage = $"Could not find text:\n{text}\nIn diagnostics:\n{string.Join (Environment.NewLine, _diagnostics)}";
+ missingDiagnosticMessage = $"Could not find text:\n{text}\nIn diagnostics:\n{(string.Join (Environment.NewLine, _diagnostics))}";
return false;
}
diff --git a/test/ILLink.RoslynAnalyzer.Tests/UnconditionalSuppressMessageCodeFixTests.cs b/test/ILLink.RoslynAnalyzer.Tests/UnconditionalSuppressMessageCodeFixTests.cs
index 3e308104f..26a273aff 100644
--- a/test/ILLink.RoslynAnalyzer.Tests/UnconditionalSuppressMessageCodeFixTests.cs
+++ b/test/ILLink.RoslynAnalyzer.Tests/UnconditionalSuppressMessageCodeFixTests.cs
@@ -2,8 +2,12 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System;
+using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
+using ILLink.CodeFix;
using ILLink.Shared;
+using Microsoft.CodeAnalysis.CodeFixes;
+using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Testing;
using Microsoft.CodeAnalysis.Text;
using Xunit;
diff --git a/test/ILLink.RoslynAnalyzer.Tests/Verifiers/CSharpAnalyzerVerifier`1.cs b/test/ILLink.RoslynAnalyzer.Tests/Verifiers/CSharpAnalyzerVerifier`1.cs
index 37c7ae4f9..79800c3f8 100644
--- a/test/ILLink.RoslynAnalyzer.Tests/Verifiers/CSharpAnalyzerVerifier`1.cs
+++ b/test/ILLink.RoslynAnalyzer.Tests/Verifiers/CSharpAnalyzerVerifier`1.cs
@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
+using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
@@ -9,6 +10,7 @@ using System.Threading;
using System.Threading.Tasks;
using ILLink.Shared;
using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Testing;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Testing;
diff --git a/test/ILLink.RoslynAnalyzer.Tests/Verifiers/CSharpCodeFixVerifier`2.cs b/test/ILLink.RoslynAnalyzer.Tests/Verifiers/CSharpCodeFixVerifier`2.cs
index fcef098ea..9fc04e38f 100644
--- a/test/ILLink.RoslynAnalyzer.Tests/Verifiers/CSharpCodeFixVerifier`2.cs
+++ b/test/ILLink.RoslynAnalyzer.Tests/Verifiers/CSharpCodeFixVerifier`2.cs
@@ -6,6 +6,7 @@ using System.Threading;
using System.Threading.Tasks;
using ILLink.Shared;
using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CSharp.Testing;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Testing;
diff --git a/test/ILLink.Tasks.Tests/CreateRuntimeRootDescriptorFileTests.cs b/test/ILLink.Tasks.Tests/CreateRuntimeRootDescriptorFileTests.cs
index db3bf83f6..19d5e6c86 100644
--- a/test/ILLink.Tasks.Tests/CreateRuntimeRootDescriptorFileTests.cs
+++ b/test/ILLink.Tasks.Tests/CreateRuntimeRootDescriptorFileTests.cs
@@ -3,7 +3,9 @@
using System;
using System.IO;
+using System.Linq;
using System.Xml.Linq;
+using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Xunit;
@@ -45,7 +47,7 @@ namespace ILLink.Tasks.Tests
File.WriteAllText ("namespace.h",
"#define g_TestNS \"TestNS\"" + Environment.NewLine);
- File.WriteAllLines ("cortypeinfo.h", Array.Empty<string> ());
+ File.WriteAllLines ("cortypeinfo.h", new string[] { });
File.WriteAllLines ("rexcep.h", new string[] {
"DEFINE_EXCEPTION(g_TestNS, TestAlwaysException, false, C)",
@@ -60,7 +62,7 @@ namespace ILLink.Tasks.Tests
XElement existingAssembly = new XElement ("assembly", new XAttribute ("fullname", "testassembly"),
new XComment ("Existing content"));
XElement existingContent = new XElement ("linker", existingAssembly);
- new XDocument (existingContent).Save ("Test.ILLink.Descriptors.Combined.xml");
+ (new XDocument (existingContent)).Save ("Test.ILLink.Descriptors.Combined.xml");
var task = new CreateRuntimeRootILLinkDescriptorFile () {
NamespaceFilePath = new TaskItem ("namespace.h"),
@@ -140,7 +142,7 @@ namespace ILLink.Tasks.Tests
File.WriteAllText ("namespace.h",
"#define g_TestNS \"TestNS\"" + Environment.NewLine);
- File.WriteAllLines ("cortypeinfo.h", Array.Empty<string> ());
+ File.WriteAllLines ("cortypeinfo.h", new string[] { });
File.WriteAllLines ("rexcep.h", new string[] {
"DEFINE_EXCEPTION(g_TestNS, TestAlwaysException, false, C)",
@@ -155,7 +157,7 @@ namespace ILLink.Tasks.Tests
XElement existingAssembly = new XElement ("assembly", new XAttribute ("fullname", "testassembly"),
new XComment ("Existing content"));
XElement existingContent = new XElement ("linker", existingAssembly);
- new XDocument (existingContent).Save ("Test.ILLink.Descriptors.Combined.xml");
+ (new XDocument (existingContent)).Save ("Test.ILLink.Descriptors.Combined.xml");
var task = new CreateRuntimeRootILLinkDescriptorFile () {
NamespaceFilePath = new TaskItem ("namespace.h"),
diff --git a/test/ILLink.Tasks.Tests/ILLink.Tasks.Tests.cs b/test/ILLink.Tasks.Tests/ILLink.Tasks.Tests.cs
index e6aef3617..216dec205 100644
--- a/test/ILLink.Tasks.Tests/ILLink.Tasks.Tests.cs
+++ b/test/ILLink.Tasks.Tests/ILLink.Tasks.Tests.cs
@@ -369,7 +369,7 @@ namespace ILLink.Tasks.Tests
using (var driver = task.CreateDriver ()) {
var actualWarnAsError = driver.Context.WarnAsError;
var actualGeneralWarnAsError = driver.Context.GeneralWarnAsError;
- Assert.Equal (warnAsError.Length + warnNotAsError.Length, actualWarnAsError.Count);
+ Assert.Equal (warnAsError.Count () + warnNotAsError.Count (), actualWarnAsError.Count);
Assert.Equal (treatWarningsAsErrors, actualGeneralWarnAsError);
if (warnAsError.Length > 0) {
foreach (var warningCode in warnAsError)
@@ -753,7 +753,7 @@ namespace ILLink.Tasks.Tests
public void TestErrorHandling ()
{
var task = new MockTask () {
- RootAssemblyNames = Array.Empty<ITaskItem> ()
+ RootAssemblyNames = new ITaskItem[0]
};
task.BuildEngine = new MockBuildEngine ();
Assert.False (task.Execute ());
diff --git a/test/ILLink.Tasks.Tests/Mock.cs b/test/ILLink.Tasks.Tests/Mock.cs
index 2ea9e492c..dba28887b 100644
--- a/test/ILLink.Tasks.Tests/Mock.cs
+++ b/test/ILLink.Tasks.Tests/Mock.cs
@@ -21,8 +21,8 @@ namespace ILLink.Tasks.Tests
public MockTask ()
{
// Ensure that [Required] members are non-null
- AssemblyPaths = Array.Empty<ITaskItem> ();
- RootAssemblyNames = Array.Empty<ITaskItem> ();
+ AssemblyPaths = new ITaskItem[0];
+ RootAssemblyNames = new ITaskItem[0];
ILLinkPath = Path.Combine (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location), "illink.dll");
}
diff --git a/test/Mono.Linker.Tests/Extensions/NiceIO.cs b/test/Mono.Linker.Tests/Extensions/NiceIO.cs
index 5fbe8982c..8cbf9c5a5 100644
--- a/test/Mono.Linker.Tests/Extensions/NiceIO.cs
+++ b/test/Mono.Linker.Tests/Extensions/NiceIO.cs
@@ -51,7 +51,7 @@ namespace Mono.Linker.Tests.Extensions
if (path == "/") {
_isRelative = false;
- _elements = Array.Empty<string> ();
+ _elements = new string[] { };
} else {
var split = path.Split ('/', '\\');
@@ -94,7 +94,7 @@ namespace Mono.Linker.Tests.Extensions
return stack.Count > 0 && stack[stack.Count - 1] != "..";
}
- private static string ParseDriveLetter (string path, out string driveLetter)
+ private string ParseDriveLetter (string path, out string driveLetter)
{
if (path.Length >= 2 && path[1] == ':') {
driveLetter = path[0].ToString ();
@@ -433,7 +433,7 @@ namespace Mono.Linker.Tests.Extensions
ThrowIfRelative ();
ThrowIfRoot ();
EnsureParentDirectoryExists ();
- File.WriteAllBytes (ToString (), Array.Empty<byte> ());
+ File.WriteAllBytes (ToString (), new byte[0]);
return this;
}
diff --git a/test/Mono.Linker.Tests/TestCases/IndividualTests.cs b/test/Mono.Linker.Tests/TestCases/IndividualTests.cs
index ca7754f8e..a6fb77cad 100644
--- a/test/Mono.Linker.Tests/TestCases/IndividualTests.cs
+++ b/test/Mono.Linker.Tests/TestCases/IndividualTests.cs
@@ -19,7 +19,7 @@ namespace Mono.Linker.Tests.TestCases
[TestFixture]
public class IndividualTests
{
- private static NPath TestsDirectory => TestDatabase.TestCasesRootDirectory.Parent.Combine ("Mono.Linker.Tests");
+ private NPath TestsDirectory => TestDatabase.TestCasesRootDirectory.Parent.Combine ("Mono.Linker.Tests");
[Test]
public void CanSkipUnresolved ()
@@ -217,14 +217,14 @@ namespace Mono.Linker.Tests.TestCases
Assert.That (secondOutputMvid, Is.EqualTo (firstOutputMvid));
}
- protected static Guid GetMvid (NPath assemblyPath)
+ protected Guid GetMvid (NPath assemblyPath)
{
using (var assembly = AssemblyDefinition.ReadAssembly (assemblyPath)) {
return assembly.MainModule.Mvid;
}
}
- private static TestCase CreateIndividualCase (Type testCaseType)
+ private TestCase CreateIndividualCase (Type testCaseType)
{
return TestDatabase.CreateCollector ().CreateIndividualCase (testCaseType);
}
diff --git a/test/Mono.Linker.Tests/TestCasesRunner/PeVerifier.cs b/test/Mono.Linker.Tests/TestCasesRunner/PeVerifier.cs
index 3c9a222be..f4d4b25df 100644
--- a/test/Mono.Linker.Tests/TestCasesRunner/PeVerifier.cs
+++ b/test/Mono.Linker.Tests/TestCasesRunner/PeVerifier.cs
@@ -5,6 +5,7 @@ using System.Linq;
using Mono.Cecil;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Extensions;
+using NUnit.Framework;
namespace Mono.Linker.Tests.TestCasesRunner
{
diff --git a/test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs b/test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs
index 8915d13fb..949029edc 100644
--- a/test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs
+++ b/test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs
@@ -3,6 +3,8 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
using System.Text.RegularExpressions;
using Mono.Cecil;
using Mono.Cecil.Cil;
@@ -393,7 +395,7 @@ namespace Mono.Linker.Tests.TestCasesRunner
Assert.Fail ($"Invalid test assertion. No member named `{memberName}` exists on the original type `{originalType}`");
}
- static void VerifyCopyAssemblyIsKeptUnmodified (NPath outputDirectory, string assemblyName)
+ void VerifyCopyAssemblyIsKeptUnmodified (NPath outputDirectory, string assemblyName)
{
string inputAssemblyPath = Path.Combine (Directory.GetParent (outputDirectory).ToString (), "input", assemblyName);
string outputAssemblyPath = Path.Combine (outputDirectory, assemblyName);
@@ -600,7 +602,7 @@ namespace Mono.Linker.Tests.TestCasesRunner
{
var assembly = ResolveLinkedAssembly (inAssemblyAttribute.ConstructorArguments[0].Value.ToString ());
var expectedReferenceNames = ((CustomAttributeArgument[]) inAssemblyAttribute.ConstructorArguments[1].Value).Select (attr => (string) attr.Value).ToList ();
- for (int i = 0; i < expectedReferenceNames.Count; i++)
+ for (int i = 0; i < expectedReferenceNames.Count (); i++)
if (expectedReferenceNames[i].EndsWith (".dll"))
expectedReferenceNames[i] = expectedReferenceNames[i].Substring (0, expectedReferenceNames[i].LastIndexOf ("."));
@@ -649,13 +651,12 @@ namespace Mono.Linker.Tests.TestCasesRunner
}
}
- static bool IsProducedByLinker (CustomAttribute attr)
+ bool IsProducedByLinker (CustomAttribute attr)
{
var producedBy = attr.GetPropertyValue ("ProducedBy");
return producedBy is null ? true : ((ProducedBy) producedBy).HasFlag (ProducedBy.Trimmer);
}
-
- static IEnumerable<ICustomAttributeProvider> GetAttributeProviders (AssemblyDefinition assembly)
+ IEnumerable<ICustomAttributeProvider> GetAttributeProviders (AssemblyDefinition assembly)
{
foreach (var testType in assembly.AllDefinedTypes ()) {
foreach (var provider in testType.AllMembers ())
@@ -766,7 +767,8 @@ namespace Mono.Linker.Tests.TestCasesRunner
return false;
}
} else if (isCompilerGeneratedCode == true) {
- if (mc.Origin?.Provider is MethodDefinition methodDefinition) {
+ MethodDefinition methodDefinition = mc.Origin?.Provider as MethodDefinition;
+ if (methodDefinition != null) {
if (attrProvider is not IMemberDefinition expectedMember)
return false;
@@ -944,7 +946,7 @@ namespace Mono.Linker.Tests.TestCasesRunner
$"{expectedSourceMember}: Usage of {expectedReflectionMember} unrecognized " +
$"{(expectedMessageParts == null ? string.Empty : "and message contains " + string.Join (" ", expectedMessageParts.Select (p => "'" + p + "'")))}";
- Assert.AreEqual (matchedMessages.Count, matchedPatterns.Count,
+ Assert.AreEqual (matchedMessages.Count (), matchedPatterns.Count (),
$"Inconsistency between logged messages and recorded patterns.{Environment.NewLine}{expectedUnrecognizedPatternMessage}{Environment.NewLine}" +
$"Matched messages: {Environment.NewLine}{string.Join (Environment.NewLine, matchedMessages.Select (mc => "\t" + mc.Text))}{Environment.NewLine}" +
$"Matched unrecognized patterns: {Environment.NewLine}{string.Join (Environment.NewLine, matchedPatterns.Select (p => "\t" + RecognizedReflectionAccessPatternToString (p)))}{Environment.NewLine}");
@@ -1344,7 +1346,7 @@ namespace Mono.Linker.Tests.TestCasesRunner
return attr.AttributeType.Resolve ()?.DerivesFrom (nameof (BaseInAssemblyAttribute)) ?? false;
}
- static bool HasAttribute (ICustomAttributeProvider caProvider, string attributeName)
+ bool HasAttribute (ICustomAttributeProvider caProvider, string attributeName)
{
if (caProvider is AssemblyDefinition assembly && assembly.EntryPoint != null)
return assembly.EntryPoint.DeclaringType.CustomAttributes
diff --git a/test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs b/test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs
index 2607e356e..5d6c8c35a 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 () ?? Array.Empty<string> ();
+ var originalDefines = defines?.ToArray () ?? new string[0];
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 ?? Array.Empty<string> ()).ToArray ();
- var allReferences = references.Concat (setupCompileInfo.References?.Select (p => MakeSupportingAssemblyReferencePathAbsolute (outputDirectory, p)) ?? Array.Empty<NPath> ()).ToArray ();
+ 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 ();
string[] additionalArguments = string.IsNullOrEmpty (setupCompileInfo.AdditionalArguments) ? null : new[] { setupCompileInfo.AdditionalArguments };
return new CompilerOptions {
OutputPath = outputDirectory.Combine (setupCompileInfo.OutputName),
diff --git a/test/Mono.Linker.Tests/TestCasesRunner/TestCaseMetadataProvider.cs b/test/Mono.Linker.Tests/TestCasesRunner/TestCaseMetadataProvider.cs
index fdcde52f7..404ecbf0f 100644
--- a/test/Mono.Linker.Tests/TestCasesRunner/TestCaseMetadataProvider.cs
+++ b/test/Mono.Linker.Tests/TestCasesRunner/TestCaseMetadataProvider.cs
@@ -69,7 +69,7 @@ namespace Mono.Linker.Tests.TestCasesRunner
if (pos != -1) {
string custom_assembly_path = values[0].Substring (pos + 1);
if (!Path.IsPathRooted (custom_assembly_path))
- values[0] = string.Concat (values[0].AsSpan (0, pos + 1), Path.Combine (inputPath, custom_assembly_path));
+ values[0] = values[0].Substring (0, pos + 1) + Path.Combine (inputPath, custom_assembly_path);
}
break;
case "-a":
diff --git a/test/Mono.Linker.Tests/TestCasesRunner/TestReflectionPatternRecorder.cs b/test/Mono.Linker.Tests/TestCasesRunner/TestReflectionPatternRecorder.cs
index 7143952ed..d4b70f1f7 100644
--- a/test/Mono.Linker.Tests/TestCasesRunner/TestReflectionPatternRecorder.cs
+++ b/test/Mono.Linker.Tests/TestCasesRunner/TestReflectionPatternRecorder.cs
@@ -6,7 +6,7 @@ namespace Mono.Linker.Tests.TestCasesRunner
{
public class TestReflectionPatternRecorder : IReflectionPatternRecorder
{
- public IReflectionPatternRecorder PreviousRecorder;
+ public IReflectionPatternRecorder PreviousRecorder = null;
public struct ReflectionAccessPattern
{
diff --git a/test/Mono.Linker.Tests/TestCasesRunner/TestRunner.cs b/test/Mono.Linker.Tests/TestCasesRunner/TestRunner.cs
index e9ead9713..f6ce178d0 100644
--- a/test/Mono.Linker.Tests/TestCasesRunner/TestRunner.cs
+++ b/test/Mono.Linker.Tests/TestCasesRunner/TestRunner.cs
@@ -145,7 +145,7 @@ namespace Mono.Linker.Tests.TestCasesRunner
return customizations;
}
- private static T GetResultOfTaskThatMakesNUnitAssertions<T> (Task<T> task)
+ private T GetResultOfTaskThatMakesNUnitAssertions<T> (Task<T> task)
{
try {
return task.Result;
diff --git a/test/Mono.Linker.Tests/Tests/CecilVersionCheck.cs b/test/Mono.Linker.Tests/Tests/CecilVersionCheck.cs
index ca7e43d84..78fbbbb81 100644
--- a/test/Mono.Linker.Tests/Tests/CecilVersionCheck.cs
+++ b/test/Mono.Linker.Tests/Tests/CecilVersionCheck.cs
@@ -1,3 +1,4 @@
+using System;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
diff --git a/test/Mono.Linker.Tests/Tests/DocumentationSignatureParserTests.cs b/test/Mono.Linker.Tests/Tests/DocumentationSignatureParserTests.cs
index 19864eb37..4ea98ba18 100644
--- a/test/Mono.Linker.Tests/Tests/DocumentationSignatureParserTests.cs
+++ b/test/Mono.Linker.Tests/Tests/DocumentationSignatureParserTests.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mono.Cecil;
+using Mono.Linker;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.TestCasesRunner;
using NUnit.Framework;
@@ -102,32 +103,32 @@ namespace Mono.Linker.Tests
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Int32[])")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Int32[])")]
- public static void M (int[] a)
+ public void M (int[] a)
{
}
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Int32,System.Int32,System.Int32)~System.Int32")]
- public static int M (int a, int b, int c)
+ public int M (int a, int b, int c)
{
return 0;
}
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.MRef(System.Int32@)")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.MRef(System.Int32@)")]
- public static void MRef (ref int a)
+ public void MRef (ref int a)
{
}
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.MOut(System.Int32@)")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.MOut(System.Int32@)")]
- public static void MOut (out int a)
+ public void MOut (out int a)
{
a = 5;
}
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.MIn(System.Int32@)")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.MIn(System.Int32@)")]
- public static void MIn (in int a)
+ public void MIn (in int a)
{
}
@@ -136,7 +137,7 @@ namespace Mono.Linker.Tests
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.MRefReturn")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.MRefReturn")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.MRefReturn~System.Int32@")]
- public static ref int MRefReturn ()
+ public ref int MRefReturn ()
{
return ref i;
}
@@ -144,63 +145,63 @@ namespace Mono.Linker.Tests
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M")]
[ExpectResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M")] // binds to both.
[ExpectResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M()")] // binds to both.
- public static void M ()
+ public void M ()
{
}
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M()")]
[ExpectResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M")]
[ExpectResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M()")]
- public static void M (__arglist)
+ public void M (__arglist)
{
}
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Int32[][])")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Int32[][])")]
- public static void M (int[][] a)
+ public void M (int[][] a)
{
}
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Int32[][0:,0:,0:])")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Int32[][0:,0:,0:])")]
- public static void M (int[,,][] a)
+ public void M (int[,,][] a)
{
}
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Int32[0:,0:])")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Int32[0:,0:])")]
- public static void M (int[,] a)
+ public void M (int[,] a)
{
}
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Object)")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Object)")]
- public static void M (dynamic d)
+ public void M (dynamic d)
{
}
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Int32*)")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Int32*)")]
- public static unsafe void M (int* a)
+ public unsafe void M (int* a)
{
}
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M``1(Mono.Linker.Tests.DocumentationSignatureParserTests.S{Mono.Linker.Tests.DocumentationSignatureParserTests.G{Mono.Linker.Tests.DocumentationSignatureParserTests.A,``0}}**[0:,0:,0:][][][0:,0:]@)")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M``1(Mono.Linker.Tests.DocumentationSignatureParserTests.S{Mono.Linker.Tests.DocumentationSignatureParserTests.G{Mono.Linker.Tests.DocumentationSignatureParserTests.A,``0}}**[0:,0:,0:][][][0:,0:]@)")]
- public static unsafe void M<T> (ref S<G<A, T>>**[,][][][,,] a)
+ public unsafe void M<T> (ref S<G<A, T>>**[,][][][,,] a)
{
}
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Collections.Generic.List{System.Int32[]})")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Collections.Generic.List{System.Int32[]})")]
- public static void M (List<int[]> a)
+ public void M (List<int[]> a)
{
}
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Int32,)")]
//[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.A.M(System.Int32,)")]
// there's no way to reference this, since the parsing logic doesn't like it.
- public static void M (int abo, __arglist)
+ public void M (int abo, __arglist)
{
}
@@ -295,7 +296,7 @@ namespace Mono.Linker.Tests
{
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.B.Method(Mono.Linker.Tests.DocumentationSignatureParserTests.G{Mono.Linker.Tests.DocumentationSignatureParserTests.A{Mono.Linker.Tests.DocumentationSignatureParserTests.B},System.Collections.Generic.List{Mono.Linker.Tests.DocumentationSignatureParserTests.A}})")]
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.B.Method(Mono.Linker.Tests.DocumentationSignatureParserTests.G{Mono.Linker.Tests.DocumentationSignatureParserTests.A{Mono.Linker.Tests.DocumentationSignatureParserTests.B},System.Collections.Generic.List{Mono.Linker.Tests.DocumentationSignatureParserTests.A}})")]
- public static void Method (G<A<B>, List<A>> l)
+ public void Method (G<A<B>, List<A>> l)
{
}
}
@@ -335,44 +336,44 @@ namespace Mono.Linker.Tests
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Method")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Method")]
- public static void Method ()
+ public void Method ()
{
}
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Method(System.Int32)")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Method(System.Int32)")]
- public static void Method (int i)
+ public void Method (int i)
{
}
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.IntMethod")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.IntMethod")]
- public static int IntMethod () => 0;
+ public int IntMethod () => 0;
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Method(Mono.Linker.Tests.DocumentationSignatureParserTests.G{Mono.Linker.Tests.DocumentationSignatureParserTests.A,Mono.Linker.Tests.DocumentationSignatureParserTests.A})")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Method(Mono.Linker.Tests.DocumentationSignatureParserTests.G{Mono.Linker.Tests.DocumentationSignatureParserTests.A,Mono.Linker.Tests.DocumentationSignatureParserTests.A})")]
- public static void Method (G<A, A> g)
+ public void Method (G<A, A> g)
{
}
[ExpectGeneratedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Method(Mono.Linker.Tests.DocumentationSignatureParserTests.G{Mono.Linker.Tests.DocumentationSignatureParserTests.A,Mono.Linker.Tests.DocumentationSignatureParserTests.A}.NG{Mono.Linker.Tests.DocumentationSignatureParserTests.A})")]
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Method(Mono.Linker.Tests.DocumentationSignatureParserTests.G{Mono.Linker.Tests.DocumentationSignatureParserTests.A,Mono.Linker.Tests.DocumentationSignatureParserTests.A}.NG{Mono.Linker.Tests.DocumentationSignatureParserTests.A})")]
- public static void Method (G<A, A>.NG<A> g)
+ public void Method (G<A, A>.NG<A> g)
{
}
public class Invalid
{
[ExpectUnresolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.NoReturnType~")]
- public static int NoReturnType () => 0;
+ public int NoReturnType () => 0;
[ExpectUnresolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.NoParameters(,)")]
- public static void NoParameters (int a, int b)
+ public void NoParameters (int a, int b)
{
}
[ExpectUnresolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.NoClosingParen(")]
- public static void NoClosingParen () { }
+ public void NoClosingParen () { }
[ExpectUnresolvedDocumentationSignature ("T:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.Whitespace ")]
[ExpectUnresolvedDocumentationSignature (" T:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.Whitespace")]
@@ -383,12 +384,12 @@ namespace Mono.Linker.Tests
public class Whitespace
{
[ExpectUnresolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.Whitespace.Method(System.Int32, System.Int32)")]
- public static void Method (int a, int b)
+ public void Method (int a, int b)
{
}
[ExpectUnresolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.Whitespace.Method(Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.Generic{System.Int32, System.Int32})")]
- public static void Method (Generic<int, int> g)
+ public void Method (Generic<int, int> g)
{
}
}
@@ -421,18 +422,18 @@ namespace Mono.Linker.Tests
}
[ExpectUnresolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.MethodWithGenericInstantiation(Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.Generic`1)")]
- public static void MethodWithGenericInstantiation (Generic<A> g)
+ public void MethodWithGenericInstantiation (Generic<A> g)
{
}
[ExpectUnresolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.Method(System.Int32[:,:])")]
[ExpectUnresolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.Method(System.Int32[0:,)")]
- public static void Method (int[,] a)
+ public void Method (int[,] a)
{
}
[ExpectUnresolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.NonGenericMethod(``0)")]
- public static void NonGenericMethod (int i)
+ public void NonGenericMethod (int i)
{
}
@@ -444,7 +445,7 @@ namespace Mono.Linker.Tests
}
[ExpectUnresolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.MethodMissingArgumentTypeName(System.)")]
- public static void MethodMissingArgumentTypeName (int i)
+ public void MethodMissingArgumentTypeName (int i)
{
}
@@ -452,7 +453,7 @@ namespace Mono.Linker.Tests
public class NoType
{
[ExpectUnresolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid..Method")]
- public static void Method ()
+ public void Method ()
{
}
}
@@ -465,12 +466,12 @@ namespace Mono.Linker.Tests
}
[ExpectUnresolvedDocumentationSignature ("T:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.NoParameterType()")]
- public static void NoParameterType (int i)
+ public void NoParameterType (int i)
{
}
[ExpectUnresolvedDocumentationSignature ("T:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.NoParameterType(Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.Generic{})")]
- public static void NoGenericParameterType (Generic<A> g)
+ public void NoGenericParameterType (Generic<A> g)
{
}
@@ -502,12 +503,12 @@ namespace Mono.Linker.Tests
}
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.NoClosingParenWithParameters(System.Int32")]
- public static void NoClosingParenWithParameters (int a)
+ public void NoClosingParenWithParameters (int a)
{
}
[ExpectExactlyResolvedDocumentationSignature ("M:Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.NoClosingBrace(Mono.Linker.Tests.DocumentationSignatureParserTests.Invalid.Generic{Mono.Linker.Tests.DocumentationSignatureParserTests.A)")]
- public static void NoClosingBrace (Generic<A> g)
+ public void NoClosingBrace (Generic<A> g)
{
}
diff --git a/test/Mono.Linker.Tests/Tests/GetDisplayNameTests.cs b/test/Mono.Linker.Tests/Tests/GetDisplayNameTests.cs
index 2b3075850..b025aae92 100644
--- a/test/Mono.Linker.Tests/Tests/GetDisplayNameTests.cs
+++ b/test/Mono.Linker.Tests/Tests/GetDisplayNameTests.cs
@@ -52,53 +52,53 @@ namespace Mono.Linker.Tests
}
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.A.SingleDimensionalArrayTypeParameter(Int32[])")]
- public static void SingleDimensionalArrayTypeParameter (int[] p)
+ public void SingleDimensionalArrayTypeParameter (int[] p)
{
}
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.A.MultiDimensionalArrayTypeParameter(Int32[,])")]
- public static void MultiDimensionalArrayTypeParameter (int[,] p)
+ public void MultiDimensionalArrayTypeParameter (int[,] p)
{
}
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.A.JaggedArrayTypeParameter(Int32[][,])")]
- public static void JaggedArrayTypeParameter (int[][,] p)
+ public void JaggedArrayTypeParameter (int[][,] p)
{
}
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.A.JaggedArrayTypeParameter(Int32[,][])")]
- public static void JaggedArrayTypeParameter (int[,][] p)
+ public void JaggedArrayTypeParameter (int[,][] p)
{
}
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.A.JaggedArrayTypeParameter(Int32[,][,,][,,,])")]
- public static void JaggedArrayTypeParameter (int[,][,,][,,,] p)
+ public void JaggedArrayTypeParameter (int[,][,,][,,,] p)
{
}
// PointerType
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.A.CommonPointerPointerTypeParameter(Int32*)")]
- public static unsafe void CommonPointerPointerTypeParameter (int* p)
+ public unsafe void CommonPointerPointerTypeParameter (int* p)
{
}
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.A.PointerToPointerPointerTypeParameter(Int32**)")]
- public static unsafe void PointerToPointerPointerTypeParameter (int** p)
+ public unsafe void PointerToPointerPointerTypeParameter (int** p)
{
}
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.A.PointerToArrayPointerTypeParameter(Int32*[,,,])")]
- public static unsafe void PointerToArrayPointerTypeParameter (int*[,,,] p)
+ public unsafe void PointerToArrayPointerTypeParameter (int*[,,,] p)
{
}
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.A.PointerToArrayPointerTypeParameter(Int32*[,][,,])")]
- public static unsafe void PointerToArrayPointerTypeParameter (int*[,][,,] p)
+ public unsafe void PointerToArrayPointerTypeParameter (int*[,][,,] p)
{
}
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.A.PointerTypeToUnknownTypeParameter(Void*)")]
- public static unsafe void PointerTypeToUnknownTypeParameter (void* p)
+ public unsafe void PointerTypeToUnknownTypeParameter (void* p)
{
}
}
@@ -167,7 +167,7 @@ namespace Mono.Linker.Tests
}
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.MethodWithNestedGenericTypeArgumentsNoArgumentsOnLeaf(GetDisplayNameTests.GenericClassOneParameter<Int32>.B)")]
- public static void MethodWithNestedGenericTypeArgumentsNoArgumentsOnLeaf (GenericClassOneParameter<int>.B p) { }
+ public void MethodWithNestedGenericTypeArgumentsNoArgumentsOnLeaf (GenericClassOneParameter<int>.B p) { }
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.GenericClassMultipleParameters<T,S>")]
public class GenericClassMultipleParameters<T, S>
@@ -179,24 +179,24 @@ namespace Mono.Linker.Tests
}
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.MethodWithGenericTypeArgument(IList<GetDisplayNameTests.GenericClassOneParameter<Byte*[]>>)")]
- public static void MethodWithGenericTypeArgument (IList<GenericClassOneParameter<byte*[]>> p)
+ public void MethodWithGenericTypeArgument (IList<GenericClassOneParameter<byte*[]>> p)
{
}
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.MethodWithGenericTypeArguments(GetDisplayNameTests.GenericClassMultipleParameters<Char*[],Int32[,][]>)")]
- public static void MethodWithGenericTypeArguments (GenericClassMultipleParameters<char*[], int[,][]> p)
+ public void MethodWithGenericTypeArguments (GenericClassMultipleParameters<char*[], int[,][]> p)
{
}
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.MethodWithNestedGenericTypeArguments" +
"(GetDisplayNameTests.GenericClassMultipleParameters<Char*[],Int32[,][]>.NestedGenericClassMultipleParameters<Char*[],Int32[,][]>)")]
- public static void MethodWithNestedGenericTypeArguments (GenericClassMultipleParameters<char*[], int[,][]>.NestedGenericClassMultipleParameters<char*[], int[,][]> p)
+ public void MethodWithNestedGenericTypeArguments (GenericClassMultipleParameters<char*[], int[,][]>.NestedGenericClassMultipleParameters<char*[], int[,][]> p)
{
}
[DisplayName ("Mono.Linker.Tests.GetDisplayNameTests.MethodWithPartiallyInstantiatedNestedGenericTypeArguments<MethodT,MethodV>" +
"(GetDisplayNameTests.GenericClassMultipleParameters<MethodT,String>.NestedGenericClassMultipleParameters<Int32,MethodV>)")]
- public static void MethodWithPartiallyInstantiatedNestedGenericTypeArguments<MethodT, MethodV> (
+ public void MethodWithPartiallyInstantiatedNestedGenericTypeArguments<MethodT, MethodV> (
GenericClassMultipleParameters<MethodT, string>.NestedGenericClassMultipleParameters<int, MethodV> p)
{
}
@@ -219,7 +219,7 @@ public class GetDisplayNameTestsGlobalScope
public class TypeInGlobalScope
{
[DisplayName ("GetDisplayNameTestsGlobalScope.TypeInGlobalScope.Method()")]
- public static void Method ()
+ public void Method ()
{
}
}
diff --git a/test/Mono.Linker.Tests/Tests/ParseResponseFileLinesTests.cs b/test/Mono.Linker.Tests/Tests/ParseResponseFileLinesTests.cs
index df06c3ff0..e97960359 100644
--- a/test/Mono.Linker.Tests/Tests/ParseResponseFileLinesTests.cs
+++ b/test/Mono.Linker.Tests/Tests/ParseResponseFileLinesTests.cs
@@ -106,7 +106,7 @@ b""", new string[] { @"a
b" });
}
- private static void TestParseResponseFileLines (string v1, string[] v2)
+ private void TestParseResponseFileLines (string v1, string[] v2)
{
var result = new Queue<string> ();
using (var reader = new StringReader (v1))