[pure-lang-svn] SF.net SVN: pure-lang:[711] pure/trunk/test
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-09-05 02:15:33
|
Revision: 711 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=711&view=rev Author: agraef Date: 2008-09-05 02:15:43 +0000 (Fri, 05 Sep 2008) Log Message: ----------- Bugfixes. Modified Paths: -------------- pure/trunk/test/test020.log pure/trunk/test/test020.pure pure/trunk/test/test021.log pure/trunk/test/test021.pure Modified: pure/trunk/test/test020.log =================================================================== --- pure/trunk/test/test020.log 2008-09-05 02:11:39 UTC (rev 710) +++ pure/trunk/test/test020.log 2008-09-05 02:15:43 UTC (rev 711) @@ -43,14 +43,14 @@ check (f/*0:0101*/,x/*0:01101*/,y/*0:0111*/) (g@_/*0:100*/ u/*0:101*/ v/*0:11*/) = __failed__ if f/*0:0101*/===g/*0:100*/&&x/*0:01101*/===u/*0:101*/&&y/*0:0111*/===v/*0:11*/; check (f/*0:0101*/,x/*0:011*/) (g@_/*0:10*/ u/*0:11*/) = __failed__ if f/*0:0101*/===g/*0:10*/&&x/*0:011*/===u/*0:11*/; 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 = str x/*0:1*/ if infp x/*0:1*/||nanp x/*0:1*/; -show x/*0:1*/::double = sprintf double_format 0.0 if x/*0:1*/==0.0; -show x/*0:1*/::double = sprintf double_format x/*0:1*/; -show (x/*0:101*/+:y/*0:11*/) = show x/*0:101*/+"+:"+show y/*0:11*/; -show (x/*0:101*/<:y/*0:11*/) = show x/*0:101*/+"<:"+show y/*0:11*/; -show x/*0:1*/ = str x/*0:1*/; +format (f/*0:101*/,x/*0:1101*/,y/*0:11101*/,z/*0:1111*/) = str f/*0:101*/+","+print x/*0:1101*/+","+print y/*0:11101*/+","+print z/*0:1111*/; +format (f/*0:101*/,x/*0:1101*/,z/*0:111*/) = str f/*0:101*/+","+print x/*0:1101*/+","+print z/*0:111*/; +print x/*0:1*/::double = str x/*0:1*/ if infp x/*0:1*/||nanp x/*0:1*/; +print x/*0:1*/::double = sprintf double_format 0.0 if x/*0:1*/==0.0; +print x/*0:1*/::double = sprintf double_format x/*0:1*/; +print (x/*0:101*/+:y/*0:11*/) = print x/*0:101*/+"+:"+print y/*0:11*/; +print (x/*0:101*/<:y/*0:11*/) = print x/*0:101*/+"<:"+print y/*0:11*/; +print x/*0:1*/ = str x/*0:1*/; tests = puts "*** UNARY ***"$$do (\f/*0:*/ -> catmap (\x/*0:*/ -> [test (f/*1:*/,x/*0:*/)] { rule #0: x = [test (f,x)] state 0: #0 @@ -168,8 +168,8 @@ state 44: #0 #1 #2 #3 } { - rule #0: format (f,x,y,z) = str f+","+show x+","+show y+","+show z - rule #1: format (f,x,z) = str f+","+show x+","+show z + rule #0: format (f,x,y,z) = str f+","+print x+","+print y+","+print z + rule #1: format (f,x,z) = str f+","+print x+","+print z state 0: #0 #1 <app> state 1 state 1: #0 #1 @@ -246,12 +246,12 @@ state 15: #0 #1 } { - rule #0: show x::double = str x if infp x||nanp x - rule #1: show x::double = sprintf double_format 0.0 if x==0.0 - rule #2: show x::double = sprintf double_format x - rule #3: show (x+:y) = show x+"+:"+show y - rule #4: show (x<:y) = show x+"<:"+show y - rule #5: show x = str x + rule #0: print x::double = str x if infp x||nanp x + rule #1: print x::double = sprintf double_format 0.0 if x==0.0 + rule #2: print x::double = sprintf double_format x + rule #3: print (x+:y) = print x+"+:"+print y + rule #4: print (x<:y) = print x+"<:"+print y + rule #5: print x = str x state 0: #0 #1 #2 #3 #4 #5 <var> state 1 <var>::double state 2 Modified: pure/trunk/test/test020.pure =================================================================== --- pure/trunk/test/test020.pure 2008-09-05 02:11:39 UTC (rev 710) +++ pure/trunk/test/test020.pure 2008-09-05 02:15:43 UTC (rev 711) @@ -43,19 +43,19 @@ check (f,x) (g@_ u) = __failed__ if f===g && x===u; 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; +format (f,x,y,z) = str f+","+print x+","+print y+","+print z; +format (f,x,z) = str f+","+print x+","+print z; -show x::double +print x::double = str x if infp x || nanp x; // Windoze compatibility // Kludge: Some systems have -0.0, some don't, on some it's broken. Simply // ignore the sign of floating point zeros for now. = sprintf double_format 0.0 if x==0.0; = sprintf double_format x otherwise; -show (x+:y) = show x+"+:"+show y; -show (x<:y) = show x+"<:"+show y; -show x = str x otherwise; +print (x+:y) = print x+"+:"+print y; +print (x<:y) = print x+"<:"+print y; +print x = str x otherwise; tests = puts "*** UNARY ***" $$ void [test (f,x); f=f; x=x] $$ Modified: pure/trunk/test/test021.log =================================================================== --- pure/trunk/test/test021.log 2008-09-05 02:11:39 UTC (rev 710) +++ pure/trunk/test/test021.log 2008-09-05 02:15:43 UTC (rev 711) @@ -5,14 +5,14 @@ check (f/*0:0101*/,x/*0:01101*/,y/*0:0111*/) (g@_/*0:100*/ u/*0:101*/ v/*0:11*/) = __failed__ if f/*0:0101*/===g/*0:100*/&&x/*0:01101*/===u/*0:101*/&&y/*0:0111*/===v/*0:11*/; check (f/*0:0101*/,x/*0:011*/) (g@_/*0:10*/ u/*0:11*/) = __failed__ if f/*0:0101*/===g/*0:10*/&&x/*0:011*/===u/*0:11*/; 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 = str x/*0:1*/ if infp x/*0:1*/||nanp x/*0:1*/; -show x/*0:1*/::double = sprintf double_format 0.0 if x/*0:1*/==0.0; -show x/*0:1*/::double = sprintf double_format x/*0:1*/; -show (x/*0:101*/+:y/*0:11*/) = show x/*0:101*/+"+:"+show y/*0:11*/; -show (x/*0:101*/<:y/*0:11*/) = show x/*0:101*/+"<:"+show y/*0:11*/; -show x/*0:1*/ = str x/*0:1*/; +format (f/*0:101*/,x/*0:1101*/,y/*0:11101*/,z/*0:1111*/) = str f/*0:101*/+","+print x/*0:1101*/+","+print y/*0:11101*/+","+print z/*0:1111*/; +format (f/*0:101*/,x/*0:1101*/,z/*0:111*/) = str f/*0:101*/+","+print x/*0:1101*/+","+print z/*0:111*/; +print x/*0:1*/::double = str x/*0:1*/ if infp x/*0:1*/||nanp x/*0:1*/; +print x/*0:1*/::double = sprintf double_format 0.0 if x/*0:1*/==0.0; +print x/*0:1*/::double = sprintf double_format x/*0:1*/; +print (x/*0:101*/+:y/*0:11*/) = print x/*0:101*/+"+:"+print y/*0:11*/; +print (x/*0:101*/<:y/*0:11*/) = print x/*0:101*/+"<:"+print y/*0:11*/; +print x/*0:1*/ = str x/*0:1*/; tests = puts "*** EXACT/INEXACT ***"$$do test (catmap (\op/*0:*/ -> catmap (\a/*0:*/ -> [(op/*1:*/,2,a/*0:*/)] { rule #0: a = [(op,2,a)] state 0: #0 @@ -150,8 +150,8 @@ state 44: #0 #1 #2 #3 } { - rule #0: format (f,x,y,z) = str f+","+show x+","+show y+","+show z - rule #1: format (f,x,z) = str f+","+show x+","+show z + rule #0: format (f,x,y,z) = str f+","+print x+","+print y+","+print z + rule #1: format (f,x,z) = str f+","+print x+","+print z state 0: #0 #1 <app> state 1 state 1: #0 #1 @@ -228,12 +228,12 @@ state 15: #0 #1 } { - rule #0: show x::double = str x if infp x||nanp x - rule #1: show x::double = sprintf double_format 0.0 if x==0.0 - rule #2: show x::double = sprintf double_format x - rule #3: show (x+:y) = show x+"+:"+show y - rule #4: show (x<:y) = show x+"<:"+show y - rule #5: show x = str x + rule #0: print x::double = str x if infp x||nanp x + rule #1: print x::double = sprintf double_format 0.0 if x==0.0 + rule #2: print x::double = sprintf double_format x + rule #3: print (x+:y) = print x+"+:"+print y + rule #4: print (x<:y) = print x+"<:"+print y + rule #5: print x = str x state 0: #0 #1 #2 #3 #4 #5 <var> state 1 <var>::double state 2 Modified: pure/trunk/test/test021.pure =================================================================== --- pure/trunk/test/test021.pure 2008-09-05 02:11:39 UTC (rev 710) +++ pure/trunk/test/test021.pure 2008-09-05 02:15:43 UTC (rev 711) @@ -18,19 +18,19 @@ check (f,x) (g@_ u) = __failed__ if f===g && x===u; 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; +format (f,x,y,z) = str f+","+print x+","+print y+","+print z; +format (f,x,z) = str f+","+print x+","+print z; -show x::double +print x::double = str x if infp x || nanp x; // Windoze compatibility // Kludge: Some systems have -0.0, some don't, on some it's broken. Simply // ignore the sign of floating point zeros for now. = sprintf double_format 0.0 if x==0.0; = sprintf double_format x otherwise; -show (x+:y) = show x+"+:"+show y; -show (x<:y) = show x+"<:"+show y; -show x = str x otherwise; +print (x+:y) = print x+"+:"+print y; +print (x<:y) = print x+"<:"+print y; +print x = str x otherwise; tests = puts "*** EXACT/INEXACT ***" $$ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |