summaryrefslogtreecommitdiffstats
path: root/tests/012/struct.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-10-04 10:22:08 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-10-04 10:22:08 -0700
commit75ddca922ba8dcaf696f23f613b1a9f594a1884f (patch)
tree2792a86030426b5e170edfc4acd294e218d8a987 /tests/012/struct.tl
parent0b587e521b5bee74c530adcf4636993ed91036c4 (diff)
downloadtxr-75ddca922ba8dcaf696f23f613b1a9f594a1884f.tar.gz
txr-75ddca922ba8dcaf696f23f613b1a9f594a1884f.tar.bz2
txr-75ddca922ba8dcaf696f23f613b1a9f594a1884f.zip
Optional arguments in boa construction.
* share/txr/stdlib/struct.tl (defstruct): Split boa arguments on colon and generate the lambda accordingly. The generated function detects which optional arguments are actually present and only performs the slot updates for those. * tests/012/struct.tl: Corrected boa test case. * txr.1: Documented.
Diffstat (limited to 'tests/012/struct.tl')
-rw-r--r--tests/012/struct.tl4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/012/struct.tl b/tests/012/struct.tl
index 209bae71..d9ecc325 100644
--- a/tests/012/struct.tl
+++ b/tests/012/struct.tl
@@ -94,8 +94,8 @@
(test (new (boa 1 2))
#S(boa x 1 y 2))
(test (new (boa 1 2) x 10 y (+ 10 10))
- #S(boa x 10 y 20))
-(test (new boa x 10 y 20)
+ #S(boa x 1 y 2))
+(test (new boa x 10 y (+ 10 10))
#S(boa x 10 y 20))
(defstruct baz nil