mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +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()));
|
|
}
|