rust/src/test/run-pass/module-polymorphism4.rs
2012-08-08 18:19:24 -07:00

12 lines
No EOL
346 B
Rust

// This isn't really xfailed; it's used by the
// module-polymorphism.rc test
// xfail-test
fn main() {
let cat1 = cat::inst::meowlycat;
let cat2 = cat::inst::howlycat;
let dog = dog::inst::dog;
assert cat1.says() == ~"cat says 'meow'";
assert cat2.says() == ~"cat says 'howl'";
assert dog.says() == ~"dog says 'woof'";
}