diff options
author | Marek Safar <marek.safar@gmail.com> | 2021-05-07 18:51:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-07 18:51:40 +0300 |
commit | a5f4931bc577ca94d05cd6b64e810c5cc4f035bb (patch) | |
tree | 20a746e4f6c0a801d044d111c3fed50c59be4706 /test/Mono.Linker.Tests | |
parent | 17dd8b63f0f1752685575f920a3c3db00c51ecb9 (diff) |
Improve expected tests results verification for branch instructions (#2018)
Diffstat (limited to 'test/Mono.Linker.Tests')
-rw-r--r-- | test/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs b/test/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs index d3b00386b..421e4ac1a 100644 --- a/test/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs +++ b/test/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs @@ -386,6 +386,15 @@ namespace Mono.Linker.Tests.TestCasesRunner public static string FormatInstruction (Instruction instr) { + switch (instr.OpCode.FlowControl) { + case FlowControl.Branch: + case FlowControl.Cond_Branch: + if (instr.Operand is Instruction target) + return $"{instr.OpCode.ToString ()} il_{target.Offset.ToString ("X")}"; + + break; + } + switch (instr.OpCode.Code) { case Code.Ldc_I4: if (instr.Operand is int ivalue) |