rust/src/test/run-pass/istr.rs

23 lines
338 B
Rust
Raw Normal View History

2011-08-22 15:53:39 -05:00
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";
}
2011-08-22 15:53:39 -05:00
fn main() {
test_stack_assign();
test_heap_lit();
test_heap_assign();
2011-08-22 15:53:39 -05:00
}