1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

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.
This commit is contained in:
Ludovic Courtès 2009-11-08 01:11:19 +01:00
parent 632e7c3200
commit bd36e90132

View file

@ -674,6 +674,20 @@
#:env m #:env m
#:opts %opts-w-unbound))))))) #: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" (pass-if "GOOPS definitions are visible"
(let ((m (make-module)) (let ((m (make-module))
(v (gensym))) (v (gensym)))