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