[WinForms] Fix #18506 ActiveTracker, do not propagate message to control when it...
[mono-project.git] / mono / tests / verifier / make_access_test.sh
blob72be8020ee54eb6d2d34905f68915604e0f0b700
1 #! /bin/sh
3 SED="sed"
4 if [ `which gsed 2> /dev/null` ] ; then
5 SED="gsed"
6 fi
8 TEST_NAME=$1
9 TEST_VALIDITY=$2
10 TEST_OP=$3
11 TEST_CLASS_ACCESS=$4
12 TEST_MEMBER_ACCESS=$5
13 TEST_EXTENDS=$6
14 TEST_USE_SUB_CLASS=$7
16 if [ "$TEST_EXTENDS" = "yes" ]; then
17 TEST_EXTENDS="extends Class"
18 TEST_SUPER_TYPE="Class"
19 else
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"
26 else
27 TEST_VAR_TYPE="Class"
30 TEST_NAME=${TEST_VALIDITY}_${TEST_NAME}
31 TEST_FILE=${TEST_NAME}_generated.il
32 echo $TEST_FILE
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
38 .ver 0:0:0:0
41 // VALIDITY CIL which breaks the ECMA-335 rules.
42 // this CIL should fail verification by a conforming CLI verifier.
44 .assembly extern mscorlib
46 .ver 1:0:5000:0
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
57 .maxstack 8
58 ldarg.0
59 call instance void object::.ctor()
60 ret
63 .method MEMBER_ACCESS int32 Method() {
64 ldc.i4.0
65 ret
69 .class ExampleClass EXTENDS
71 .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed
73 .maxstack 8
74 ldarg.0
75 call instance void SUPER_TYPE::.ctor()
76 ret
79 .method public static int32 Main() cil managed
81 .entrypoint
82 .maxstack 4
83 newobj instance void class VAR_TYPE::.ctor()
84 OPCODE // VALIDITY.
85 pop
86 ldc.i4.0
87 ret
90 //EOF