aboutsummaryrefslogtreecommitdiff
path: root/tests/drivers/frame_growth_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/drivers/frame_growth_test.py')
-rw-r--r--tests/drivers/frame_growth_test.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/drivers/frame_growth_test.py b/tests/drivers/frame_growth_test.py
index 74156e3..6e03cbc 100644
--- a/tests/drivers/frame_growth_test.py
+++ b/tests/drivers/frame_growth_test.py
@@ -4,22 +4,22 @@ import subprocess
import sys
command = sys.argv[1:]
-source = '''unchecked int descend(int depth, int* root) {
- [2000]int padding;
+source = '''include rt; unchecked int descend(int depth, int* root) {
+ int[2000] padding;
padding[0] = depth;
- if (depth == 0) { gc(); return *root; }
+ if (depth == 0) { rt.gc(); return *root; }
return descend(depth - 1, root) + padding[0];
}
unchecked int oversized(int* root) {
- [300000]int values;
+ int[300000] values;
values[0] = *root; values[299999] = 9;
- gc(); return values[0] + values[299999];
+ rt.gc(); return values[0] + values[299999];
}
unchecked fn main() {
int value = 7;
- put_n(descend(300, &value)); put_c(32);
- put_n(oversized(&value)); put_c(32);
- gc(); put_n(frame_node == 0); put_c(10);
+ rt.put_n(descend(300, &value)); rt.put_c(32);
+ rt.put_n(oversized(&value)); rt.put_c(32);
+ rt.gc(); rt.put_n(rt.frame_node == 0); rt.put_c(10);
return 0;
}
'''