From bd36e901321eee0310d9ad14ff698ec85c006d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 8 Nov 2009 01:11:19 +0100 Subject: [PATCH] Add tests for `unbound-variable-analysis'. * test-suite/tests/tree-il.test ("warnings")["unbound variable"]("optional arguments are visible", "keyword arguments are visible"): New tests. --- test-suite/tests/tree-il.test | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test-suite/tests/tree-il.test b/test-suite/tests/tree-il.test index ea098a5c6..01ce39e43 100644 --- a/test-suite/tests/tree-il.test +++ b/test-suite/tests/tree-il.test @@ -674,6 +674,20 @@ #:env m #:opts %opts-w-unbound))))))) + (pass-if "optional arguments are visible" + (null? (call-with-warnings + (lambda () + (compile '(lambda* (x #:optional y z) (list x y z)) + #:opts %opts-w-unbound + #:to 'assembly))))) + + (pass-if "keyword arguments are visible" + (null? (call-with-warnings + (lambda () + (compile '(lambda* (x #:key y z) (list x y z)) + #:opts %opts-w-unbound + #:to 'assembly))))) + (pass-if "GOOPS definitions are visible" (let ((m (make-module)) (v (gensym)))