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:
parent
632e7c3200
commit
bd36e90132
1 changed files with 14 additions and 0 deletions
|
@ -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)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue