diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2015-02-18 05:42:01 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-02-18 09:10:10 -0500 |
| commit | 72eb214ee473e7fbb8fb27ba10d6e43d02bb633b (patch) | |
| tree | 3790edad3c83732606f22e6408414ea810108fba /src/test/run-fail | |
| parent | 8c34b26606d3cbff5216b1e180236573e304a872 (diff) | |
| download | rust-72eb214ee473e7fbb8fb27ba10d6e43d02bb633b.tar.gz rust-72eb214ee473e7fbb8fb27ba10d6e43d02bb633b.zip | |
Update suffixes en masse in tests using `perl -p -i -e`
Diffstat (limited to 'src/test/run-fail')
| -rw-r--r-- | src/test/run-fail/binop-panic.rs | 2 | ||||
| -rw-r--r-- | src/test/run-fail/bug-2470-bounds-check-overflow-2.rs | 4 | ||||
| -rw-r--r-- | src/test/run-fail/bug-2470-bounds-check-overflow-3.rs | 6 | ||||
| -rw-r--r-- | src/test/run-fail/bug-2470-bounds-check-overflow.rs | 2 | ||||
| -rw-r--r-- | src/test/run-fail/die-macro-expr.rs | 2 | ||||
| -rw-r--r-- | src/test/run-fail/extern-panic.rs | 8 | ||||
| -rw-r--r-- | src/test/run-fail/for-each-loop-panic.rs | 2 | ||||
| -rw-r--r-- | src/test/run-fail/if-check-panic.rs | 6 |
8 files changed, 16 insertions, 16 deletions
diff --git a/src/test/run-fail/binop-panic.rs b/src/test/run-fail/binop-panic.rs index ac85b218ec0..159c33198a6 100644 --- a/src/test/run-fail/binop-panic.rs +++ b/src/test/run-fail/binop-panic.rs @@ -10,4 +10,4 @@ // error-pattern:quux fn my_err(s: String) -> ! { println!("{}", s); panic!("quux"); } -fn main() { 3u == my_err("bye".to_string()); } +fn main() { 3_usize == my_err("bye".to_string()); } diff --git a/src/test/run-fail/bug-2470-bounds-check-overflow-2.rs b/src/test/run-fail/bug-2470-bounds-check-overflow-2.rs index 06712841823..6dd329b7295 100644 --- a/src/test/run-fail/bug-2470-bounds-check-overflow-2.rs +++ b/src/test/run-fail/bug-2470-bounds-check-overflow-2.rs @@ -14,14 +14,14 @@ use std::uint; fn main() { - let x = vec!(1u,2u,3u); + let x = vec!(1_usize,2_usize,3_usize); // This should cause a bounds-check panic, but may not if we do our // bounds checking by comparing a scaled index value to the vector's // length (in bytes), because the scaling of the index will cause it to // wrap around to a small number. - let idx = uint::MAX & !(uint::MAX >> 1u); + let idx = uint::MAX & !(uint::MAX >> 1_usize); println!("ov2 idx = 0x%x", idx); // This should panic. diff --git a/src/test/run-fail/bug-2470-bounds-check-overflow-3.rs b/src/test/run-fail/bug-2470-bounds-check-overflow-3.rs index 72e9c4849c6..ec7fde17101 100644 --- a/src/test/run-fail/bug-2470-bounds-check-overflow-3.rs +++ b/src/test/run-fail/bug-2470-bounds-check-overflow-3.rs @@ -15,7 +15,7 @@ use std::u64; #[cfg(target_arch="x86")] fn main() { - let x = vec!(1u,2u,3u); + let x = vec!(1_usize,2_usize,3_usize); // This should cause a bounds-check panic, but may not if we do our // bounds checking by truncating the index value to the size of the @@ -23,7 +23,7 @@ fn main() { // This test is only meaningful on 32-bit hosts. - let idx = u64::MAX & !(u64::MAX >> 1u); + let idx = u64::MAX & !(u64::MAX >> 1_usize); println!("ov3 idx = 0x%8.8x%8.8x", (idx >> 32) as uint, idx as uint); @@ -35,6 +35,6 @@ fn main() { #[cfg(any(target_arch="x86_64", target_arch = "aarch64"))] fn main() { // This version just panics anyways, for symmetry on 64-bit hosts. - let x = vec!(1u,2u,3u); + let x = vec!(1_usize,2_usize,3_usize); error!("ov3 0x%x", x[200]); } diff --git a/src/test/run-fail/bug-2470-bounds-check-overflow.rs b/src/test/run-fail/bug-2470-bounds-check-overflow.rs index f8686d0dbb5..e48d749d945 100644 --- a/src/test/run-fail/bug-2470-bounds-check-overflow.rs +++ b/src/test/run-fail/bug-2470-bounds-check-overflow.rs @@ -20,7 +20,7 @@ fn main() { // address of the 0th cell in the array (even though the index is // huge). - let x = vec!(1u,2u,3u); + let x = vec!(1_usize,2_usize,3_usize); let base = x.as_ptr() as uint; let idx = base / mem::size_of::<uint>(); diff --git a/src/test/run-fail/die-macro-expr.rs b/src/test/run-fail/die-macro-expr.rs index 2014a108b3d..f2253b7342e 100644 --- a/src/test/run-fail/die-macro-expr.rs +++ b/src/test/run-fail/die-macro-expr.rs @@ -11,5 +11,5 @@ // error-pattern:test fn main() { - let _i: int = panic!("test"); + let __isize: int = panic!("test"); } diff --git a/src/test/run-fail/extern-panic.rs b/src/test/run-fail/extern-panic.rs index f45c36023d2..225ce5a741b 100644 --- a/src/test/run-fail/extern-panic.rs +++ b/src/test/run-fail/extern-panic.rs @@ -26,10 +26,10 @@ mod rustrt { } extern fn cb(data: libc::uintptr_t) -> libc::uintptr_t { - if data == 1u { + if data == 1_usize { data } else { - count(data - 1u) + count(data - 1u) + count(data - 1_usize) + count(data - 1_usize) } } @@ -41,9 +41,9 @@ fn count(n: uint) -> uint { } fn main() { - for _ in 0..10u { + for _ in 0..10_usize { task::spawn(move|| { - let result = count(5u); + let result = count(5_usize); println!("result = %?", result); panic!(); }); diff --git a/src/test/run-fail/for-each-loop-panic.rs b/src/test/run-fail/for-each-loop-panic.rs index 6cad55e6358..a1a760c040c 100644 --- a/src/test/run-fail/for-each-loop-panic.rs +++ b/src/test/run-fail/for-each-loop-panic.rs @@ -10,4 +10,4 @@ // error-pattern:moop -fn main() { for _ in 0u..10u { panic!("moop"); } } +fn main() { for _ in 0_usize..10_usize { panic!("moop"); } } diff --git a/src/test/run-fail/if-check-panic.rs b/src/test/run-fail/if-check-panic.rs index 1ead81b0091..19a57db5ec7 100644 --- a/src/test/run-fail/if-check-panic.rs +++ b/src/test/run-fail/if-check-panic.rs @@ -10,9 +10,9 @@ // error-pattern:Number is odd fn even(x: uint) -> bool { - if x < 2u { + if x < 2_usize { return false; - } else if x == 2u { return true; } else { return even(x - 2u); } + } else if x == 2_usize { return true; } else { return even(x - 2_usize); } } fn foo(x: uint) { @@ -23,4 +23,4 @@ fn foo(x: uint) { } } -fn main() { foo(3u); } +fn main() { foo(3_usize); } |
