aboutsummaryrefslogtreecommitdiff
path: root/tests/programs/ftype.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/programs/ftype.zc')
-rw-r--r--tests/programs/ftype.zc15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/programs/ftype.zc b/tests/programs/ftype.zc
index 6db7f5a..cbc2444 100644
--- a/tests/programs/ftype.zc
+++ b/tests/programs/ftype.zc
@@ -1,5 +1,8 @@
+namespace;
+include rt;
+
fn put_f(x) { asm { x @ #1220 } return 0; }
-fn sp() { put_c(32); return 0; }
+fn sp() { rt.put_c(32); return 0; }
struct cell { int tag; float field; }
@@ -31,17 +34,17 @@ fn main() {
put_f(c.field); sp();
buf[0] = 6.5;
put_f(buf[0]); sp();
- put_n(&(1.field)); sp();
+ rt.put_n(&(1.field)); sp();
w = (&c) as word;
- put_n(w.tag); sp();
+ rt.put_n(w.tag); sp();
put_f(w.field); sp();
w.field = 8.5;
put_f(c.field); sp();
- put_n(g > 3); sp();
+ rt.put_n(g > 3); sp();
if (z) n = 1;
do { if (z) n = n + 2; } while (z);
if (!z && g) n = n + 4;
- put_n(n);
- put_c(10);
+ rt.put_n(n);
+ rt.put_c(10);
return 0;
}