[uim-commit] r1512 - in branches/r5rs/sigscheme: . test
yamaken at freedesktop.org
yamaken at freedesktop.org
Sun Sep 18 01:59:22 PDT 2005
Author: yamaken
Date: 2005-09-18 01:59:20 -0700 (Sun, 18 Sep 2005)
New Revision: 1512
Modified:
branches/r5rs/sigscheme/TODO
branches/r5rs/sigscheme/test/test-exp.scm
branches/r5rs/sigscheme/test/test-srfi8.scm
Log:
* sigscheme/test/test-exp.scm
- Add some tests for 'values'. test7 is failed
* sigscheme/test/test-srfi8.scm
- Add some tests. All tests are passed
* sigscheme/TODO
- Add some items around 'values'
Modified: branches/r5rs/sigscheme/TODO
===================================================================
--- branches/r5rs/sigscheme/TODO 2005-09-18 08:31:12 UTC (rev 1511)
+++ branches/r5rs/sigscheme/TODO 2005-09-18 08:59:20 UTC (rev 1512)
@@ -16,6 +16,10 @@
API for such purpose is existing, use it
- [uim] Implement string-escape as same as trunk
+* Fix broken 'values' handlings
+ - sscm> (values) => SEGV
+ - (number? (values 5 6)) => error
+
* Make ScmOp_apply() properly tail recursive
- Add tests for proper tail recursion with 'apply', 'call-with-values' and
'receive' to test-tail-rec.scm
@@ -36,6 +40,8 @@
==============================================================================
Performance improvements:
+* Suppress cons cell consumption of 'values' by ValueCons
+
* Object representation compaction ([Anthy-dev 2353], [Anthy-dev 2360])
* Fix large fixed-size buffer on stack without limit checking in read.c
Modified: branches/r5rs/sigscheme/test/test-exp.scm
===================================================================
--- branches/r5rs/sigscheme/test/test-exp.scm 2005-09-18 08:31:12 UTC (rev 1511)
+++ branches/r5rs/sigscheme/test/test-exp.scm 2005-09-18 08:59:20 UTC (rev 1512)
@@ -201,13 +201,27 @@
(assert-equal? "do test5" '((5 6) (3 4) (1 2)) (nreverse '((1 2) (3 4) (5 6))))
;; from R5RS
-(assert-equal? "values test1" 5
+(assert-equal? "values test1"
+ 5
(call-with-values (lambda () (values 4 5))
(lambda (a b) b)))
+(assert-true "values test2"
+ (call-with-values (lambda () (values))
+ (lambda args (null? args))))
+(assert-true "values test3"
+ (call-with-values (lambda () (values))
+ (lambda () #t)))
+(assert-equal? "values test4" -1 (call-with-values * -))
-(assert-equal? "values test2" -1 (call-with-values * -))
-(assert "values test3" (number? (values 5)))
-(begin (values 1 2 3) 'ignore) ; not asserted, just make sure we don't blow up
+(assert-true "values test5" (number? (values 5)))
+(assert-false "values test6" (number? (values 'five)))
+(assert-true "values test7" (number? (values 5 6)))
+(assert-false "values test8" (number? (values)))
+(assert-false "values test9" (null? (values)))
+; not asserted, just make sure we don't blow up
+(values)
+(begin (values 1 2 3) 'ignore)
+
(total-report)
Modified: branches/r5rs/sigscheme/test/test-srfi8.scm
===================================================================
--- branches/r5rs/sigscheme/test/test-srfi8.scm 2005-09-18 08:31:12 UTC (rev 1511)
+++ branches/r5rs/sigscheme/test/test-srfi8.scm 2005-09-18 08:59:20 UTC (rev 1512)
@@ -4,5 +4,15 @@
(receive (a b c)
(values #f #f #t)
(and (not a) (not b) c)))
+(assert-equal? "receive test2"
+ 5
+ (receive (a b) (values 4 5)
+ b))
+(assert-true "receive test3"
+ (receive args (values)
+ (null? args)))
+(assert-true "receive test4"
+ (receive () (values)
+ #t))
(total-report)
More information about the uim-commit
mailing list