summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorOmar Rizwan <omar@omar.website>2023-09-05 20:23:46 +0000
committerOmar Rizwan <omar@omar.website>2023-09-05 20:23:46 +0000
commit87507a3e17e7afc8ea01b9e0bb25f9a8dbe6b0f0 (patch)
treefb2d1140b5096ae7f5ceca3f1aada9de3b10cd24 /test
parentImplement Vulkan line (diff)
downloadfolk-87507a3e17e7afc8ea01b9e0bb25f9a8dbe6b0f0.tar.gz
folk-87507a3e17e7afc8ea01b9e0bb25f9a8dbe6b0f0.zip
Test struct array. Fix trie ?
Diffstat (limited to 'test')
-rw-r--r--test/cstructs.tcl5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/cstructs.tcl b/test/cstructs.tcl
index 623cd53f..9b2faad6 100644
--- a/test/cstructs.tcl
+++ b/test/cstructs.tcl
@@ -14,11 +14,16 @@ $cc proc omar {} Person {
};
return ret;
}
+$cc proc plural {int npersons Person[] persons} void {}
$cc compile
puts [omar]
assert {[dict get [omar] name last] eq "Rizwan"}
+plural 2 [list \
+ [dict create name [dict create first Omar last Rizwan] state NJ] \
+ [dict create name [dict create first Californian last Resident] state CA]]
+
set cc [c create]
$cc proc plusone {int a} int {
return a + 1;