rust/src/test/run-pass/expr-if-unique.rs
Brian Anderson 18b01d5cfe Create a bunch of test cases for unique boxes by copying box tests
XFAIL the ones that don't work

Issue #409
2011-09-23 15:15:30 -07:00

13 lines
188 B
Rust

// -*- rust -*-
// Tests for if as expressions returning boxed types
fn test_box() {
let rs = if true { ~100 } else { ~101 };
assert (*rs == 100);
}
fn main() { test_box(); }