2011-04-28 22:16:32 -05:00
|
|
|
fn main() {
|
|
|
|
auto s = "a";
|
|
|
|
s += "b";
|
2011-05-02 18:24:09 -05:00
|
|
|
check (s.(0) == ('a' as u8));
|
|
|
|
check (s.(1) == ('b' as u8));
|
2011-04-28 22:16:32 -05:00
|
|
|
|
|
|
|
s += "c";
|
|
|
|
s += "d";
|
2011-05-02 18:24:09 -05:00
|
|
|
check (s.(0) == ('a' as u8));
|
|
|
|
check (s.(1) == ('b' as u8));
|
|
|
|
check (s.(2) == ('c' as u8));
|
|
|
|
check (s.(3) == ('d' as u8));
|
2011-04-28 22:16:32 -05:00
|
|
|
}
|
|
|
|
|