mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
14 lines
296 B
Rust
14 lines
296 B
Rust
//@ 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()));
|
|
}
|