diff options
-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 |