Author: gert
Date: 2007-12-08 04:18:36 -0500 (Sat, 08 Dec 2007)
New Revision: 90989

Modified:
   trunk/gert/standalone/bug80017/default.build
   trunk/gert/standalone/bug80017/test.cs
Log:
Use common build, and Assert.


Modified: trunk/gert/standalone/bug80017/default.build
===================================================================
--- trunk/gert/standalone/bug80017/default.build        2007-12-08 08:43:43 UTC 
(rev 90988)
+++ trunk/gert/standalone/bug80017/default.build        2007-12-08 09:18:36 UTC 
(rev 90989)
@@ -1,20 +1,6 @@
 <project name="bug80017" 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-1.1">
-               <property name="csc.defines" value="NET_1_0,NET_1_1,ONLY_1_1" />
-       </target>
-
-       <target name="net-2.0">
-               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0" />
-       </target>
-
+       <include buildfile="../../build/common.build" />
+       
        <property name="frameworks" value="mono-1.0,mono-2.0,net-1.1,net-2.0" />
 
        <target name="clean">
@@ -26,33 +12,17 @@
                </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">
+       <target name="compile" depends="init">
                <csc target="exe" define="${csc.defines}" output="test.exe" 
warnaserror="true" warninglevel="4">
                        <sources>
+                               <include name="../../build/common/Assert.cs" />
                                <include name="test.cs" />
                        </sources>
                </csc>
        </target>
 
-       <target name="run" depends="compile">
+       <target name="run-test" depends="compile">
                <exec program="test.exe" managed="true" output="out" />
                <fail if="${file::exists('out')}" />
        </target>
-
-       <target name="rebuild" depends="clean, build" />
 </project>

Modified: trunk/gert/standalone/bug80017/test.cs
===================================================================
--- trunk/gert/standalone/bug80017/test.cs      2007-12-08 08:43:43 UTC (rev 
90988)
+++ trunk/gert/standalone/bug80017/test.cs      2007-12-08 09:18:36 UTC (rev 
90989)
@@ -10,14 +10,13 @@
        static int Main ()
        {
                for (int i = 0; i < 10; i++) {
-                       if (!RunTest ())
-                               return 1;
+                       RunTest ();
                }
 
                return 0;
        }
 
-       static bool RunTest ()
+       static void RunTest ()
        {
                // Start the server thread
                ServerThread serverThread = new ServerThread ();
@@ -46,7 +45,8 @@
                        result.Append (enc.GetString (bytearr));
                }
 
-               return (result.ToString () == 
"012345670123456789abcdefabcdefghijklmnopqrstuvwxyz");
+               Assert.AreEqual 
("012345670123456789abcdefabcdefghijklmnopqrstuvwxyz",
+                       result.ToString (), "#1");
        }
 }
 

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

Reply via email to