diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2014-11-28 16:12:07 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2014-11-28 16:12:07 -0800 |
commit | b41babf83f81a10ef82516b9e98c49832a482624 (patch) | |
tree | bc13d655c4199622d426447cdfc986f8e195c4a7 | |
parent | 124996992988ecd2c41ce0cbc35470a0b89ed954 (diff) | |
download | mu-b41babf83f81a10ef82516b9e98c49832a482624.tar.gz |
355
-rw-r--r-- | mu.arc.t | 11 |
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 |