added t/insta-2.hcl

This commit is contained in:
2022-03-22 14:45:56 +00:00
parent fa1c4ac896
commit 88808b1fae
4 changed files with 47 additions and 0 deletions

View File

@ -2,6 +2,7 @@ AUTOMAKE_OPTIONS = nostdinc
check_SCRIPTS = \
insta-01.hcl \
insta-02.hcl \
ret-01.hcl \
retvar-01.hcl

View File

@ -463,6 +463,7 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = nostdinc
check_SCRIPTS = \
insta-01.hcl \
insta-02.hcl \
ret-01.hcl \
retvar-01.hcl

13
t/insta-02.hcl Normal file
View File

@ -0,0 +1,13 @@
(set t
(defclass X
| x |
(defun ::* make() (set x 1234) self)
(defun get-x() x)
)
)
(if (nqv? t X) (printf "ERROR: t must point to X\n"))
(printf "OK: t points to X\n")
(set t (:(:t make) get-x))
(if (nqv? t 1234) (printf "ERROR: t must be 1234\n"))
(printf "OK: t is %d\n" t)