Author: kumpera
Date: 2007-10-09 19:59:38 -0400 (Tue, 09 Oct 2007)
New Revision: 87234

Modified:
   trunk/mono/mono/tests/verifier/ChangeLog
   trunk/mono/mono/tests/verifier/make_obj_store_test.sh
   trunk/mono/mono/tests/verifier/make_tests.sh
Log:
2007-10-09 Rodrigo Kumpera <[EMAIL PROTECTED]>

        * make_tests.sh: tests for the return type of the invoked method.
        tests for passing typedbyref as param.

        * make_obj_store_test.sh: add new optional script parameter to tell
        if class fields should be generated. This fix some bogus tests using
        typedbyref.



Modified: trunk/mono/mono/tests/verifier/ChangeLog
===================================================================
--- trunk/mono/mono/tests/verifier/ChangeLog    2007-10-09 22:49:00 UTC (rev 
87233)
+++ trunk/mono/mono/tests/verifier/ChangeLog    2007-10-09 23:59:38 UTC (rev 
87234)
@@ -1,4 +1,13 @@
 2007-10-09 Rodrigo Kumpera <[EMAIL PROTECTED]>
+
+       * make_tests.sh: tests for the return type of the invoked method.
+       tests for passing typedbyref as param.
+
+       * make_obj_store_test.sh: add new optional script parameter to tell
+       if class fields should be generated. This fix some bogus tests using
+       typedbyref.
+
+2007-10-09 Rodrigo Kumpera <[EMAIL PROTECTED]>
        * make_tests.sh: unbox_byref_like test was flawed, it was not testing
        the proper unverifable condition.
 

Modified: trunk/mono/mono/tests/verifier/make_obj_store_test.sh
===================================================================
--- trunk/mono/mono/tests/verifier/make_obj_store_test.sh       2007-10-09 
22:49:00 UTC (rev 87233)
+++ trunk/mono/mono/tests/verifier/make_obj_store_test.sh       2007-10-09 
23:59:38 UTC (rev 87234)
@@ -5,14 +5,22 @@
 TEST_OP=$3
 TEST_TYPE1=$4
 TEST_TYPE2=$5
+TEST_CREATE_FIELD=$6
 
 TEST_NAME=${TEST_VALIDITY}_${TEST_NAME}
 TEST_FILE=${TEST_NAME}_generated.il
 echo $TEST_FILE
 TEST_TYPE1=`echo $TEST_TYPE1 | sed -s 's/&/\\\&/'`
 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
 
+if [ "$TEST_CREATE_FIELD" == "no" ]; then
+       CLASS_FIELDS="";
+else
+       CLASS_FIELDS=".field public ${TEST_TYPE1} fld\n .field public static 
${TEST_TYPE1} sfld";
+fi
+
+sed -e "s/VALIDITY/${TEST_VALIDITY}/g" -e "s/CLASS_FIELDS/${CLASS_FIELDS}/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
@@ -51,8 +59,7 @@
 
 .class Class extends [mscorlib]System.Object
 {
-    .field public TYPE1 fld
-    .field public static TYPE1 sfld
+       CLASS_FIELDS
 
        .method public hidebysig specialname rtspecialname instance default 
void .ctor () cil managed
        {
@@ -82,4 +89,4 @@
        ldc.i4.0
        ret
 }
-//EOF
\ No newline at end of file
+//EOF

Modified: trunk/mono/mono/tests/verifier/make_tests.sh
===================================================================
--- trunk/mono/mono/tests/verifier/make_tests.sh        2007-10-09 22:49:00 UTC 
(rev 87233)
+++ trunk/mono/mono/tests/verifier/make_tests.sh        2007-10-09 23:59:38 UTC 
(rev 87234)
@@ -651,12 +651,6 @@
   #./make_obj_store_test.sh obj_coercion_75_${I} invalid "$OP" 'int32&' float64
   #./make_obj_store_test.sh obj_coercion_76_${I} invalid "$OP" 'int32&' object
   
-  ./make_obj_store_test.sh obj_coercion_77_${I} invalid "$OP" typedref int32
-  ./make_obj_store_test.sh obj_coercion_78_${I} invalid "$OP" typedref 'native 
int'
-  ./make_obj_store_test.sh obj_coercion_79_${I} invalid "$OP" typedref int64
-  ./make_obj_store_test.sh obj_coercion_80_${I} invalid "$OP" typedref float64
-  ./make_obj_store_test.sh obj_coercion_81_${I} invalid "$OP" typedref 
'typedref&'
-  ./make_obj_store_test.sh obj_coercion_82_${I} invalid "$OP" typedref object
 
   ./make_obj_store_test.sh obj_coercion_83_${I} valid "$OP" int32 "native int"
   ./make_obj_store_test.sh obj_coercion_84_${I} valid "$OP" "native int" int32
@@ -672,6 +666,17 @@
   I=`expr $I + 1`
 done
 
+I=1
+for OP in "call void Class::Method(TYPE1)"
+do
+  ./make_obj_store_test.sh obj_coercion_77_${I} unverifiable "$OP" typedref 
int32 "no"
+  ./make_obj_store_test.sh obj_coercion_78_${I} unverifiable "$OP" typedref 
'native int' "no"
+  ./make_obj_store_test.sh obj_coercion_79_${I} unverifiable "$OP" typedref 
int64 "no"
+  ./make_obj_store_test.sh obj_coercion_80_${I} unverifiable "$OP" typedref 
float64 "no"
+  ./make_obj_store_test.sh obj_coercion_82_${I} unverifiable "$OP" typedref 
object "no"
+  I=`expr $I + 1`
+done
+
 # 1.8.1.2.3 Verification type compatibility (Assignment compatibility)
 I=1
 for OP in stloc.0 "stloc.s 0" "starg.s 0"
@@ -1024,6 +1029,20 @@
 ./make_ret_test.sh ret_coercion_89 valid "unsigned int32" "native int"
 ./make_ret_test.sh ret_coercion_90 valid "native unsigned int" "unsigned int32"
 
+#type is unverifable
+./make_ret_test.sh ret_coercion_100 unverifiable "int32*" "int32*"
+./make_ret_test.sh ret_coercion_101 unverifiable "method int32* (int32)" 
"method int32* (int32)"
+
+#typedbyref as parm is ok
+./make_ret_test.sh ret_coercion_102 unverifiable int32 typedref
+./make_ret_test.sh ret_coercion_103 unverifiable typedref int32
+
+#unverifable return type: byref, typedbyref and ArgInterator
+./make_ret_test.sh bad_ret_type_1 unverifiable typedref typedref
+./make_ret_test.sh bad_ret_type_2 unverifiable "int32&" "int32&"
+./make_ret_test.sh bad_ret_type_4 unverifiable "valuetype 
[mscorlib]System.ArgIterator" "valuetype [mscorlib]System.ArgIterator"
+
+
 ./make_ret_test.sh ret_sub_type valid ClassA ClassSubA
 ./make_ret_test.sh ret_same_type valid ClassA ClassA
 ./make_ret_test.sh ret_obj_iface valid object InterfaceA

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to