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:
authorMarek Safar <marek.safar@gmail.com>2020-04-24 02:01:35 +0300
committerGitHub <noreply@github.com>2020-04-24 02:01:35 +0300
commit7263df610e2f9405fd8f49f5973f0e4182b0ad5f (patch)
treedcff6ce9465f9c829b52a1f8bb17da7a9c6b910d /test/Mono.Linker.Tests.Cases/UnreachableBlock
parentd60f4eab2982dfef19d71dfcf2d5ab2286950af2 (diff)
Ensure consistent sources formatting (#1138)
* Apply consistent formatting based on .editorconfig ``` dotnet format -f <path> ``` * Add lint step to the CI * Use local tool * Suppress publish logs warning * Fix more style errors * Fixes bad merge * Write something to log dir * Move lint job to global scope So it doesn't get the arcade publish logs/test steps injected. * Split sources and tests reporting * Include also src folder in the run * Exclude cecil sources * Remove duplicate line * Trigger notification * Format more code Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/UnreachableBlock')
-rw-r--r--test/Mono.Linker.Tests.Cases/UnreachableBlock/BodiesWithSubstitutions.cs2
-rw-r--r--test/Mono.Linker.Tests.Cases/UnreachableBlock/DeadVariables.cs6
-rw-r--r--test/Mono.Linker.Tests.Cases/UnreachableBlock/MultiStageRemoval.cs14
-rw-r--r--test/Mono.Linker.Tests.Cases/UnreachableBlock/ReplacedReturns.cs20
-rw-r--r--test/Mono.Linker.Tests.Cases/UnreachableBlock/SimpleConditionalProperty.cs25
-rw-r--r--test/Mono.Linker.Tests.Cases/UnreachableBlock/SizeOfInConditions.cs6
-rw-r--r--test/Mono.Linker.Tests.Cases/UnreachableBlock/TryCatchBlocks.cs12
-rw-r--r--test/Mono.Linker.Tests.Cases/UnreachableBlock/TryFinallyBlocks.cs2
-rw-r--r--test/Mono.Linker.Tests.Cases/UnreachableBlock/UninitializedLocals.cs4
9 files changed, 47 insertions, 44 deletions
diff --git a/test/Mono.Linker.Tests.Cases/UnreachableBlock/BodiesWithSubstitutions.cs b/test/Mono.Linker.Tests.Cases/UnreachableBlock/BodiesWithSubstitutions.cs
index 668d5142e..6b347bb1d 100644
--- a/test/Mono.Linker.Tests.Cases/UnreachableBlock/BodiesWithSubstitutions.cs
+++ b/test/Mono.Linker.Tests.Cases/UnreachableBlock/BodiesWithSubstitutions.cs
@@ -17,7 +17,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
static int field;
- public static void Main()
+ public static void Main ()
{
TestProperty_int_1 ();
TestField_int_1 ();
diff --git a/test/Mono.Linker.Tests.Cases/UnreachableBlock/DeadVariables.cs b/test/Mono.Linker.Tests.Cases/UnreachableBlock/DeadVariables.cs
index f0f96f0f6..80a3908f9 100644
--- a/test/Mono.Linker.Tests.Cases/UnreachableBlock/DeadVariables.cs
+++ b/test/Mono.Linker.Tests.Cases/UnreachableBlock/DeadVariables.cs
@@ -18,7 +18,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
[Kept]
[ExpectBodyModified]
- [ExpectedLocalsSequence (new string [0])]
+ [ExpectedLocalsSequence (new string[0])]
static void Test_1 ()
{
if (!AlwaysTrue) {
@@ -29,7 +29,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
[Kept]
[ExpectBodyModified]
- [ExpectedLocalsSequence (new string [] { "System.Object", "System.Int32" })]
+ [ExpectedLocalsSequence (new string[] { "System.Object", "System.Int32" })]
static int Test_2 (int arg)
{
if (!AlwaysTrue) {
@@ -47,7 +47,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
[Kept]
[ExpectBodyModified]
- [ExpectedLocalsSequence (new string [] { "System.Int32", "System.DateTime", "System.DateTimeOffset", "System.DateTimeOffset" })]
+ [ExpectedLocalsSequence (new string[] { "System.Int32", "System.DateTime", "System.DateTimeOffset", "System.DateTimeOffset" })]
static int Test_3 ()
{
var b = 3;
diff --git a/test/Mono.Linker.Tests.Cases/UnreachableBlock/MultiStageRemoval.cs b/test/Mono.Linker.Tests.Cases/UnreachableBlock/MultiStageRemoval.cs
index 7f9d02fad..95a435eea 100644
--- a/test/Mono.Linker.Tests.Cases/UnreachableBlock/MultiStageRemoval.cs
+++ b/test/Mono.Linker.Tests.Cases/UnreachableBlock/MultiStageRemoval.cs
@@ -8,7 +8,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
[SetupLinkerArgument ("--enable-opt", "ipconstprop")]
public class MultiStageRemoval
{
- public static void Main()
+ public static void Main ()
{
TestMethod_1 ();
TestMethod_2 ();
@@ -53,7 +53,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
return -1;
return 0;
- }
+ }
[Kept]
static int Prop {
@@ -69,14 +69,14 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
get {
return true;
}
- }
-
+ }
+
static void NeverReached_1 ()
- {
+ {
}
static void NeverReached_2 ()
- {
- }
+ {
+ }
}
} \ No newline at end of file
diff --git a/test/Mono.Linker.Tests.Cases/UnreachableBlock/ReplacedReturns.cs b/test/Mono.Linker.Tests.Cases/UnreachableBlock/ReplacedReturns.cs
index 9af58122f..0758e32c7 100644
--- a/test/Mono.Linker.Tests.Cases/UnreachableBlock/ReplacedReturns.cs
+++ b/test/Mono.Linker.Tests.Cases/UnreachableBlock/ReplacedReturns.cs
@@ -32,7 +32,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"pop",
"call",
@@ -50,7 +50,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"pop",
"call",
@@ -68,7 +68,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"pop",
"ldsfld",
@@ -87,7 +87,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"pop",
"ldsfld",
@@ -108,7 +108,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"pop",
"ldsfld",
@@ -132,7 +132,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"pop",
"call",
@@ -161,7 +161,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"pop",
"call",
@@ -192,7 +192,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"ldc.i4.0",
"stloc.0",
"call",
@@ -231,7 +231,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
[Kept]
[ExpectedExceptionHandlerSequence (new string[0])]
[ExpectedLocalsSequence (new string[0])]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"pop",
"call",
@@ -250,7 +250,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"pop",
"call",
diff --git a/test/Mono.Linker.Tests.Cases/UnreachableBlock/SimpleConditionalProperty.cs b/test/Mono.Linker.Tests.Cases/UnreachableBlock/SimpleConditionalProperty.cs
index a2708177f..5309bd332 100644
--- a/test/Mono.Linker.Tests.Cases/UnreachableBlock/SimpleConditionalProperty.cs
+++ b/test/Mono.Linker.Tests.Cases/UnreachableBlock/SimpleConditionalProperty.cs
@@ -9,7 +9,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
[SetupLinkerArgument ("--enable-opt", "ipconstprop")]
public class SimpleConditionalProperty
{
- public static void Main()
+ public static void Main ()
{
TestProperty_int_1 ();
TestProperty_int_2 ();
@@ -23,7 +23,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"ldc.i4.3",
"beq.s",
@@ -36,7 +36,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"ldc.i4.3",
"call",
"beq.s",
@@ -52,7 +52,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"ldc.i4.5",
"ble.s",
@@ -69,7 +69,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"pop",
"ldloca.s",
@@ -86,7 +86,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"brfalse.s",
"ret"
@@ -101,7 +101,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"brfalse.s",
"ret"
@@ -114,7 +114,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"call",
"beq.s",
@@ -128,7 +128,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"br.s",
"call",
"pop",
@@ -142,7 +142,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"brfalse.s",
"ret"
@@ -187,13 +187,14 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
static void NeverReached_1 ()
- {
+ {
}
[Kept]
[KeptMember ("value__")]
[KeptBaseType (typeof (Enum))]
- enum TestEnum {
+ enum TestEnum
+ {
[Kept]
A = 0,
[Kept]
diff --git a/test/Mono.Linker.Tests.Cases/UnreachableBlock/SizeOfInConditions.cs b/test/Mono.Linker.Tests.Cases/UnreachableBlock/SizeOfInConditions.cs
index e5d97a702..fffd2c268 100644
--- a/test/Mono.Linker.Tests.Cases/UnreachableBlock/SizeOfInConditions.cs
+++ b/test/Mono.Linker.Tests.Cases/UnreachableBlock/SizeOfInConditions.cs
@@ -2,7 +2,8 @@ using System;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
-namespace Mono.Linker.Tests.Cases.UnreachableBlock {
+namespace Mono.Linker.Tests.Cases.UnreachableBlock
+{
#if ILLINK
[SetupLinkerSubstitutionFile ("SizeOfInConditions.netcore.xml")]
#else
@@ -10,7 +11,8 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock {
#endif
[SetupCompileArgument ("/unsafe")]
[SetupLinkerArgument ("--enable-opt", "ipconstprop")]
- public unsafe class SizeOfInConditions {
+ public unsafe class SizeOfInConditions
+ {
public static void Main ()
{
TestIntPtr ();
diff --git a/test/Mono.Linker.Tests.Cases/UnreachableBlock/TryCatchBlocks.cs b/test/Mono.Linker.Tests.Cases/UnreachableBlock/TryCatchBlocks.cs
index e0a8132bd..dca8e0cfa 100644
--- a/test/Mono.Linker.Tests.Cases/UnreachableBlock/TryCatchBlocks.cs
+++ b/test/Mono.Linker.Tests.Cases/UnreachableBlock/TryCatchBlocks.cs
@@ -14,7 +14,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"ldc.i4.6",
"beq.s",
@@ -26,13 +26,13 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
static int TestSimpleTryUnreachable ()
{
if (Prop != 6) {
- try {
+ try {
Unreached_1 ();
return 1;
- } catch {
- return 2;
- }
- }
+ } catch {
+ return 2;
+ }
+ }
return 3;
}
diff --git a/test/Mono.Linker.Tests.Cases/UnreachableBlock/TryFinallyBlocks.cs b/test/Mono.Linker.Tests.Cases/UnreachableBlock/TryFinallyBlocks.cs
index 07a17b804..e39a2f936 100644
--- a/test/Mono.Linker.Tests.Cases/UnreachableBlock/TryFinallyBlocks.cs
+++ b/test/Mono.Linker.Tests.Cases/UnreachableBlock/TryFinallyBlocks.cs
@@ -14,7 +14,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock
}
[Kept]
- [ExpectedInstructionSequence (new [] {
+ [ExpectedInstructionSequence (new[] {
"call",
"ldc.i4.3",
"beq.s",
diff --git a/test/Mono.Linker.Tests.Cases/UnreachableBlock/UninitializedLocals.cs b/test/Mono.Linker.Tests.Cases/UnreachableBlock/UninitializedLocals.cs
index 31283486a..dafdd100d 100644
--- a/test/Mono.Linker.Tests.Cases/UnreachableBlock/UninitializedLocals.cs
+++ b/test/Mono.Linker.Tests.Cases/UnreachableBlock/UninitializedLocals.cs
@@ -4,12 +4,12 @@ using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.UnreachableBlock
{
[Define ("IL_ASSEMBLY_AVAILABLE")]
- [SetupCompileBefore ("library.dll", new [] { "Dependencies/LocalsWithoutStore.il" })]
+ [SetupCompileBefore ("library.dll", new[] { "Dependencies/LocalsWithoutStore.il" })]
[SetupLinkerArgument ("--enable-opt", "ipconstprop")]
[SkipPeVerify]
public class UninitializedLocals
{
- public static void Main()
+ public static void Main ()
{
#if IL_ASSEMBLY_AVAILABLE
Mono.Linker.Tests.Cases.UnreachableBlock.Dependencies.ClassA.Method_1 ();