Author: gert
Date: 2007-06-21 15:36:09 -0400 (Thu, 21 Jun 2007)
New Revision: 80512

Added:
   trunk/gert/standalone/bug81917/
   trunk/gert/standalone/bug81917/default.build
   trunk/gert/standalone/bug81917/test.cs
Modified:
   trunk/gert/standalone/known-issues
Log:
Added test for bug #81917.


Added: trunk/gert/standalone/bug81917/default.build
===================================================================
--- trunk/gert/standalone/bug81917/default.build        2007-06-21 19:14:40 UTC 
(rev 80511)
+++ trunk/gert/standalone/bug81917/default.build        2007-06-21 19:36:09 UTC 
(rev 80512)
@@ -0,0 +1,56 @@
+<project name="bug81917" default="rebuild">
+       <target name="mono-1.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,ONLY_1_1,MONO" />
+       </target>
+
+       <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-1.0,mono-2.0,net-1.1,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="compile" />
+                               <call target="clean" />
+                       </if>
+               </foreach>
+
+               <property name="nant.settings.currentframework" 
value="${original.targetframework}" />
+       </target>
+
+       <target name="compile">
+               <record name="out" action="Start" />
+               <csc target="exe" define="${csc.defines}" output="test.exe" 
unsafe="true" warnaserror="true" warninglevel="4" failonerror="false">
+                       <sources>
+                               <include name="test.cs" />
+                       </sources>
+               </csc>
+               <record name="out" action="Close" />
+               <fail if="${file::exists('test.exe')}">#1</fail>
+               <fail unless="${file::exists('out')}">#2</fail>
+               <loadfile file="out" property="out" />
+               <fail if="${string::index-of(out,'CS0214') == -1}">#3</fail>
+               <fail unless="${string::index-of(out,'NullReferenceException') 
== -1}">#4</fail>
+       </target>
+
+       <target name="rebuild" depends="clean, build" />
+</project>


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

Added: trunk/gert/standalone/bug81917/test.cs
===================================================================
--- trunk/gert/standalone/bug81917/test.cs      2007-06-21 19:14:40 UTC (rev 
80511)
+++ trunk/gert/standalone/bug81917/test.cs      2007-06-21 19:36:09 UTC (rev 
80512)
@@ -0,0 +1,13 @@
+public class Program
+{
+       public struct foo_t
+       {
+               public fixed char b [16];
+       }
+
+       unsafe static void Main ()
+       {
+               foo_t bar;
+               char* b_ptr = bar.b;
+       }
+}


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

Modified: trunk/gert/standalone/known-issues
===================================================================
--- trunk/gert/standalone/known-issues  2007-06-21 19:14:40 UTC (rev 80511)
+++ trunk/gert/standalone/known-issues  2007-06-21 19:36:09 UTC (rev 80512)
@@ -24,3 +24,4 @@
 bug81767/**
 bug81815/**
 bug81818/**
+bug81917/**

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

Reply via email to