2012-07-09 18:07:59 -05:00
|
|
|
// xfail-fast
|
2012-04-10 12:52:06 -05:00
|
|
|
// aux-build:cci_class_6.rs
|
2012-09-11 19:46:20 -05:00
|
|
|
extern mod cci_class_6;
|
2012-09-05 14:32:05 -05:00
|
|
|
use cci_class_6::kitties::*;
|
2012-04-10 12:52:06 -05:00
|
|
|
|
|
|
|
fn main() {
|
2012-06-29 18:26:56 -05:00
|
|
|
let nyan : cat<char> = cat::<char>(52u, 99, ~['p']);
|
2012-07-14 00:57:48 -05:00
|
|
|
let kitty = cat(1000u, 2, ~[~"tabby"]);
|
2012-04-10 12:52:06 -05:00
|
|
|
assert(nyan.how_hungry == 99);
|
|
|
|
assert(kitty.how_hungry == 2);
|
2012-06-29 18:26:56 -05:00
|
|
|
nyan.speak(~[1u,2u,3u]);
|
2012-04-10 12:52:06 -05:00
|
|
|
assert(nyan.meow_count() == 55u);
|
2012-07-14 00:57:48 -05:00
|
|
|
kitty.speak(~[~"meow", ~"mew", ~"purr", ~"chirp"]);
|
2012-04-10 12:52:06 -05:00
|
|
|
assert(kitty.meow_count() == 1004u);
|
|
|
|
}
|