4 if [ `which gsed 2> /dev/null` ] ; then
16 if [ "$TEST_EXTENDS" = "yes" ]; then
17 TEST_EXTENDS
="extends Class"
18 TEST_SUPER_TYPE
="Class"
20 TEST_EXTENDS
="extends [mscorlib]System.Object"
21 TEST_SUPER_TYPE
="object"
24 if [ "$TEST_USE_SUB_CLASS" = "yes" ]; then
25 TEST_VAR_TYPE
="ExampleClass"
30 TEST_NAME
=${TEST_VALIDITY}_
${TEST_NAME}
31 TEST_FILE
=${TEST_NAME}_generated.il
33 $SED -e "s/SUPER_TYPE/${TEST_SUPER_TYPE}/g" -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/CLASS_ACCESS/${TEST_CLASS_ACCESS}/g" -e "s/VAR_TYPE/${TEST_VAR_TYPE}/g" -e "s/MEMBER_ACCESS/${TEST_MEMBER_ACCESS}/g" -e "s/EXTENDS/${TEST_EXTENDS}/g" > $TEST_FILE <<//EOF
35 .assembly
'${TEST_NAME}_generated'
37 .
hash algorithm
0x00008004
41 // VALIDITY CIL
which breaks the ECMA-335 rules.
42 // this CIL should fail verification by a conforming CLI verifier.
44 .assembly extern mscorlib
47 .publickeytoken
= (B7
7A
5C
56 19 34 E0
89 ) // .z\V
.4..
50 .class CLASS_ACCESS Class extends
[mscorlib
]System.Object
52 .field MEMBER_ACCESS static int32 sfld
53 .field MEMBER_ACCESS int32 fld
55 .method public hidebysig specialname rtspecialname instance default void .ctor
() cil managed
59 call instance void object
::.ctor
()
63 .method MEMBER_ACCESS int32 Method
() {
69 .class ExampleClass EXTENDS
71 .method public hidebysig specialname rtspecialname instance default void .ctor
() cil managed
75 call instance void SUPER_TYPE
::.ctor
()
79 .method public static int32 Main
() cil managed
83 newobj instance void class VAR_TYPE
::.ctor
()