// -*- rust -*-
fn main() {
let str s = "hello";
s += "world";
log s;
check(s.(9) == u8('d'));
}
// -*- rust -*-
fn main() {
let str s = "hello";
s += "world";
log s;
check(s.(9) == ('d' as u8));
}
// -*- 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();
}
// xfail-stage0
// -*- 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();
}
// -*- 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();
}
// -*- rust -*-
use std;
import std._str;
fn test1() {
let str s = "hello";
s += "world";
log s;
assert (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;
assert (_str.eq(a, "abcABCabc"));
assert (_str.eq(b, "ABCabcABC"));
}
fn main() {
test1();
test2();
}
// -*- 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();
}
// -*- rust -*-
use std;
import std._str;
fn test1() {
let str s = "hello";
s += "world";
log s;
assert (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;
assert (_str.eq(a, "abcABCabc"));
assert (_str.eq(b, "ABCabcABC"));
}
fn main() {
test1();
test2();
}
// -*- rust -*-
use std;
import std.Str;
fn test1() {
let str s = "hello";
s += "world";
log s;
assert (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;
assert (Str.eq(a, "abcABCabc"));
assert (Str.eq(b, "ABCabcABC"));
}
fn main() {
test1();
test2();
}
// -*- rust -*-
use std;
import std::_str;
fn test1() {
let str s = "hello";
s += "world";
log s;
assert (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;
assert (_str::eq(a, "abcABCabc"));
assert (_str::eq(b, "ABCabcABC"));
}
fn main() {
test1();
test2();
}
// -*- rust -*-
use std;
import std::str;
fn test1() {
let str s = "hello";
s += "world";
log s;
assert (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;
assert (str::eq(a, "abcABCabc"));
assert (str::eq(b, "ABCabcABC"));
}
fn main() {
test1();
test2();
}
// -*- rust -*-
use std;
import std::str;
fn test1() {
let str s = "hello";
s += "world";
log s;
assert (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;
assert (str::eq(a, "abcABCabc"));
assert (str::eq(b, "ABCabcABC"));
}
fn main() { test1(); test2(); }
// -*- rust -*-
use std;
import std::str;
fn test1() {
let s: str = "hello";
s += "world";
log s;
assert (s.(9) == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: str = "abc";
let a: str = ff + "ABC" + ff;
let b: str = "ABC" + ff + "ABC";
log a;
log b;
assert (str::eq(a, "abcABCabc"));
assert (str::eq(b, "ABCabcABC"));
}
fn main() { test1(); test2(); }
// -*- rust -*-
use std;
import std::str;
fn test1() {
let s: str = "hello";
s += "world";
log s;
assert (s[9] == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: str = "abc";
let a: str = ff + "ABC" + ff;
let b: str = "ABC" + ff + "ABC";
log a;
log b;
assert (str::eq(a, "abcABCabc"));
assert (str::eq(b, "ABCabcABC"));
}
fn main() { test1(); test2(); }
// -*- rust -*-
use std;
import std::istr;
fn test1() {
let s: istr = ~"hello";
s += ~"world";
log s;
assert (s[9] == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: istr = ~"abc";
let a: istr = ff + ~"ABC" + ff;
let b: istr = ~"ABC" + ff + ~"ABC";
log a;
log b;
assert (istr::eq(a, ~"abcABCabc"));
assert (istr::eq(b, ~"ABCabcABC"));
}
fn main() { test1(); test2(); }
// -*- rust -*-
use std;
import std::str;
fn test1() {
let s: istr = ~"hello";
s += ~"world";
log s;
assert (s[9] == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: istr = ~"abc";
let a: istr = ff + ~"ABC" + ff;
let b: istr = ~"ABC" + ff + ~"ABC";
log a;
log b;
assert (str::eq(a, ~"abcABCabc"));
assert (str::eq(b, ~"ABCabcABC"));
}
fn main() { test1(); test2(); }
// -*- rust -*-
use std;
import std::str;
fn test1() {
let s: str = "hello";
s += "world";
log s;
assert (s[9] == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: str = "abc";
let a: str = ff + "ABC" + ff;
let b: str = "ABC" + ff + "ABC";
log a;
log b;
assert (str::eq(a, "abcABCabc"));
assert (str::eq(b, "ABCabcABC"));
}
fn main() { test1(); test2(); }
// -*- rust -*-
use std;
import str;
fn test1() {
let s: str = "hello";
s += "world";
log s;
assert (s[9] == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: str = "abc";
let a: str = ff + "ABC" + ff;
let b: str = "ABC" + ff + "ABC";
log a;
log b;
assert (str::eq(a, "abcABCabc"));
assert (str::eq(b, "ABCabcABC"));
}
fn main() { test1(); test2(); }
// -*- rust -*-
use std;
import str;
fn test1() {
let s: str = "hello";
s += "world";
log_full(core::debug, s);
assert (s[9] == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: str = "abc";
let a: str = ff + "ABC" + ff;
let b: str = "ABC" + ff + "ABC";
log_full(core::debug, a);
log_full(core::debug, b);
assert (str::eq(a, "abcABCabc"));
assert (str::eq(b, "ABCabcABC"));
}
fn main() { test1(); test2(); }
// -*- rust -*-
use std;
import str;
fn test1() {
let s: str = "hello";
s += "world";
log(debug, s);
assert (s[9] == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: str = "abc";
let a: str = ff + "ABC" + ff;
let b: str = "ABC" + ff + "ABC";
log(debug, a);
log(debug, b);
assert (str::eq(a, "abcABCabc"));
assert (str::eq(b, "ABCabcABC"));
}
fn main() { test1(); test2(); }
// -*- rust -*-
use std;
import str;
fn test1() {
let mut s: str = "hello";
s += "world";
log(debug, s);
assert (s[9] == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: str = "abc";
let a: str = ff + "ABC" + ff;
let b: str = "ABC" + ff + "ABC";
log(debug, a);
log(debug, b);
assert (str::eq(a, "abcABCabc"));
assert (str::eq(b, "ABCabcABC"));
}
fn main() { test1(); test2(); }
// -*- rust -*-
use std;
import str;
fn test1() {
let mut s: ~str = ~"hello";
s += ~"world";
log(debug, s);
assert (s[9] == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + ~"ABC" + ff;
let b: ~str = ~"ABC" + ff + ~"ABC";
log(debug, a);
log(debug, b);
assert (str::eq(a, ~"abcABCabc"));
assert (str::eq(b, ~"ABCabcABC"));
}
fn main() { test1(); test2(); }
// -*- rust -*-
use std;
import str;
fn test1() {
let mut s: ~str = ~"hello";
s += ~"world";
log(debug, s);
assert (s[9] == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + ~"ABC" + ff;
let b: ~str = ~"ABC" + ff + ~"ABC";
log(debug, a);
log(debug, b);
assert (a == ~"abcABCabc");
assert (b == ~"ABCabcABC");
}
fn main() { test1(); test2(); }
// -*- rust -*-
use std;
fn test1() {
let mut s: ~str = ~"hello";
s += ~"world";
log(debug, s);
assert (s[9] == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + ~"ABC" + ff;
let b: ~str = ~"ABC" + ff + ~"ABC";
log(debug, a);
log(debug, b);
assert (a == ~"abcABCabc");
assert (b == ~"ABCabcABC");
}
fn main() { test1(); test2(); }
// -*- rust -*-
extern mod std;
fn test1() {
let mut s: ~str = ~"hello";
s += ~"world";
log(debug, s);
assert (s[9] == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + ~"ABC" + ff;
let b: ~str = ~"ABC" + ff + ~"ABC";
log(debug, a);
log(debug, b);
assert (a == ~"abcABCabc");
assert (b == ~"ABCabcABC");
}
fn main() { test1(); test2(); }
// -*- rust -*-
extern mod std;
fn test1() {
let mut s: ~str = ~"hello";
s += ~"world";
log(debug, copy s);
assert (s[9] == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + ~"ABC" + ff;
let b: ~str = ~"ABC" + ff + ~"ABC";
log(debug, copy a);
log(debug, copy b);
assert (a == ~"abcABCabc");
assert (b == ~"ABCabcABC");
}
fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
extern mod std;
fn test1() {
let mut s: ~str = ~"hello";
s += ~"world";
log(debug, copy s);
assert (s[9] == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + ~"ABC" + ff;
let b: ~str = ~"ABC" + ff + ~"ABC";
log(debug, copy a);
log(debug, copy b);
assert (a == ~"abcABCabc");
assert (b == ~"ABCabcABC");
}
fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
extern mod std;
fn test1() {
let mut s: ~str = ~"hello";
s += ~"world";
log(debug, copy s);
assert (s[9] == 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + ~"ABC" + ff;
let b: ~str = ~"ABC" + ff + ~"ABC";
log(debug, copy a);
log(debug, copy b);
assert (a == ~"abcABCabc");
assert (b == ~"ABCabcABC");
}
pub fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
extern mod std;
fn test1() {
let mut s: ~str = ~"hello";
s += ~"world";
log(debug, copy s);
fail_unless!((s[9] == 'd' as u8));
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + ~"ABC" + ff;
let b: ~str = ~"ABC" + ff + ~"ABC";
log(debug, copy a);
log(debug, copy b);
fail_unless!((a == ~"abcABCabc"));
fail_unless!((b == ~"ABCabcABC"));
}
pub fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
extern mod std;
fn test1() {
let mut s: ~str = ~"hello";
s += ~"world";
debug!(copy s);
fail_unless!((s[9] == 'd' as u8));
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + ~"ABC" + ff;
let b: ~str = ~"ABC" + ff + ~"ABC";
debug!(copy a);
debug!(copy b);
fail_unless!((a == ~"abcABCabc"));
fail_unless!((b == ~"ABCabcABC"));
}
pub fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
extern mod std;
fn test1() {
let mut s: ~str = ~"hello";
s += ~"world";
debug!(s.clone());
fail_unless!((s[9] == 'd' as u8));
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + ~"ABC" + ff;
let b: ~str = ~"ABC" + ff + ~"ABC";
debug!(a.clone());
debug!(b.clone());
fail_unless!((a == ~"abcABCabc"));
fail_unless!((b == ~"ABCabcABC"));
}
pub fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
extern mod std;
fn test1() {
let mut s: ~str = ~"hello";
s += ~"world";
debug!(s.clone());
assert!((s[9] == 'd' as u8));
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + ~"ABC" + ff;
let b: ~str = ~"ABC" + ff + ~"ABC";
debug!(a.clone());
debug!(b.clone());
assert!((a == ~"abcABCabc"));
assert!((b == ~"ABCabcABC"));
}
pub fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
extern mod std;
fn test1() {
let mut s: ~str = ~"hello";
s += ~"world";
debug!(s.clone());
assert_eq!(s[9], 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + ~"ABC" + ff;
let b: ~str = ~"ABC" + ff + ~"ABC";
debug!(a.clone());
debug!(b.clone());
assert_eq!(a, ~"abcABCabc");
assert_eq!(b, ~"ABCabcABC");
}
pub fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
extern mod extra;
fn test1() {
let mut s: ~str = ~"hello";
s += ~"world";
debug!(s.clone());
assert_eq!(s[9], 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + ~"ABC" + ff;
let b: ~str = ~"ABC" + ff + ~"ABC";
debug!(a.clone());
debug!(b.clone());
assert_eq!(a, ~"abcABCabc");
assert_eq!(b, ~"ABCabcABC");
}
pub fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
extern mod extra;
fn test1() {
let mut s: ~str = ~"hello";
s.push_str("world");
debug!(s.clone());
assert_eq!(s[9], 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + ~"ABC" + ff;
let b: ~str = ~"ABC" + ff + ~"ABC";
debug!(a.clone());
debug!(b.clone());
assert_eq!(a, ~"abcABCabc");
assert_eq!(b, ~"ABCabcABC");
}
pub fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
extern mod extra;
fn test1() {
let mut s: ~str = ~"hello";
s.push_str("world");
info!(s.clone());
assert_eq!(s[9], 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + ~"ABC" + ff;
let b: ~str = ~"ABC" + ff + ~"ABC";
info!(a.clone());
info!(b.clone());
assert_eq!(a, ~"abcABCabc");
assert_eq!(b, ~"ABCabcABC");
}
pub fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
extern mod extra;
fn test1() {
let mut s: ~str = ~"hello";
s.push_str("world");
info!(s.clone());
assert_eq!(s[9], 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + "ABC" + ff;
let b: ~str = ~"ABC" + ff + "ABC";
info!(a.clone());
info!(b.clone());
assert_eq!(a, ~"abcABCabc");
assert_eq!(b, ~"ABCabcABC");
}
pub fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
extern mod extra;
fn test1() {
let mut s: ~str = ~"hello";
s.push_str("world");
info2!("{}", s.clone());
assert_eq!(s[9], 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + "ABC" + ff;
let b: ~str = ~"ABC" + ff + "ABC";
info2!("{}", a.clone());
info2!("{}", b.clone());
assert_eq!(a, ~"abcABCabc");
assert_eq!(b, ~"ABCabcABC");
}
pub fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
extern mod extra;
fn test1() {
let mut s: ~str = ~"hello";
s.push_str("world");
info!("{}", s.clone());
assert_eq!(s[9], 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + "ABC" + ff;
let b: ~str = ~"ABC" + ff + "ABC";
info!("{}", a.clone());
info!("{}", b.clone());
assert_eq!(a, ~"abcABCabc");
assert_eq!(b, ~"ABCabcABC");
}
pub fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
extern mod extra;
fn test1() {
let mut s: ~str = ~"hello";
s.push_str("world");
info!("{}", s.clone());
assert_eq!(s[9], 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + "ABC" + ff;
let b: ~str = ~"ABC" + ff + "ABC";
info!("{}", a.clone());
info!("{}", b.clone());
assert_eq!(a, ~"abcABCabc");
assert_eq!(b, ~"ABCabcABC");
}
pub fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
extern crate extra;
fn test1() {
let mut s: ~str = ~"hello";
s.push_str("world");
info!("{}", s.clone());
assert_eq!(s[9], 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + "ABC" + ff;
let b: ~str = ~"ABC" + ff + "ABC";
info!("{}", a.clone());
info!("{}", b.clone());
assert_eq!(a, ~"abcABCabc");
assert_eq!(b, ~"ABCabcABC");
}
pub fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn test1() {
let mut s: ~str = ~"hello";
s.push_str("world");
info!("{}", s.clone());
assert_eq!(s[9], 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + "ABC" + ff;
let b: ~str = ~"ABC" + ff + "ABC";
info!("{}", a.clone());
info!("{}", b.clone());
assert_eq!(a, ~"abcABCabc");
assert_eq!(b, ~"ABCabcABC");
}
pub fn main() { test1(); test2(); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn test1() {
let mut s: ~str = ~"hello";
s.push_str("world");
println!("{}", s.clone());
assert_eq!(s[9], 'd' as u8);
}
fn test2() {
// This tests for issue #163
let ff: ~str = ~"abc";
let a: ~str = ff + "ABC" + ff;
let b: ~str = ~"ABC" + ff + "ABC";
println!("{}", a.clone());
println!("{}", b.clone());
assert_eq!(a, ~"abcABCabc");
assert_eq!(b, ~"ABCabcABC");
}
pub fn main() { test1(); test2(); }