projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
201ab33
)
Confirm delv does not blow out the stack.
author
Taylor R Campbell
<campbell@mumble.net>
Mon, 11 Feb 2019 00:44:21 +0000
(
00:44
+0000)
committer
Taylor R Campbell
<campbell@mumble.net>
Mon, 11 Feb 2019 00:46:38 +0000
(
00:46
+0000)
tests/runtime/test-list.scm
patch
|
blob
|
history
diff --git
a/tests/runtime/test-list.scm
b/tests/runtime/test-list.scm
index d3e86700a530a170e64abfdf714962beeb04c5d5..438e723eb87129918b7a2035ef7ba721bca7f714 100644
(file)
--- a/
tests/runtime/test-list.scm
+++ b/
tests/runtime/test-list.scm
@@
-148,4
+148,14
@@
USA.
(list (length a) (length b))))
(lambda () 'overflow)
(lambda () 'timeout))
- (list (quotient n 2) (quotient n 2))))))))
\ No newline at end of file
+ (list (quotient n 2) (quotient n 2))))))))
+
+(define-test 'delv-long
+ (lambda ()
+ (let* ((n (words-in-stack))
+ (l (list-tabulate (* 2 n) (lambda (i) (remainder i 2)))))
+ (assert-equal
+ (carefully (lambda () (length (delv 0 l)))
+ (lambda () 'overflow)
+ (lambda () 'timeout))
+ n))))
\ No newline at end of file