about summary refs log tree commit diff stats
path: root/mu.arc.t
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2014-11-28 16:12:07 -0800
committerKartik K. Agaram <vc@akkartik.com>2014-11-28 16:12:07 -0800
commitb41babf83f81a10ef82516b9e98c49832a482624 (patch)
treebc13d655c4199622d426447cdfc986f8e195c4a7 /mu.arc.t
parent124996992988ecd2c41ce0cbc35470a0b89ed954 (diff)
downloadmu-b41babf83f81a10ef82516b9e98c49832a482624.tar.gz
355
Diffstat (limited to 'mu.arc.t')
-rw-r--r--mu.arc.t11
1 files changed, 11 insertions, 0 deletions
diff --git a/mu.arc.t b/mu.arc.t
index 564dd1f8..b5133572 100644
--- a/mu.arc.t
+++ b/mu.arc.t
@@ -733,6 +733,17 @@
 (if (~is 23 (addr '(4 integer-address deref)))
   (prn "F - 'addr' adds default-scope before 'deref', not after"))
 
+; unit tests for 'sizeof' helper
+(reset)
+(if (~is 1 sizeof!integer)
+  (prn "F - 'sizeof' works on primitives"))
+(if (~is 1 sizeof!integer-address)
+  (prn "F - 'sizeof' works on addresses"))
+(if (~is 2 sizeof!integer-boolean-pair)
+  (prn "F - 'sizeof' works on records"))
+(if (~is 3 sizeof!integer-point-pair)
+  (prn "F - 'sizeof' works on records with record fields"))
+
 (reset)
 (new-trace "copy-record")
 (add-code