aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-06-25 23:57:30 -0700
committerGraydon Hoare <[email protected]>2010-06-25 23:57:30 -0700
commit7ea416f4c33631d76fd5b12830c0d326803061c1 (patch)
tree20639257bfd83ca3f6355de01958fc8cee786237 /src/test
parentFurther attempts to convince mem_ctrl to be sane. (diff)
downloadrust-7ea416f4c33631d76fd5b12830c0d326803061c1.tar.xz
rust-7ea416f4c33631d76fd5b12830c0d326803061c1.zip
Add callable gc method exposed to user code, use it in mlist-cycle.rs test (still not quite working; some memory corruption in the recursive tag constructors, not the GC)
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/mlist-cycle.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/run-pass/mlist-cycle.rs b/src/test/run-pass/mlist-cycle.rs
index 2a371317..313455f8 100644
--- a/src/test/run-pass/mlist-cycle.rs
+++ b/src/test/run-pass/mlist-cycle.rs
@@ -1,5 +1,7 @@
// -*- rust -*-
+use std;
+
type cell = tup(mutable @list);
type list = tag(link(@cell), nil());
@@ -7,4 +9,6 @@ fn main() {
let @cell first = tup(@nil());
let @cell second = tup(@link(first));
first._0 = link(second);
+ std.sys.rustrt.gc();
+ let @cell third = tup(@nil());
}