[uim-commit] r2177 - branches/r5rs/sigscheme/test
yamaken at freedesktop.org
yamaken at freedesktop.org
Sat Nov 19 23:32:49 PST 2005
Author: yamaken
Date: 2005-11-19 23:32:28 -0800 (Sat, 19 Nov 2005)
New Revision: 2177
Modified:
branches/r5rs/sigscheme/test/test-continuation.scm
Log:
* sigscheme/test/test-continuation.scm
- Add 3 tests for multiple values as the value for continuation. 2
test failed
Modified: branches/r5rs/sigscheme/test/test-continuation.scm
===================================================================
--- branches/r5rs/sigscheme/test/test-continuation.scm 2005-11-20 06:24:57 UTC (rev 2176)
+++ branches/r5rs/sigscheme/test/test-continuation.scm 2005-11-20 07:32:28 UTC (rev 2177)
@@ -85,4 +85,28 @@
(res 'succeeded)
res))))
+;; "6.4 Control features" of R5RS:
+;; The escape procedure accepts the same number of arguments as the
+;; continuation to the original call to call-with-current-continuation.
+;; Except for continuations created by the `call-with-values' procedure, all
+;; continuations take exactly one value.
+(assert-error "call/cc #9"
+ (lambda ()
+ (call-with-current-continuation
+ (lambda (k)
+ (k (values 1 2))))))
+
+(assert-error "call/cc #10"
+ (lambda ()
+ (call-with-current-continuation
+ (lambda (k)
+ (k (values))))))
+
+;; one value is OK
+(assert-equal? "call/cc #11"
+ 1
+ (call-with-current-continuation
+ (lambda (k)
+ (k (values 1)))))
+
(total-report)
More information about the uim-commit
mailing list