From: Ludovic Courtès Date: Sun, 8 Nov 2009 00:11:19 +0000 (+0100) Subject: Add tests for `unbound-variable-analysis'. X-Git-Url: https://git.hcoop.net/bpt/guile.git/commitdiff_plain/bd36e901321eee0310d9ad14ff698ec85c006d26 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. --- 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)))