rust/src/test/run-pass/str-append.rs
Graydon Hoare d08b443fff Revert "Use different syntax for checks that matter to typestate"
This reverts commit aa25f22f19. It broke stage2, not sure why yet.
2011-05-02 17:35:33 -07:00

31 lines
400 B
Rust

// -*- rust -*-
use std;
import std._str;
fn test1() {
let str s = "hello";
s += "world";
log s;
check(s.(9) == ('d' as u8));
}
fn test2() {
// This tests for issue #163
let str ff = "abc";
let str a = ff + "ABC" + ff;
let str b = "ABC" + ff + "ABC";
log a;
log b;
check (_str.eq(a, "abcABCabc"));
check (_str.eq(b, "ABCabcABC"));
}
fn main() {
test1();
test2();
}