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-26 22:26:55 -0800
committerKartik K. Agaram <vc@akkartik.com>2014-11-26 22:30:32 -0800
commit2e818ac82fdcf6474d1cf1a0634aba80af1279e4 (patch)
treea0837773ad96c4ec8fd38669c34a0890922a42e7 /mu.arc.t
parent88edf1ba2f617fef366f54ee2383338fdb34ea1a (diff)
downloadmu-2e818ac82fdcf6474d1cf1a0634aba80af1279e4.tar.gz
338 - starting to work on string primitives
Diffstat (limited to 'mu.arc.t')
-rw-r--r--mu.arc.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/mu.arc.t b/mu.arc.t
index 3ab70ad8..bad704c8 100644
--- a/mu.arc.t
+++ b/mu.arc.t
@@ -2869,4 +2869,16 @@
           '(((2 integer) <- copy (0 literal))))
   (prn "F - 'def!' clears all previous clauses"))
 
+;; ---
+
+(reset)
+(new-trace "string-new")
+(add-code '((def main [
+              ((1 integer) <- new (string literal) (5 literal))
+             ])))
+(let before Memory-in-use-until
+  (run 'main)
+  (if (~iso Memory-in-use-until (+ before 5 1))
+    (prn "F - 'new' allocates arrays of bytes for strings")))
+
 (reset)  ; end file with this to persist the trace for the final test