1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// run-pass // compile-flags: --test #![feature(allow_fail)] #![feature(cfg_panic)] #[test] #[allow_fail] fn test1() { #[cfg(not(panic = "abort"))] panic!(); } #[test] #[allow_fail] fn test2() { assert!(true); }