diff options
Diffstat (limited to 'mu.arc.t')
-rw-r--r-- | mu.arc.t | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mu.arc.t b/mu.arc.t index bb08c583..070d68bb 100644 --- a/mu.arc.t +++ b/mu.arc.t @@ -754,6 +754,21 @@ (if (~iso '(5 integer) (deref:deref '(3 integer-address-address deref deref))) (prn "F - 'deref' can be chained")) +; unit tests for 'absolutize' helper +(reset) +(if (~iso '(4 integer) (absolutize '(4 integer))) + (prn "F - 'absolutize' works without routine")) +(= routine* make-routine!foo) +(if (~iso '(4 integer) (absolutize '(4 integer))) + (prn "F - 'absolutize' works without default-scope")) +(= rep.routine*!call-stack.0!default-scope 10) +(= memory*.10 5) ; bounds check for default-scope +(if (~iso '(14 integer global) (absolutize '(4 integer))) + (prn "F - 'absolutize' works with default-scope")) +(absolutize '(5 integer)) +(if (~posmatch "no room" rep.routine*!error) + (prn "F - 'absolutize' checks against default-scope bounds")) + ; unit tests for 'sizeof' helper (reset) (if (~is 1 sizeof!integer) |