Skip to content

Commit

Permalink
Clean up a bunch of weird one-off test source code constructs
Browse files Browse the repository at this point in the history
Several IL tests listed their classes twice - presumably once as a
'declaration' and ther second time as the 'definition'. Apart from
the fact that this causes trouble in my semi-automatic IL rewriter,
I don't see any reason for keeping this moving forward as it just
clutters the files and complicates their maintenance. I also found
one remaining test with main accepting command-line arguments
(previously overlooked due to lowercase m).

Thanks

Tomas

Make stringintern test classes public

Make ExplicitLayout owner class public
  • Loading branch information
trylek committed Feb 8, 2022
1 parent da5888a commit 9c47faf
Show file tree
Hide file tree
Showing 13 changed files with 132 additions and 340 deletions.
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/Coverage/b518440.il
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

.class public A
{
.method public hidebysig static int32 main(string[] args)
.method public hidebysig static int32 main()
{
.entrypoint
.maxstack 2
Expand Down
3 changes: 3 additions & 0 deletions src/tests/JIT/Methodical/cctor/misc/deadlock.il
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ ret
}
}

.class public Test_deadlock extends[mscorlib]System.Object
{
.method public static int32 Main()
{
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
Expand All @@ -50,3 +52,4 @@ ldc.i4 100
ret
}
}
}
37 changes: 0 additions & 37 deletions src/tests/JIT/Methodical/cctor/simple/prefldinit1.il
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,6 @@
.ver 0:0:0:0
}
.assembly extern xunit.core {}
// MVID: {D664E737-135B-4517-AFBA-875EBEA1C810}
.imagebase 0x00400000
.subsystem 0x00000003
.file alignment 512
.corflags 0x00000001
// Image base: 0x076c0000
//
// ============== CLASS STRUCTURE DECLARATION ==================
//
.class private auto ansi beforefieldinit measure
extends [mscorlib]System.Object
{
} // end of class measure

.class private auto ansi test
extends [mscorlib]System.Object
{
} // end of class test

.class private auto ansi beforefieldinit Driver
extends [mscorlib]System.Object
{
} // end of class Driver


// =============================================================


// =============== GLOBAL FIELDS AND METHODS ===================


// =============================================================


// =============== CLASS MEMBERS DECLARATION ===================
// note that class flags, 'extends' and 'implements' clauses
// are provided here for information only

.class private auto ansi beforefieldinit measure
extends [mscorlib]System.Object
Expand Down
37 changes: 0 additions & 37 deletions src/tests/JIT/Methodical/cctor/simple/prefldinit2.il
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,6 @@
.ver 0:0:0:0
}
.assembly extern xunit.core {}
// MVID: {C486E388-5E60-42FA-B093-89857CB047D8}
.imagebase 0x00400000
.subsystem 0x00000003
.file alignment 512
.corflags 0x00000001
// Image base: 0x076c0000
//
// ============== CLASS STRUCTURE DECLARATION ==================
//
.class private auto ansi beforefieldinit measure
extends [mscorlib]System.Object
{
} // end of class measure

.class private auto ansi test
extends [mscorlib]System.Object
{
} // end of class test

.class private auto ansi beforefieldinit Driver
extends [mscorlib]System.Object
{
} // end of class Driver


// =============================================================


// =============== GLOBAL FIELDS AND METHODS ===================


// =============================================================


// =============== CLASS MEMBERS DECLARATION ===================
// note that class flags, 'extends' and 'implements' clauses
// are provided here for information only

.class private auto ansi beforefieldinit measure
extends [mscorlib]System.Object
Expand Down
37 changes: 0 additions & 37 deletions src/tests/JIT/Methodical/cctor/simple/prefldinit4.il
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,6 @@
.ver 0:0:0:0
}
.assembly extern xunit.core {}
// MVID: {623817A9-BEA6-4892-A378-D2135E123200}
.imagebase 0x00400000
.subsystem 0x00000003
.file alignment 512
.corflags 0x00000001
// Image base: 0x076c0000
//
// ============== CLASS STRUCTURE DECLARATION ==================
//
.class private auto ansi beforefieldinit measure
extends [mscorlib]System.Object
{
} // end of class measure

.class private auto ansi test
extends [mscorlib]System.Object
{
} // end of class test

.class private auto ansi beforefieldinit Driver
extends [mscorlib]System.Object
{
} // end of class Driver


// =============================================================


// =============== GLOBAL FIELDS AND METHODS ===================


// =============================================================


// =============== CLASS MEMBERS DECLARATION ===================
// note that class flags, 'extends' and 'implements' clauses
// are provided here for information only

.class private auto ansi beforefieldinit measure
extends [mscorlib]System.Object
Expand Down
56 changes: 20 additions & 36 deletions src/tests/JIT/Methodical/eh/deadcode/deadEHregionacrossBB.il
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,15 @@
.class private auto ansi beforefieldinit test
extends [mscorlib]System.Object
{
.field private static class [eh_common]TestUtil.TestLog testLog
.method private hidebysig specialname rtspecialname static void .cctor() cil managed
{
.maxstack 2
newobj instance void [eh_common]TestUtil.TestLog::.ctor()
stsfld class [eh_common]TestUtil.TestLog test::testLog
ret
} // end of method test::.cctor
} // end of class test








.field private static class [eh_common]TestUtil.TestLog testLog
.method private hidebysig specialname rtspecialname static void .cctor() cil managed
{
.maxstack 2
newobj instance void [eh_common]TestUtil.TestLog::.ctor()
stsfld class [eh_common]TestUtil.TestLog test::testLog
ret
} // end of method test::.cctor

.class private auto ansi beforefieldinit test
extends [mscorlib]System.Object
{
.method public hidebysig static int32 Main() cil managed
{
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
Expand All @@ -57,9 +45,9 @@
.locals init (int32 V_0)
ldsfld class [eh_common]TestUtil.TestLog test::testLog
callvirt instance void [eh_common]TestUtil.TestLog::StartRecording()

L:
br IL_0019
br IL_0019
.try
{
IL_0000: ldstr "In try"
Expand All @@ -72,37 +60,33 @@
leave.s L
} finally {
endfinally
}
}
IL_000a: leave.s IL_0019
} // end .try
catch [mscorlib]System.Object
catch [mscorlib]System.Object
{
IL_000c: pop
IL_000d: ldstr "In catch"
IL_0012: call void [System.Console]System.Console::WriteLine(string)
IL_0017: leave.s IL_0019

} // end handler
IL_0019:
ldsfld class [eh_common]TestUtil.TestLog test::testLog
callvirt instance void [eh_common]TestUtil.TestLog::StopRecording()
ldsfld class [eh_common]TestUtil.TestLog test::testLog
callvirt instance int32 [eh_common]TestUtil.TestLog::VerifyOutput()
IL_0019:
ldsfld class [eh_common]TestUtil.TestLog test::testLog
callvirt instance void [eh_common]TestUtil.TestLog::StopRecording()

ldsfld class [eh_common]TestUtil.TestLog test::testLog
callvirt instance int32 [eh_common]TestUtil.TestLog::VerifyOutput()

IL_0022: ret
} // end of method test::Main

.method public hidebysig specialname rtspecialname
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
.maxstack 1
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method test::.ctor

} // end of class test



40 changes: 1 addition & 39 deletions src/tests/JIT/Methodical/eh/deadcode/deadcodeincatch.il
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,7 @@
.ver 0:0:0:0
}
.assembly extern xunit.core {}
// MVID: {3B8B6D1B-A317-4591-BD66-1D1000E3767F}
.imagebase 0x00400000
.subsystem 0x00000003
.file alignment 512
.corflags 0x00000001
// Image base: 0x03010000
//
// ============== CLASS STRUCTURE DECLARATION ==================
//

.namespace hello
{
.class private auto ansi beforefieldinit Class1
Expand Down Expand Up @@ -60,30 +52,7 @@
stsfld class [eh_common]TestUtil.TestLog hello.Class1::testLog
ret
} // end of method Class1::.cctor

} // end of class Class1

} // end of namespace hello


// =============================================================


// =============== GLOBAL FIELDS AND METHODS ===================


// =============================================================


// =============== CLASS MEMBERS DECLARATION ===================
// note that class flags, 'extends' and 'implements' clauses
// are provided here for information only

.namespace hello
{
.class private auto ansi beforefieldinit Class1
extends [mscorlib]System.Object
{
.method public hidebysig static void
inTry() cil managed
{
Expand Down Expand Up @@ -212,11 +181,4 @@
} // end of method Class1::.ctor

} // end of class Class1


// =============================================================

} // end of namespace hello

//*********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file deadcodeincatch.res
Loading

0 comments on commit 9c47faf

Please sign in to comment.