* *.sh: Fix more verification problems.
* TestRunner.cs: Use Assembly.EntryPoint instead of searching for a Main method.
svn path=/trunk/mono/; revision=61118
+2006-05-25 Zoltan Varga <vargaz@gmail.com>
+
+ * *.sh: Fix more verification problems.
+
+ * TestRunner.cs: Use Assembly.EntryPoint instead of searching for a Main method.
+
2006-05-23 Zoltan Varga <vargaz@gmail.com>
* make_store_test.sh make_obj_store_test.sh make_stack_merge_test.sh: Fix
Console.Write (test);
Assembly a = Assembly.LoadFrom (test);
- Module m = a.GetLoadedModules ()[0];
- MethodInfo mi = m.GetMethod ("Main");
+ MethodInfo mi = a.EntryPoint;
+
+ if (mi == null) {
+ Console.WriteLine (" FAILED (no entry point found)");
+ return;
+ }
try {
mi.Invoke (null, null);
// VALIDITY CIL which breaks the ECMA-335 rules.
// this CIL should fail verification by a conforming CLI verifier.
+.assembly '${TEST_NAME}_generated'
+{
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+
.method public static int32 Main() cil managed
{
.entrypoint
// invalid CIL which breaks the ECMA-335 rules.
// This CIL should fail verification by a conforming CLI verifier.
+.assembly '${TEST_NAME}_generated'
+{
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+
.method public static int32 Main() cil managed
{
.entrypoint
TEST_TYPE2=`echo $TEST_TYPE2 | sed -s 's/&/\\\&/'`
sed -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/OPCODE/${TEST_OP}/g" -e "s/TYPE1/${TEST_TYPE1}/g" -e "s/TYPE2/${TEST_TYPE2}/g" > $TEST_FILE <<//EOF
+.assembly '${TEST_NAME}_generated'
+{
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+
// VALIDITY CIL which breaks the ECMA-335 rules.
// this CIL should fail verification by a conforming CLI verifier.
// invalid CIL which breaks the ECMA-335 rules.
// This CIL should fail verification by a conforming CLI verifier.
+.assembly '${TEST_NAME}_generated'
+{
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+
.class Class extends [mscorlib]System.Object
{
.field public int32 fld
}
-.method public static int32 Main(int32 arg) cil managed
+.method public static int32 Main() cil managed
{
.entrypoint
.maxstack 1
// invalid CIL which breaks the ECMA-335 rules.
// This CIL should fail verification by a conforming CLI verifier.
+.assembly '${TEST_NAME}_generated'
+{
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+
.class Class extends [mscorlib]System.Object
{
.field public int32 fld
}
-.method public static int32 Main(int32 arg) cil managed
+.method public static int32 Main() cil managed
{
.entrypoint
.maxstack 1
// invalid CIL which breaks the ECMA-335 rules.
// This CIL should fail verification by a conforming CLI verifier.
+.assembly '${TEST_NAME}_generated'
+{
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+
.class Class extends [mscorlib]System.Object
{
.field public int32 fld
}
-.method public static int32 Main(int32 arg) cil managed
+.method public static int32 Main() cil managed
{
.entrypoint
.maxstack 1
// VALIDITY CIL which breaks the ECMA-335,III,1.8.1.3 rule.
// this CIL should fail verification by a conforming CLI verifier.
+.assembly '${TEST_NAME}_generated'
+{
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+
.assembly extern mscorlib
{
.ver 1:0:5000:0
// VALIDITY CIL which breaks the ECMA-335 rules.
// this CIL should fail verification by a conforming CLI verifier.
+.assembly '${TEST_NAME}_generated'
+{
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+
.assembly extern mscorlib
{
.ver 1:0:5000:0