aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorBrian Anderson <[email protected]>2011-01-07 22:13:52 -0500
committerGraydon Hoare <[email protected]>2011-01-10 11:31:32 -0800
commit5f05ae68e555e94aa31c36b35dfb2e03952443ba (patch)
tree191f1ce9c13211830426e3fec63dee59631e6766 /src/test
parentFix the check for growing the circular_buffer (diff)
downloadrust-5f05ae68e555e94aa31c36b35dfb2e03952443ba.tar.xz
rust-5f05ae68e555e94aa31c36b35dfb2e03952443ba.zip
Don't allow circular_buffer to shrink below it's initial size
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/chan-poweroftwo.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/run-pass/chan-poweroftwo.rs b/src/test/run-pass/chan-poweroftwo.rs
index f3a4b9b5..da9a62cc 100644
--- a/src/test/run-pass/chan-poweroftwo.rs
+++ b/src/test/run-pass/chan-poweroftwo.rs
@@ -38,9 +38,19 @@ impure fn test_grow() {
}
}
+// Don't allow the buffer to shrink below it's original size
+impure fn test_shrink() {
+ let port[i8] myport = port();
+ auto mychan = chan(myport);
+
+ mychan <| 0i8;
+ auto x <- myport;
+}
+
impure fn main() {
test_init();
test_grow();
+ test_shrink();
}
// Local Variables: