rust/tests/ui/else-if.rs

21 lines
577 B
Rust
Raw Normal View History

//@ run-pass
pub fn main() {
2015-01-25 21:05:03 +00:00
if 1 == 2 {
2013-03-29 01:39:09 +00:00
assert!((false));
2015-01-25 21:05:03 +00:00
} else if 2 == 3 {
2013-03-29 01:39:09 +00:00
assert!((false));
2015-01-25 21:05:03 +00:00
} else if 3 == 4 { assert!((false)); } else { assert!((true)); }
if 1 == 2 { assert!((false)); } else if 2 == 2 { assert!((true)); }
if 1 == 2 {
2013-03-29 01:39:09 +00:00
assert!((false));
2015-01-25 21:05:03 +00:00
} else if 2 == 2 {
if 1 == 1 {
2013-03-29 01:39:09 +00:00
assert!((true));
2015-01-25 21:05:03 +00:00
} else { if 2 == 1 { assert!((false)); } else { assert!((false)); } }
}
2015-01-25 21:05:03 +00:00
if 1 == 2 {
2013-03-29 01:39:09 +00:00
assert!((false));
2015-01-25 21:05:03 +00:00
} else { if 1 == 2 { assert!((false)); } else { assert!((true)); } }
}