diff options
| author | Tim Chevalier <[email protected]> | 2011-05-02 11:23:07 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-05-02 12:16:29 -0700 |
| commit | aa25f22f197682de3b18fc4c8ba068d1feda220f (patch) | |
| tree | 6d01f8fbb5680964fd9c53564c96aa58cb75d3d1 /src/test/run-pass/lib-uint.rs | |
| parent | rustc: Add a "fat tydesc" LLVM type to trans (diff) | |
| download | rust-aa25f22f197682de3b18fc4c8ba068d1feda220f.tar.xz rust-aa25f22f197682de3b18fc4c8ba068d1feda220f.zip | |
Use different syntax for checks that matter to typestate
This giant commit changes the syntax of Rust to use "assert" for
"check" expressions that didn't mean anything to the typestate
system, and continue using "check" for checks that are used as
part of typestate checking.
Most of the changes are just replacing "check" with "assert" in test
cases and rustc.
Diffstat (limited to 'src/test/run-pass/lib-uint.rs')
| -rw-r--r-- | src/test/run-pass/lib-uint.rs | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/src/test/run-pass/lib-uint.rs b/src/test/run-pass/lib-uint.rs index 356ca374..64d39619 100644 --- a/src/test/run-pass/lib-uint.rs +++ b/src/test/run-pass/lib-uint.rs @@ -4,44 +4,44 @@ use std; import std._uint; fn main() { - check (_uint.next_power_of_two(0u) == 0u); - check (_uint.next_power_of_two(1u) == 1u); - check (_uint.next_power_of_two(2u) == 2u); - check (_uint.next_power_of_two(3u) == 4u); - check (_uint.next_power_of_two(4u) == 4u); - check (_uint.next_power_of_two(5u) == 8u); - check (_uint.next_power_of_two(6u) == 8u); - check (_uint.next_power_of_two(7u) == 8u); - check (_uint.next_power_of_two(8u) == 8u); - check (_uint.next_power_of_two(9u) == 16u); - check (_uint.next_power_of_two(10u) == 16u); - check (_uint.next_power_of_two(11u) == 16u); - check (_uint.next_power_of_two(12u) == 16u); - check (_uint.next_power_of_two(13u) == 16u); - check (_uint.next_power_of_two(14u) == 16u); - check (_uint.next_power_of_two(15u) == 16u); - check (_uint.next_power_of_two(16u) == 16u); - check (_uint.next_power_of_two(17u) == 32u); - check (_uint.next_power_of_two(18u) == 32u); - check (_uint.next_power_of_two(19u) == 32u); - check (_uint.next_power_of_two(20u) == 32u); - check (_uint.next_power_of_two(21u) == 32u); - check (_uint.next_power_of_two(22u) == 32u); - check (_uint.next_power_of_two(23u) == 32u); - check (_uint.next_power_of_two(24u) == 32u); - check (_uint.next_power_of_two(25u) == 32u); - check (_uint.next_power_of_two(26u) == 32u); - check (_uint.next_power_of_two(27u) == 32u); - check (_uint.next_power_of_two(28u) == 32u); - check (_uint.next_power_of_two(29u) == 32u); - check (_uint.next_power_of_two(30u) == 32u); - check (_uint.next_power_of_two(31u) == 32u); - check (_uint.next_power_of_two(32u) == 32u); - check (_uint.next_power_of_two(33u) == 64u); - check (_uint.next_power_of_two(34u) == 64u); - check (_uint.next_power_of_two(35u) == 64u); - check (_uint.next_power_of_two(36u) == 64u); - check (_uint.next_power_of_two(37u) == 64u); - check (_uint.next_power_of_two(38u) == 64u); - check (_uint.next_power_of_two(39u) == 64u); + assert (_uint.next_power_of_two(0u) == 0u); + assert (_uint.next_power_of_two(1u) == 1u); + assert (_uint.next_power_of_two(2u) == 2u); + assert (_uint.next_power_of_two(3u) == 4u); + assert (_uint.next_power_of_two(4u) == 4u); + assert (_uint.next_power_of_two(5u) == 8u); + assert (_uint.next_power_of_two(6u) == 8u); + assert (_uint.next_power_of_two(7u) == 8u); + assert (_uint.next_power_of_two(8u) == 8u); + assert (_uint.next_power_of_two(9u) == 16u); + assert (_uint.next_power_of_two(10u) == 16u); + assert (_uint.next_power_of_two(11u) == 16u); + assert (_uint.next_power_of_two(12u) == 16u); + assert (_uint.next_power_of_two(13u) == 16u); + assert (_uint.next_power_of_two(14u) == 16u); + assert (_uint.next_power_of_two(15u) == 16u); + assert (_uint.next_power_of_two(16u) == 16u); + assert (_uint.next_power_of_two(17u) == 32u); + assert (_uint.next_power_of_two(18u) == 32u); + assert (_uint.next_power_of_two(19u) == 32u); + assert (_uint.next_power_of_two(20u) == 32u); + assert (_uint.next_power_of_two(21u) == 32u); + assert (_uint.next_power_of_two(22u) == 32u); + assert (_uint.next_power_of_two(23u) == 32u); + assert (_uint.next_power_of_two(24u) == 32u); + assert (_uint.next_power_of_two(25u) == 32u); + assert (_uint.next_power_of_two(26u) == 32u); + assert (_uint.next_power_of_two(27u) == 32u); + assert (_uint.next_power_of_two(28u) == 32u); + assert (_uint.next_power_of_two(29u) == 32u); + assert (_uint.next_power_of_two(30u) == 32u); + assert (_uint.next_power_of_two(31u) == 32u); + assert (_uint.next_power_of_two(32u) == 32u); + assert (_uint.next_power_of_two(33u) == 64u); + assert (_uint.next_power_of_two(34u) == 64u); + assert (_uint.next_power_of_two(35u) == 64u); + assert (_uint.next_power_of_two(36u) == 64u); + assert (_uint.next_power_of_two(37u) == 64u); + assert (_uint.next_power_of_two(38u) == 64u); + assert (_uint.next_power_of_two(39u) == 64u); } |