2012-04-26 14:15:46 -05:00
|
|
|
// xfail-fast
|
|
|
|
// aux-build:cci_class_cast.rs
|
|
|
|
use cci_class_cast;
|
2012-07-03 22:12:01 -05:00
|
|
|
import to_str::to_str;
|
2012-07-03 20:31:43 -05:00
|
|
|
import cci_class_cast::kitty::*;
|
2012-04-26 14:15:46 -05:00
|
|
|
|
2012-07-14 00:57:48 -05:00
|
|
|
fn print_out<T: to_str>(thing: T, expected: ~str) {
|
2012-04-26 14:15:46 -05:00
|
|
|
let actual = thing.to_str();
|
|
|
|
#debug("%s", actual);
|
|
|
|
assert(actual == expected);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2012-07-14 00:57:48 -05:00
|
|
|
let nyan : to_str = cat(0u, 2, ~"nyan") as to_str;
|
|
|
|
print_out(nyan, ~"nyan");
|
2012-04-26 14:15:46 -05:00
|
|
|
}
|
|
|
|
|