Browse Source

#1047: Update test case provided by @tamlin-mike

pull/1051/head
Siegfried Pammer 8 years ago
parent
commit
cecf153a0c
  1. 17
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1047.cs
  2. 38
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1047.il

17
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1047.cs

@ -2,23 +2,16 @@ @@ -2,23 +2,16 @@
{
public class Issue1047
{
private static bool dummy;
private void ProblemMethod()
{
IL_0000:
do {
if (/*Error near IL_0001: Stack underflow*/ >= /*Error near IL_0001: Stack underflow*/) {
if ((int)/*Error near IL_0007: Stack underflow*/ == 0) {
return;
}
return;
}
} while ((int)/*Error near IL_0014: Stack underflow*/ == 0);
if (/*Error near IL_0020: Stack underflow*/ > /*Error near IL_0020: Stack underflow*/&& (int)/*Error near IL_0026: Stack underflow*/ != 0 && (int)/*Error near IL_002c: Stack underflow*/ == 0) {
return;
while (!Issue1047.dummy) {
}
return;
IL_0037:
IL_0014:
goto IL_0000;
}
}
}
}

38
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1047.il

@ -29,44 +29,14 @@ @@ -29,44 +29,14 @@
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.Issue1047
{
.field private static bool dummy;
.method private hidebysig instance void ProblemMethod() cil managed
{
.maxstack 4
// loop start
IL_0000: nop
blt IL_0047
nop
brfalse IL_0037
nop
IL_0037: nop
IL_0000: ldfld bool ICSharpCode.Decompiler.Tests.TestCases.ILPretty.Issue1047::dummy;
brfalse L_tgt1
br L_exit
IL_0047: nop
brtrue IL_0083
nop
br IL_0000
IL_0083: nop
ble.un IL_00fa
nop
brfalse IL_00db
nop
brfalse IL_00fa
IL_00db: nop
IL_00fa: br L_exit
L_tgt1: br IL_0000
br IL_0000
// end loop
L_exit: ret
}
}
Loading…
Cancel
Save