Add tests for `unbound-variable-analysis'.
authorLudovic Courtès <ludo@gnu.org>
Sun, 8 Nov 2009 00:11:19 +0000 (01:11 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sun, 8 Nov 2009 00:11:19 +0000 (01:11 +0100)
* 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

index ea098a5..01ce39e 100644 (file)
                                         #: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)))