rust/src/test/run-pass/istr.rs
2011-08-22 16:12:42 -07:00

29 lines
427 B
Rust

fn test_stack_assign() {
let s: istr = ~"a";
log s;
let t: istr = ~"a";
assert s == t;
let u: istr = ~"b";
assert s != u;
}
fn test_heap_lit() {
~"a big string";
}
fn test_heap_assign() {
let s: istr;
s = ~"AAAA";
}
fn test_heap_log() {
let s = ~"a big ol' string";
log s;
}
fn main() {
test_stack_assign();
test_heap_lit();
test_heap_assign();
test_heap_log();
}