From e0230913e9bb1e54576ef7b9347c786ede99f733 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 4 Oct 2013 15:09:31 +0200 Subject: [PATCH] add contification test * test-suite/tests/rtl-compilation.test ("contification"): Add contification test where non-recursive call is not in tail position relative to the letrec. --- test-suite/tests/rtl-compilation.test | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test-suite/tests/rtl-compilation.test b/test-suite/tests/rtl-compilation.test index cf00a4f78..ef4ab8d0b 100644 --- a/test-suite/tests/rtl-compilation.test +++ b/test-suite/tests/rtl-compilation.test @@ -158,7 +158,16 @@ (define (odd? x) (if (null? x) #f (even? (cdr x)))) (even? x))) - '(1 2 3))))) + '(1 2 3)))) + + (pass-if-equal '(#t) + ((run-rtl '(lambda (x) + (define (even? x) + (if (null? x) #t (odd? (cdr x)))) + (define (odd? x) + (if (null? x) #f (even? (cdr x)))) + (list (even? x)))) + '(1 2 3 4)))) (with-test-prefix "case-lambda" (pass-if-equal "simple"