aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/chan-poweroftwo.rs20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/test/run-pass/chan-poweroftwo.rs b/src/test/run-pass/chan-poweroftwo.rs
index da9a62cc..be7c18ad 100644
--- a/src/test/run-pass/chan-poweroftwo.rs
+++ b/src/test/run-pass/chan-poweroftwo.rs
@@ -39,7 +39,7 @@ impure fn test_grow() {
}
// Don't allow the buffer to shrink below it's original size
-impure fn test_shrink() {
+impure fn test_shrink1() {
let port[i8] myport = port();
auto mychan = chan(myport);
@@ -47,10 +47,26 @@ impure fn test_shrink() {
auto x <- myport;
}
+impure fn test_shrink2() {
+ 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;
+ }
+
+ for each (uint i in _uint.range(0u, 100u)) {
+ auto x <- myport;
+ }
+}
+
impure fn main() {
test_init();
test_grow();
- test_shrink();
+ test_shrink1();
+ test_shrink2();
}
// Local Variables: