tests: Move run-pass tests without naming conflicts to ui
This commit is contained in:
parent
ca9faa52f5
commit
9be35f82c1
3226 changed files with 64 additions and 196 deletions
21
src/test/ui/iterators/iter-step-overflow-debug.rs
Normal file
21
src/test/ui/iterators/iter-step-overflow-debug.rs
Normal file
|
@ -0,0 +1,21 @@
|
|||
// run-pass
|
||||
// ignore-wasm32-bare compiled with panic=abort by default
|
||||
// compile-flags: -C debug_assertions=yes
|
||||
|
||||
use std::panic;
|
||||
|
||||
fn main() {
|
||||
let r = panic::catch_unwind(|| {
|
||||
let mut it = u8::max_value()..;
|
||||
it.next().unwrap(); // 255
|
||||
it.next().unwrap();
|
||||
});
|
||||
assert!(r.is_err());
|
||||
|
||||
let r = panic::catch_unwind(|| {
|
||||
let mut it = i8::max_value()..;
|
||||
it.next().unwrap(); // 127
|
||||
it.next().unwrap();
|
||||
});
|
||||
assert!(r.is_err());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue