[pure-lang-svn] SF.net SVN: pure-lang:[806] pure/trunk/test
Status: Beta
Brought to you by:
agraef
|
From: <ag...@us...> - 2008-09-20 16:37:02
|
Revision: 806
http://pure-lang.svn.sourceforge.net/pure-lang/?rev=806&view=rev
Author: agraef
Date: 2008-09-20 16:36:47 +0000 (Sat, 20 Sep 2008)
Log Message:
-----------
Fix deprecated list comprehension syntax.
Modified Paths:
--------------
pure/trunk/test/test014.pure
pure/trunk/test/test015.pure
pure/trunk/test/test019.pure
pure/trunk/test/test020.pure
pure/trunk/test/test021.pure
Modified: pure/trunk/test/test014.pure
===================================================================
--- pure/trunk/test/test014.pure 2008-09-20 09:49:59 UTC (rev 805)
+++ pure/trunk/test/test014.pure 2008-09-20 16:36:47 UTC (rev 806)
@@ -3,7 +3,7 @@
// Random number generator.
-drop 97 [random; i=1..100] when () = srandom 0 end;
+drop 97 [random | i=1..100] when () = srandom 0 end;
// Some rational arithmetic tests, pilfered from Rob Hubbard's Q+Q manual.
Modified: pure/trunk/test/test015.pure
===================================================================
--- pure/trunk/test/test015.pure 2008-09-20 09:49:59 UTC (rev 805)
+++ pure/trunk/test/test015.pure 2008-09-20 16:36:47 UTC (rev 806)
@@ -123,18 +123,18 @@
********************************************/
// Create data structures
-let a = dict [(i => (double i)); i = 1..10];
-let b = dict [(i => (double i)); i = 11..20];
+let a = dict [i => (double i) | i = 1..10];
+let b = dict [i => (double i) | i = 11..20];
-let c = hdict $ zipwith (=>) [(i, double i, str i); i = 1..10] ( 1..10);
-let d = hdict $ zipwith (=>) [(i, double i, str i); i = 11..20] (11..20);
+let c = hdict $ zipwith (=>) [i, double i, str i | i = 1..10] ( 1..10);
+let d = hdict $ zipwith (=>) [i, double i, str i | i = 11..20] (11..20);
let e = dict $ zipwith (=>) (map str (1..10)) (map str (1..10));
a; b; c; d; e;
mkdict 1000 (1..10);
-mkhdict 1000 [(i, double i, str i); i = 1..10];
+mkhdict 1000 [i, double i, str i | i = 1..10];
// Type tests
@@ -167,7 +167,7 @@
// Slicing
a!!(5..15);
-c!![(i, double i, str i); i = 5..15];
+c!![i, double i, str i | i = 5..15];
// Convert data set to list
@@ -185,7 +185,7 @@
foldl delete a (1..10);
delete a 5000;
-foldl delete c [(i, double i, str i); i = 1..10];
+foldl delete c [i, double i, str i | i = 1..10];
delete c (5000, 5000.0, "5000");
// Relations
@@ -259,8 +259,8 @@
let a = array ( 1..10);
let b = array (11..20);
-let c = array2 [[str (i + j); i = j..10]; j = 1..10];
-let d = array2 [[str (i + j); i = j..10]; j = 11..20];
+let c = array2 [[str (i + j) | i = j..10] | j = 1..10];
+let d = array2 [[str (i + j) | i = j..10] | j = 11..20];
a; b; c; d;
@@ -293,7 +293,7 @@
// Slicing
a!!(5..15);
-c!![(i, j); i = 3..15; j = 3..15];
+c!![(i, j) | i = 3..15; j = 3..15];
// Convert data set to list
Modified: pure/trunk/test/test019.pure
===================================================================
--- pure/trunk/test/test019.pure 2008-09-20 09:49:59 UTC (rev 805)
+++ pure/trunk/test/test019.pure 2008-09-20 16:36:47 UTC (rev 806)
@@ -1,3 +1,3 @@
// const name capture regression, reported by Eddie Rucker
const i = -1;
-[(i,j); i=1..2; j=3..4];
+[(i,j) | i=1..2; j=3..4];
Modified: pure/trunk/test/test020.pure
===================================================================
--- pure/trunk/test/test020.pure 2008-09-20 09:49:59 UTC (rev 805)
+++ pure/trunk/test/test020.pure 2008-09-20 16:36:47 UTC (rev 806)
@@ -21,7 +21,7 @@
// binary operations
let f2 = [(+), (-), (*), (/), (^), atan2, pow];
-let x2 = [i,j; i=x; j=x];
+let x2 = [i,j | i=x; j=x];
// test instrumentation (AG)
@@ -58,7 +58,7 @@
print x = str x otherwise;
tests =
-puts "*** UNARY ***" $$ void [test (f,x); f=f; x=x] $$
-puts "*** BINARY ***" $$ void [test (f,x); f=f2; x=x2];
+puts "*** UNARY ***" $$ void [test (f,x) | f=f; x=x] $$
+puts "*** BINARY ***" $$ void [test (f,x) | f=f2; x=x2];
tests;
Modified: pure/trunk/test/test021.pure
===================================================================
--- pure/trunk/test/test021.pure 2008-09-20 09:49:59 UTC (rev 805)
+++ pure/trunk/test/test021.pure 2008-09-20 16:36:47 UTC (rev 806)
@@ -36,11 +36,11 @@
puts "*** EXACT/INEXACT ***" $$
// These should all return exact results, except +/- with polar operands, as
// well as / and ^ which always return inexact results.
-do test [op,2,a;op=[(+),(-),(*),(%),(/),(^)];a=[2+:3,2<:3,2%3]] $$
-do test [op,a,2;op=[(+),(-),(*),(%),(/),(^)];a=[2+:3,2<:3,2%3]] $$
+do test [op,2,a|op=[(+),(-),(*),(%),(/),(^)];a=[2+:3,2<:3,2%3]] $$
+do test [op,a,2|op=[(+),(-),(*),(%),(/),(^)];a=[2+:3,2<:3,2%3]] $$
puts "*** SYMBOLIC ***" $$
// If everything is all right here, these should all print __failed__.
-do test [op,x,a;op=[(+),(-),(*),(%),(/),(^)];a=[2+:3,2<:3,2%3]] $$
-do test [op,a,x;op=[(+),(-),(*),(%),(/),(^)];a=[2+:3,2<:3,2%3]];
+do test [op,x,a|op=[(+),(-),(*),(%),(/),(^)];a=[2+:3,2<:3,2%3]] $$
+do test [op,a,x|op=[(+),(-),(*),(%),(/),(^)];a=[2+:3,2<:3,2%3]];
tests;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|