[uim-commit] r1338 - in branches/r5rs/sigscheme: bench test

kzk at freedesktop.org kzk at freedesktop.org
Fri Aug 26 11:05:24 PDT 2005


Author: kzk
Date: 2005-08-26 11:05:21 -0700 (Fri, 26 Aug 2005)
New Revision: 1338

Modified:
   branches/r5rs/sigscheme/bench/bench-arithint.scm
   branches/r5rs/sigscheme/bench/bench-case.scm
   branches/r5rs/sigscheme/bench/bench-fib.scm
   branches/r5rs/sigscheme/bench/bench-let-loop.scm
   branches/r5rs/sigscheme/bench/bench-loop.scm
   branches/r5rs/sigscheme/bench/bench-mem.scm
   branches/r5rs/sigscheme/test/unittest.scm
Log:
* sigscheme/test/unittest.scm
* sigscheme/bench/bench-arithint.scm
* sigscheme/bench/bench-loop.scm
* sigscheme/bench/bench-case.scm
* sigscheme/bench/bench-let-loop.scm
* sigscheme/bench/bench-mem.scm
* sigscheme/bench/bench-fib.scm
  - not to use "print". Instead of "print", use "display" + "newline".


Modified: branches/r5rs/sigscheme/bench/bench-arithint.scm
===================================================================
--- branches/r5rs/sigscheme/bench/bench-arithint.scm	2005-08-26 17:54:03 UTC (rev 1337)
+++ branches/r5rs/sigscheme/bench/bench-arithint.scm	2005-08-26 18:05:21 UTC (rev 1338)
@@ -6,4 +6,5 @@
       (test (- x (+ (* y 2) (/ x (abs y))))
 	    (- y (+ (* x 2) (/ y (abs x)))))))
 
-(print (test 1 1))
+(write (test 1 1))
+(newline)

Modified: branches/r5rs/sigscheme/bench/bench-case.scm
===================================================================
--- branches/r5rs/sigscheme/bench/bench-case.scm	2005-08-26 17:54:03 UTC (rev 1337)
+++ branches/r5rs/sigscheme/bench/bench-case.scm	2005-08-26 18:05:21 UTC (rev 1338)
@@ -7,4 +7,5 @@
 	   (loop (+ 1 i) l)
 	   l)))))
 
-(print (loop 0 20000))
+(write (loop 0 20000))
+(newline)

Modified: branches/r5rs/sigscheme/bench/bench-fib.scm
===================================================================
--- branches/r5rs/sigscheme/bench/bench-fib.scm	2005-08-26 17:54:03 UTC (rev 1337)
+++ branches/r5rs/sigscheme/bench/bench-fib.scm	2005-08-26 18:05:21 UTC (rev 1338)
@@ -2,4 +2,5 @@
   (if (<= n 2) 1
       (+ (fib (- n 1)) (fib (- n 2)))))
 
-(print (fib 30))
+(write (fib 30))
+(newline)

Modified: branches/r5rs/sigscheme/bench/bench-let-loop.scm
===================================================================
--- branches/r5rs/sigscheme/bench/bench-let-loop.scm	2005-08-26 17:54:03 UTC (rev 1337)
+++ branches/r5rs/sigscheme/bench/bench-let-loop.scm	2005-08-26 18:05:21 UTC (rev 1338)
@@ -7,4 +7,5 @@
 	  (loop (+ 1 i) l)
 	  l))))
 
-(print (loop 0 20000))
+(write (loop 0 20000))
+(newline)

Modified: branches/r5rs/sigscheme/bench/bench-loop.scm
===================================================================
--- branches/r5rs/sigscheme/bench/bench-loop.scm	2005-08-26 17:54:03 UTC (rev 1337)
+++ branches/r5rs/sigscheme/bench/bench-loop.scm	2005-08-26 18:05:21 UTC (rev 1338)
@@ -4,4 +4,5 @@
 	(loop (+ 1 i) l)
 	l)))
 
-(print (loop 0 8000))
+(write (loop 0 8000))
+(newline)

Modified: branches/r5rs/sigscheme/bench/bench-mem.scm
===================================================================
--- branches/r5rs/sigscheme/bench/bench-mem.scm	2005-08-26 17:54:03 UTC (rev 1337)
+++ branches/r5rs/sigscheme/bench/bench-mem.scm	2005-08-26 18:05:21 UTC (rev 1338)
@@ -12,4 +12,5 @@
           (foo 0 (- j 1))
 	  '())))
 
-(print (foo 0 100))
+(write (foo 0 100))
+(newline)

Modified: branches/r5rs/sigscheme/test/unittest.scm
===================================================================
--- branches/r5rs/sigscheme/test/unittest.scm	2005-08-26 17:54:03 UTC (rev 1337)
+++ branches/r5rs/sigscheme/test/unittest.scm	2005-08-26 18:05:21 UTC (rev 1338)
@@ -5,19 +5,22 @@
 (define total-report
   (lambda ()
     (begin
-;      (print "total")
-;      (print total-test-num)
       (if (= total-err-num 0)
-	  (print "OK")
 	  (begin
-	    (print "[ ERROR NUM ]")
-	    (print total-err-num))))))
+	    (display "OK")
+	    (newline))
+	  (begin
+	    (display "[ ERROR NUM : ")
+	    (display total-err-num)
+	    (display " ]")
+	    (newline))))))
 
 (define report-error
   (lambda (errmsg)
     (begin
-      (print "error : ")
-      (print errmsg))))
+      (display "error : ")
+      (display errmsg)
+      (newline))))
 
 (define assert
   (lambda (msg exp)
@@ -39,16 +42,18 @@
   (lambda (msg a b)
     (if (not (assert msg (eq? a b)))
 	(begin
-	  (print "assert-eq? : we expect ")
-	  (print a)
-	  (print " but got ")
-	  (print b)))))
+	  (display "assert-eq? : we expect ")
+	  (write a)
+	  (display " but got ")
+	  (write b)
+	  (newline)))))
 
 (define assert-equal?
   (lambda (msg a b)
     (if (not (assert msg (equal? a b)))
 	(begin
-	  (print "assert-equal? : we expect ")
-	  (print a)
-	  (print " but got ")
-	  (print b)))))
+	  (display "assert-equal? : we expect ")
+	  (write a)
+	  (display " but got ")
+	  (write b)
+	  (newline)))))



More information about the uim-commit mailing list