[pure-lang-svn] SF.net SVN: pure-lang:[586] pure/trunk/test
Status: Beta
Brought to you by:
agraef
|
From: <ag...@us...> - 2008-08-23 22:06:11
|
Revision: 586
http://pure-lang.svn.sourceforge.net/pure-lang/?rev=586&view=rev
Author: agraef
Date: 2008-08-23 22:06:21 +0000 (Sat, 23 Aug 2008)
Log Message:
-----------
Cosmetic changes.
Modified Paths:
--------------
pure/trunk/test/test020.log
pure/trunk/test/test020.pure
Modified: pure/trunk/test/test020.log
===================================================================
--- pure/trunk/test/test020.log 2008-08-23 21:46:12 UTC (rev 585)
+++ pure/trunk/test/test020.log 2008-08-23 22:06:21 UTC (rev 586)
@@ -37,11 +37,12 @@
state 1: #0
}) x;
let double_format = "%#0.3g";
-test f/*0:01*/ (x/*0:101*/,y/*0:11*/) = puts$format (f/*0:01*/,x/*0:101*/,y/*0:11*/,check f/*0:01*/ (x/*0:101*/,y/*0:11*/) (catch __error__ (f/*1:01*/ x/*1:101*/ y/*1:11*/)));
-test f/*0:01*/ x/*0:1*/ = puts$format (f/*0:01*/,x/*0:1*/,check f/*0:01*/ x/*0:1*/ (catch __error__ (f/*1:01*/ x/*1:1*/)));
-check f/*0:001*/ _/*0:01*/ (g@_/*0:100*/ _/*0:101*/ _/*0:11*/) = __failed__ if f/*0:001*/===g/*0:100*/;
-check f/*0:001*/ _/*0:01*/ (g@_/*0:10*/ _/*0:11*/) = __failed__ if f/*0:001*/===g/*0:10*/;
-check _/*0:001*/ _/*0:01*/ z/*0:1*/ = z/*0:1*/;
+test (f/*0:101*/,x/*0:1101*/,y/*0:111*/) = puts$format (f/*0:101*/,x/*0:1101*/,y/*0:111*/,check (f/*0:101*/,x/*0:1101*/,y/*0:111*/) (catch __error__ (f/*1:101*/ x/*1:1101*/ y/*1:111*/)));
+test (f/*0:101*/,x/*0:11*/) = puts$format (f/*0:101*/,x/*0:11*/,check (f/*0:101*/,x/*0:11*/) (catch __error__ (f/*1:101*/ x/*1:11*/)));
+check _/*0:01*/ z/*0:1*/ = z/*0:1*/ if numberp z/*0:1*/;
+check (f/*0:0101*/,_/*0:011*/) (g@_/*0:100*/ _/*0:101*/ _/*0:11*/) = __failed__ if f/*0:0101*/===g/*0:100*/;
+check (f/*0:0101*/,_/*0:011*/) (g@_/*0:10*/ _/*0:11*/) = __failed__ if f/*0:0101*/===g/*0:10*/;
+check _/*0:01*/ z/*0:1*/ = z/*0:1*/;
format (f/*0:101*/,x/*0:1101*/,y/*0:11101*/,z/*0:1111*/) = str f/*0:101*/+","+show x/*0:1101*/+","+show y/*0:11101*/+","+show z/*0:1111*/;
format (f/*0:101*/,x/*0:1101*/,z/*0:111*/) = str f/*0:101*/+","+show x/*0:1101*/+","+show z/*0:111*/;
show x/*0:1*/::double = sprintf double_format x/*0:1*/;
@@ -49,30 +50,55 @@
show (x/*0:101*/<:y/*0:11*/) = show x/*0:101*/+"<:"+show y/*0:11*/;
show x/*0:1*/ = str x/*0:1*/;
{
- rule #0: check f _ (g@_ _ _) = __failed__ if f===g
- rule #1: check f _ (g@_ _) = __failed__ if f===g
- rule #2: check _ _ z = z
- state 0: #0 #1 #2
+ rule #0: check _ z = z if numberp z
+ rule #1: check (f,_) (g@_ _ _) = __failed__ if f===g
+ rule #2: check (f,_) (g@_ _) = __failed__ if f===g
+ rule #3: check _ z = z
+ state 0: #0 #1 #2 #3
<var> state 1
- state 1: #0 #1 #2
+ <app> state 3
+ state 1: #0 #3
<var> state 2
- state 2: #0 #1 #2
- <var> state 3
- <app> state 4
- state 3: #2
- state 4: #0 #1 #2
+ state 2: #0 #3
+ state 3: #0 #1 #2 #3
+ <var> state 4
+ <app> state 7
+ state 4: #0 #3
<var> state 5
- <app> state 7
- state 5: #1 #2
+ state 5: #0 #3
<var> state 6
- state 6: #1 #2
- state 7: #0 #1 #2
+ state 6: #0 #3
+ state 7: #0 #1 #2 #3
<var> state 8
- state 8: #0 #1 #2
+ , state 12
+ state 8: #0 #3
<var> state 9
- state 9: #0 #1 #2
+ state 9: #0 #3
<var> state 10
- state 10: #0 #1 #2
+ state 10: #0 #3
+ <var> state 11
+ state 11: #0 #3
+ state 12: #0 #1 #2 #3
+ <var> state 13
+ state 13: #0 #1 #2 #3
+ <var> state 14
+ state 14: #0 #1 #2 #3
+ <var> state 15
+ <app> state 16
+ state 15: #0 #3
+ state 16: #0 #1 #2 #3
+ <var> state 17
+ <app> state 19
+ state 17: #0 #2 #3
+ <var> state 18
+ state 18: #0 #2 #3
+ state 19: #0 #1 #2 #3
+ <var> state 20
+ state 20: #0 #1 #2 #3
+ <var> state 21
+ state 21: #0 #1 #2 #3
+ <var> state 22
+ state 22: #0 #1 #2 #3
}
{
rule #0: format (f,x,y,z) = str f+","+show x+","+show y+","+show z
@@ -118,33 +144,39 @@
state 19: #0 #1
}
{
- rule #0: test f (x,y) = puts$format (f,x,y,check f (x,y) (catch __error__ (f x y)))
- rule #1: test f x = puts$format (f,x,check f x (catch __error__ (f x)))
+ rule #0: test (f,x,y) = puts$format (f,x,y,check (f,x,y) (catch __error__ (f x y)))
+ rule #1: test (f,x) = puts$format (f,x,check (f,x) (catch __error__ (f x)))
state 0: #0 #1
- <var> state 1
+ <app> state 1
state 1: #0 #1
- <var> state 2
- <app> state 3
- state 2: #1
+ <app> state 2
+ state 2: #0 #1
+ , state 3
state 3: #0 #1
<var> state 4
+ state 4: #0 #1
+ <var> state 5
<app> state 6
- state 4: #1
- <var> state 5
state 5: #1
state 6: #0 #1
<var> state 7
- , state 10
+ <app> state 9
state 7: #1
<var> state 8
state 8: #1
- <var> state 9
- state 9: #1
- state 10: #0 #1
+ state 9: #0 #1
+ <var> state 10
+ , state 13
+ state 10: #1
<var> state 11
- state 11: #0 #1
+ state 11: #1
<var> state 12
- state 12: #0 #1
+ state 12: #1
+ state 13: #0 #1
+ <var> state 14
+ state 14: #0 #1
+ <var> state 15
+ state 15: #0 #1
}
{
rule #0: show x::double = sprintf double_format x
@@ -4716,23 +4748,23 @@
pow,nan,1L%2L<:3L%4L,__failed__
pow,nan,-inf,__failed__
pow,nan,nan,__failed__
-puts "*** UNARY ***"$$void (catmap (\f/*0:*/ -> catmap (\x/*0:*/ -> [test f/*1:*/ x/*0:*/] {
- rule #0: x = [test f x]
+puts "*** UNARY ***"$$void (catmap (\f/*0:*/ -> catmap (\x/*0:*/ -> [test (f/*1:*/,x/*0:*/)] {
+ rule #0: x = [test (f,x)]
state 0: #0
<var> state 1
state 1: #0
}) x {
- rule #0: f = catmap (\x -> [test f x]) x
+ rule #0: f = catmap (\x -> [test (f,x)]) x
state 0: #0
<var> state 1
state 1: #0
-}) f)$$puts "*** BINARY ***"$$void (catmap (\f/*0:*/ -> catmap (\x/*0:*/ -> [test f/*1:*/ x/*0:*/] {
- rule #0: x = [test f x]
+}) f)$$puts "*** BINARY ***"$$void (catmap (\f/*0:*/ -> catmap (\x/*0:*/ -> [test (f/*1:*/,x/*0:*/)] {
+ rule #0: x = [test (f,x)]
state 0: #0
<var> state 1
state 1: #0
}) x2 {
- rule #0: f = catmap (\x -> [test f x]) x2
+ rule #0: f = catmap (\x -> [test (f,x)]) x2
state 0: #0
<var> state 1
state 1: #0
Modified: pure/trunk/test/test020.pure
===================================================================
--- pure/trunk/test/test020.pure 2008-08-23 21:46:12 UTC (rev 585)
+++ pure/trunk/test/test020.pure 2008-08-23 22:06:21 UTC (rev 586)
@@ -29,11 +29,13 @@
let double_format = "%#0.3g"; // modify as needed, to get more accuracy
-test f (x,y) = puts $ format (f,x,y,check f (x,y) (catch __error__ (f x y)));
-test f x = puts $ format (f,x,check f x (catch __error__ (f x)));
+test (f,x,y) = puts $ format (f,x,y,check (f,x,y) (catch __error__ (f x y)));
+test (f,x) = puts $ format (f,x,check (f,x) (catch __error__ (f x)));
-check f _ (g@_ _ _) | check f _ (g@_ _) = __failed__ if f===g;
-check _ _ z = z otherwise;
+check _ z = z if numberp z;
+check (f,_) (g@_ _ _) |
+check (f,_) (g@_ _) = __failed__ if f===g;
+check _ z = z otherwise;
format (f,x,y,z) = str f+","+show x+","+show y+","+show z;
format (f,x,z) = str f+","+show x+","+show z;
@@ -43,5 +45,5 @@
show (x<:y) = show x+"<:"+show y;
show x = str x otherwise;
-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];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|