1 #![feature(rustc_attrs)]
8 let should_fail = env::args().nth(1) == Some("bad".to_string());
10 assert_eq!(thread::spawn(debug_assert_eq).join().is_err(), should_fail);
11 assert_eq!(thread::spawn(debug_assert).join().is_err(), should_fail);
12 assert_eq!(thread::spawn(overflow).join().is_err(), should_fail);
15 fn debug_assert_eq() {
18 debug_assert_eq!({ hit1 = true; 1 }, { hit2 = true; 2 });
25 debug_assert!({ hit = true; false });
30 fn add(a: u8, b: u8) -> u8 { a + b }