2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2021-11-24 10:19:23 -08:00
|
|
|
// compile-flags: -C overflow-checks=on
|
2016-02-11 12:34:41 +01:00
|
|
|
// ignore-emscripten no threads support
|
2015-05-15 09:18:14 -07:00
|
|
|
|
|
|
|
use std::thread;
|
|
|
|
|
|
|
|
fn main() {
|
2020-06-02 07:59:11 +00:00
|
|
|
assert!(thread::spawn(|| i8::MIN.abs()).join().is_err());
|
|
|
|
assert!(thread::spawn(|| i16::MIN.abs()).join().is_err());
|
|
|
|
assert!(thread::spawn(|| i32::MIN.abs()).join().is_err());
|
|
|
|
assert!(thread::spawn(|| i64::MIN.abs()).join().is_err());
|
|
|
|
assert!(thread::spawn(|| isize::MIN.abs()).join().is_err());
|
2015-05-15 09:18:14 -07:00
|
|
|
}
|