diff options
| author | Brian Anderson <[email protected]> | 2011-01-07 21:29:32 -0500 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-01-10 11:31:32 -0800 |
| commit | 04056d89c831767f3c71a0cc274e7c17b5721734 (patch) | |
| tree | 1b82e86ead3fa0089c2e17729390beb133435262 /src/test/run-pass | |
| parent | Simplify the test for circular_buffer initialization (diff) | |
| download | rust-04056d89c831767f3c71a0cc274e7c17b5721734.tar.xz rust-04056d89c831767f3c71a0cc274e7c17b5721734.zip | |
Fix the check for growing the circular_buffer
Diffstat (limited to 'src/test/run-pass')
| -rw-r--r-- | src/test/run-pass/chan-poweroftwo.rs | 14 |
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: |