Author: gert
Date: 2007-09-22 04:43:59 -0400 (Sat, 22 Sep 2007)
New Revision: 86195

Added:
   trunk/gert/standalone/bug327438/
   trunk/gert/standalone/bug327438/default.build
   trunk/gert/standalone/bug327438/test.il
Modified:
   trunk/gert/standalone/known-issues
Log:
Added test for bug #327438.


Added: trunk/gert/standalone/bug327438/default.build
===================================================================
--- trunk/gert/standalone/bug327438/default.build       2007-09-22 02:16:26 UTC 
(rev 86194)
+++ trunk/gert/standalone/bug327438/default.build       2007-09-22 08:43:59 UTC 
(rev 86195)
@@ -0,0 +1,53 @@
+<project name="bug327438" default="rebuild">
+       <target name="mono-2.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0,MONO" />
+       </target>
+
+       <target name="net-2.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0" />
+       </target>
+
+       <property name="frameworks" value="mono-2.0,net-2.0" />
+
+       <target name="clean">
+               <delete>
+                       <fileset>
+                               <include name="out" />
+                               <include name="test.exe" />
+                       </fileset>
+               </delete>
+       </target>
+
+       <target name="build">
+               <property name="original.targetframework" 
value="${nant.settings.currentframework}" />
+
+               <foreach property="framework" item="String" in="${frameworks}" 
delim=",">
+                       <if test="${framework::exists(framework)}">
+                               <property name="nant.settings.currentframework" 
value="${framework}" />
+                               <call 
target="${nant.settings.currentframework}" />
+                               <call target="run" />
+                               <call target="clean" />
+                       </if>
+               </foreach>
+
+               <property name="nant.settings.currentframework" 
value="${original.targetframework}" />
+       </target>
+
+       <target name="compile">
+               <ilasm target="exe" output="test.exe">
+                       <sources>
+                               <include name="test.il" />
+                       </sources>
+               </ilasm>
+       </target>
+
+       <target name="run" depends="compile">
+               <exec program="test.exe" managed="true" output="out" 
resultproperty="test.result" failonerror="false" />
+               <fail if="${int::parse(test.result) == 0}">#1</fail>
+               <fail unless="${file::exists('out')}">#2</fail>
+               <loadfile file="out" property="out" />
+               <fail unless="${string::index-of(out,'Unhandled Exception: 
System.TypeLoadException: Could not load type ''System.Nullable'' from assembly 
''test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'' due to value 
type mismatch.') != -1}">#3</fail>
+       </target>
+
+       <target name="rebuild" depends="clean, build" />
+</project>


Property changes on: trunk/gert/standalone/bug327438/default.build
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug327438/test.il
===================================================================
--- trunk/gert/standalone/bug327438/test.il     2007-09-22 02:16:26 UTC (rev 
86194)
+++ trunk/gert/standalone/bug327438/test.il     2007-09-22 08:43:59 UTC (rev 
86195)
@@ -0,0 +1,42 @@
+.assembly extern mscorlib
+{
+ .ver 2:0:0:0
+ .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
+}
+.assembly 'test'
+{
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+.module constraint_checks.exe
+
+.class public auto ansi beforefieldinit Subject<T> extends 
[mscorlib]System.Object
+{
+       .method public hidebysig specialname rtspecialname instance default 
void .ctor () cil managed
+       {
+               .maxstack 8
+               ldarg.0
+               call instance void object::.ctor()
+               ret
+       }
+}
+
+.class public auto ansi beforefieldinit Driver extends [mscorlib]System.Object
+{
+       .method public hidebysig specialname rtspecialname instance default 
void .ctor () cil managed 
+       {
+               .maxstack 8
+               ldarg.0
+               call instance void object::.ctor()
+               ret
+       }
+
+       .method public static hidebysig  default int32 Main () cil managed 
+       {
+               .entrypoint
+               ldtoken class Subject<valuetype 
[mscorlib]System.Nullable<int32>>
+               pop
+               ldc.i4.0
+               ret
+       }
+}


Property changes on: trunk/gert/standalone/bug327438/test.il
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/gert/standalone/known-issues
===================================================================
--- trunk/gert/standalone/known-issues  2007-09-22 02:16:26 UTC (rev 86194)
+++ trunk/gert/standalone/known-issues  2007-09-22 08:43:59 UTC (rev 86195)
@@ -81,3 +81,4 @@
 bug320964/**
 bug324536/**
 bug325809/**
+bug327438/**

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

Reply via email to