Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
15
tests/ui/iterators/iter-count-overflow-debug.rs
Normal file
15
tests/ui/iterators/iter-count-overflow-debug.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
// run-pass
|
||||
// only-32bit too impatient for 2⁶⁴ items
|
||||
// needs-unwind
|
||||
// compile-flags: -C debug_assertions=yes -C opt-level=3
|
||||
|
||||
use std::panic;
|
||||
|
||||
fn main() {
|
||||
assert_eq!((0..usize::MAX).by_ref().count(), usize::MAX);
|
||||
|
||||
let r = panic::catch_unwind(|| {
|
||||
(0..=usize::MAX).by_ref().count()
|
||||
});
|
||||
assert!(r.is_err());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue