blob: ca362c7a7d852c63495983bbe1df801d8150edf9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// run-pass
// aux-build:cci_class_4.rs
extern crate cci_class_4;
use cci_class_4::kitties::cat;
pub fn main() {
let mut nyan = cat(0_usize, 2, "nyan".to_string());
nyan.eat();
assert!((!nyan.eat()));
for _ in 1_usize..10_usize { nyan.speak(); };
assert!((nyan.eat()));
}
|