2012-03-24 01:08:41 -05:00
|
|
|
// xfail-fast
|
|
|
|
// aux-build:cci_class_4.rs
|
|
|
|
use cci_class_4;
|
|
|
|
import cci_class_4::kitties::*;
|
|
|
|
|
|
|
|
fn main() {
|
2012-03-28 00:08:48 -05:00
|
|
|
let nyan = cat(0u, 2, "nyan");
|
2012-03-24 01:08:41 -05:00
|
|
|
nyan.eat();
|
|
|
|
assert(!nyan.eat());
|
|
|
|
uint::range(1u, 10u, {|_i| nyan.speak(); });
|
|
|
|
assert(nyan.eat());
|
|
|
|
}
|