[Swift-commit] r2176 - trunk/tests/language-behaviour

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Tue Aug 5 09:14:06 CDT 2008


Author: benc
Date: 2008-08-05 09:14:06 -0500 (Tue, 05 Aug 2008)
New Revision: 2176

Added:
   trunk/tests/language-behaviour/readData.float.out.expected
Modified:
   trunk/tests/language-behaviour/readData.swift
Log:
test that readData can cope with floats



Added: trunk/tests/language-behaviour/readData.float.out.expected
===================================================================
--- trunk/tests/language-behaviour/readData.float.out.expected	                        (rev 0)
+++ trunk/tests/language-behaviour/readData.float.out.expected	2008-08-05 14:14:06 UTC (rev 2176)
@@ -0,0 +1 @@
+3.1400001

Modified: trunk/tests/language-behaviour/readData.swift
===================================================================
--- trunk/tests/language-behaviour/readData.swift	2008-08-05 11:27:08 UTC (rev 2175)
+++ trunk/tests/language-behaviour/readData.swift	2008-08-05 14:14:06 UTC (rev 2176)
@@ -13,6 +13,13 @@
 	}
 }
 
+(file f) createFloat() {
+	app{
+		echo "3.1400001" stdout=@filename(f);
+	}
+}
+
+
 (file f) write(string data) {
 	app{
 		echo data stdout=@filename(f);
@@ -20,6 +27,7 @@
 }
 
 int i;
+float fl;
 
 int ia[];
 
@@ -35,9 +43,14 @@
 //input file. assumed on disk
 file g <"readData.intArray.in">;
 
+// will be generated
+file h <"readData.float.in">;
+
 f = createInt();
+h = createFloat();
 
 i = readData(f);
+fl = readData(h);
 
 file o1 <"readData.int.out">;
 o1 = write(@strcat(i));
@@ -61,3 +74,7 @@
 
 file o5 <"readData.circleArray.out">;
 o5 = write(@strcat(ca[0].x, " ", ca[1].y, " ", ca[0].r, " ", ca[1].name));
+
+file o6 <"readData.float.out">;
+o6 = write(@strcat(fl));
+




More information about the Swift-commit mailing list