2019-07-27 00:54:25 +03:00
|
|
|
// run-pass
|
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
fn incr(x: &mut isize) -> bool { *x += 1; assert!((false)); return false; }
|
2010-06-23 21:03:09 -07:00
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2015-01-25 22:05:03 +01:00
|
|
|
let x = 1 == 2 || 3 == 3;
|
2013-03-28 18:39:09 -07:00
|
|
|
assert!((x));
|
2015-03-25 17:06:52 -07:00
|
|
|
let mut y: isize = 10;
|
2014-10-14 21:07:11 -04:00
|
|
|
println!("{}", x || incr(&mut y));
|
2013-05-18 22:02:45 -04:00
|
|
|
assert_eq!(y, 10);
|
2013-03-28 18:39:09 -07:00
|
|
|
if true && x { assert!((true)); } else { assert!((false)); }
|
2011-08-19 15:16:48 -07:00
|
|
|
}
|