/src/test/run-pass/expr-alt-box.rs
http://github.com/jruderman/rust · Rust · 17 lines · 9 code · 6 blank · 2 comment · 4 complexity · 77410e421016dbf0dd6be55fd6666390 MD5 · raw file
- // -*- rust -*-
- // Tests for match as expressions resulting in boxed types
- fn test_box() {
- let res = match check true { true => { @100 } };
- assert (*res == 100);
- }
- fn test_str() {
- let res = match check true { true => { ~"happy" } };
- assert (res == ~"happy");
- }
- fn main() { test_box(); test_str(); }