aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/run-pass')
-rw-r--r--src/test/run-pass/chan-poweroftwo.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/run-pass/chan-poweroftwo.rs b/src/test/run-pass/chan-poweroftwo.rs
index fc05d7cc..f3a4b9b5 100644
--- a/src/test/run-pass/chan-poweroftwo.rs
+++ b/src/test/run-pass/chan-poweroftwo.rs
@@ -25,8 +25,22 @@ impure fn test_init() {
mychan <| val;
}
+// Dump lots of items into the channel so it has to grow.
+// Don't trigger any assertions.
+impure fn test_grow() {
+ let port[record] myport = port();
+ auto mychan = chan(myport);
+
+ let record val = rec(val1=0i32, val2=0i32, val3=0i32);
+
+ for each (uint i in _uint.range(0u, 100u)) {
+ mychan <| val;
+ }
+}
+
impure fn main() {
test_init();
+ test_grow();
}
// Local Variables: