summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2021-05-05 21:40:37 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2021-05-05 21:40:37 +0200
commitb22d858c37ec605ad571a92461f36460f62af93f (patch)
treecef6358f3d84dca01cee0508d10d5aab4d9aee31 /data/unit-testing/allocate_and_free.fate
parenta7003a8b3e00ff36470f1aeb931919f57cac2039 (diff)
Dict -> Struct.
Diffstat (limited to 'data/unit-testing/allocate_and_free.fate')
-rw-r--r--data/unit-testing/allocate_and_free.fate11
1 files changed, 11 insertions, 0 deletions
diff --git a/data/unit-testing/allocate_and_free.fate b/data/unit-testing/allocate_and_free.fate
index cf05414..8998236 100644
--- a/data/unit-testing/allocate_and_free.fate
+++ b/data/unit-testing/allocate_and_free.fate
@@ -1,8 +1,10 @@
(fate_version 1)
(local (ptr int) p0)
+(local (list (ptr int)) lp0)
(allocate! p0)
+
(set! (at p0) 72)
(assert! (= (at p0) 72)
@@ -11,6 +13,15 @@
(free! (at p0))
+(add! (default (ptr int)) lp0)
+(add! (default (ptr int)) lp0)
+(add! (default (ptr int)) lp0)
+(add! (default (ptr int)) lp0)
+
+(allocate! lp0.0)
+(allocate! (at (access_pointer 1 lp0)))
+(allocate! (access_pointer 1 lp0)))
+
[COMPLETED]
(end!)