From: Taylor R Campbell Date: Mon, 11 Feb 2019 00:44:21 +0000 (+0000) Subject: Confirm delv does not blow out the stack. X-Git-Tag: mit-scheme-pucked-10.1.10~6^2~4 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=74022ecc03dcdd1631867ac1c5e84c7943a8c8fc;p=mit-scheme.git Confirm delv does not blow out the stack. --- diff --git a/tests/runtime/test-list.scm b/tests/runtime/test-list.scm index d3e86700a..438e723eb 100644 --- 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