Browse Source

Fix test in opt and roslyn config.

pull/1322/head
Siegfried Pammer 7 years ago
parent
commit
dcaf4e1441
  1. 3
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.cs
  2. 41
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.il
  3. 29
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.opt.il
  4. 25
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.opt.roslyn.il
  5. 36
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.roslyn.il

3
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.cs

@ -4,7 +4,8 @@ @@ -4,7 +4,8 @@
{
public ulong Issue1308(ulong u = 8uL)
{
return ((u & uint.MaxValue) != 0) ? 18446744069414584320uL : 0;
Test((u & uint.MaxValue) != 0);
return 18446744069414584320uL;
}
public void Byte_BitmaskingInCondition(byte v)

41
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.il

@ -36,29 +36,28 @@ @@ -36,29 +36,28 @@
Issue1308([opt] uint64 u) cil managed
{
.param [1] = uint64(0x8)
// Code size 28 (0x1c)
.maxstack 2
// Code size 33 (0x21)
.maxstack 3
.locals init (uint64 V_0)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldc.i4.m1
IL_0003: conv.u8
IL_0004: and
IL_0005: ldc.i4.0
IL_0006: conv.i8
IL_0007: bne.un.s IL_000d
IL_0009: ldc.i4.0
IL_000a: conv.i8
IL_000b: br.s IL_0016
IL_000d: ldc.i8 0xffffffff00000000
IL_0016: nop
IL_0017: stloc.0
IL_0018: br.s IL_001a
IL_001a: ldloc.0
IL_001b: ret
IL_0001: ldarg.0
IL_0002: ldarg.1
IL_0003: ldc.i4.m1
IL_0004: conv.u8
IL_0005: and
IL_0006: ldc.i4.0
IL_0007: conv.i8
IL_0008: ceq
IL_000a: ldc.i4.0
IL_000b: ceq
IL_000d: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_0012: nop
IL_0013: ldc.i8 0xffffffff00000000
IL_001c: stloc.0
IL_001d: br.s IL_001f
IL_001f: ldloc.0
IL_0020: ret
} // end of method ConstantsTests::Issue1308
.method public hidebysig instance void

29
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.opt.il

@ -36,22 +36,21 @@ @@ -36,22 +36,21 @@
Issue1308([opt] uint64 u) cil managed
{
.param [1] = uint64(0x8)
// Code size 21 (0x15)
// Code size 27 (0x1b)
.maxstack 8
IL_0000: ldarg.1
IL_0001: ldc.i4.m1
IL_0002: conv.u8
IL_0003: and
IL_0004: ldc.i4.0
IL_0005: conv.i8
IL_0006: bne.un.s IL_000b
IL_0008: ldc.i4.0
IL_0009: conv.i8
IL_000a: ret
IL_000b: ldc.i8 0xffffffff00000000
IL_0014: ret
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: ldc.i4.m1
IL_0003: conv.u8
IL_0004: and
IL_0005: ldc.i4.0
IL_0006: conv.i8
IL_0007: ceq
IL_0009: ldc.i4.0
IL_000a: ceq
IL_000c: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_0011: ldc.i8 0xffffffff00000000
IL_001a: ret
} // end of method ConstantsTests::Issue1308
.method public hidebysig instance void

25
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.opt.roslyn.il

@ -40,20 +40,19 @@ @@ -40,20 +40,19 @@
Issue1308([opt] uint64 u) cil managed
{
.param [1] = uint64(0x8)
// Code size 19 (0x13)
// Code size 24 (0x18)
.maxstack 8
IL_0000: ldarg.1
IL_0001: ldc.i4.m1
IL_0002: conv.u8
IL_0003: and
IL_0004: brtrue.s IL_0009
IL_0006: ldc.i4.0
IL_0007: conv.i8
IL_0008: ret
IL_0009: ldc.i8 0xffffffff00000000
IL_0012: ret
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: ldc.i4.m1
IL_0003: conv.u8
IL_0004: and
IL_0005: ldc.i4.0
IL_0006: conv.i8
IL_0007: cgt.un
IL_0009: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_000e: ldc.i8 0xffffffff00000000
IL_0017: ret
} // end of method ConstantsTests::Issue1308
.method public hidebysig instance void

36
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.roslyn.il

@ -40,26 +40,26 @@ @@ -40,26 +40,26 @@
Issue1308([opt] uint64 u) cil managed
{
.param [1] = uint64(0x8)
// Code size 25 (0x19)
.maxstack 2
// Code size 30 (0x1e)
.maxstack 3
.locals init (uint64 V_0)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldc.i4.m1
IL_0003: conv.u8
IL_0004: and
IL_0005: brtrue.s IL_000b
IL_0007: ldc.i4.0
IL_0008: conv.i8
IL_0009: br.s IL_0014
IL_000b: ldc.i8 0xffffffff00000000
IL_0014: stloc.0
IL_0015: br.s IL_0017
IL_0017: ldloc.0
IL_0018: ret
IL_0001: ldarg.0
IL_0002: ldarg.1
IL_0003: ldc.i4.m1
IL_0004: conv.u8
IL_0005: and
IL_0006: ldc.i4.0
IL_0007: conv.i8
IL_0008: cgt.un
IL_000a: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_000f: nop
IL_0010: ldc.i8 0xffffffff00000000
IL_0019: stloc.0
IL_001a: br.s IL_001c
IL_001c: ldloc.0
IL_001d: ret
} // end of method ConstantsTests::Issue1308
.method public hidebysig instance void

Loading…
Cancel
Save