[uim-commit] r1526 - branches/r5rs/sigscheme/test
kzk at freedesktop.org
kzk at freedesktop.org
Tue Sep 20 05:48:26 PDT 2005
Author: kzk
Date: 2005-09-20 05:48:23 -0700 (Tue, 20 Sep 2005)
New Revision: 1526
Modified:
branches/r5rs/sigscheme/test/test-srfi8.scm
Log:
* sigscheme/test/test-srfi8.scm
- add test cases for "receive"
Modified: branches/r5rs/sigscheme/test/test-srfi8.scm
===================================================================
--- branches/r5rs/sigscheme/test/test-srfi8.scm 2005-09-19 16:12:47 UTC (rev 1525)
+++ branches/r5rs/sigscheme/test/test-srfi8.scm 2005-09-20 12:48:23 UTC (rev 1526)
@@ -1,18 +1,31 @@
-(load "test/unittest.scm")
+(load "./test/unittest.scm")
-(assert "receive test1"
- (receive (a b c)
- (values #f #f #t)
- (and (not a) (not b) c)))
-(assert-equal? "receive test2"
+(receive (a b c)
+ (values #f #t '())
+ (assert-equal? "receive test 1" #f a)
+ (assert-equal? "receive test 2" #t b)
+ (assert-equal? "receive test 3" '() c))
+
+(assert-equal? "receive test4"
5
(receive (a b) (values 4 5)
b))
-(assert-true "receive test3"
- (receive args (values)
- (null? args)))
-(assert-true "receive test4"
- (receive () (values)
- #t))
+(assert-true "receive test5"
+ (receive args (values)
+ (null? args)))
+
+(assert-true "receive test6"
+ (receive () (values)
+ #t))
+
+(define var 'global)
+(receive (a b c var)
+ (values 'a 6 var 'local)
+ (assert-equal? "receive test 7" 'a a)
+ (assert-equal? "receive test 8" 6 b)
+ (assert-equal? "receive test 9" 'global c)
+ (assert-equal? "receive test 10" 'local var))
+
+
(total-report)
More information about the uim-commit
mailing list