Update tests accordingly

This commit is contained in:
Jakub Bukaj 2014-11-09 16:14:48 +01:00
parent eb01b17b06
commit 28b1b2ec39
4 changed files with 7 additions and 6 deletions

View File

@ -14,7 +14,7 @@
// wrong arity.
fn _foo<F: Fn()> (f: F) {
|t| f(t); //~ ERROR E0058
|t| f(t); //~ ERROR E0057
}
fn main() {}

View File

@ -12,5 +12,5 @@ enum State { ST_NULL, ST_WHITESPACE }
fn main() {
[ST_NULL, ..(ST_WHITESPACE as uint)];
//~^ ERROR expected constant integer for repeat count, found variable
//~^ ERROR expected constant integer for repeat count, found non-constant expression
}

View File

@ -13,8 +13,9 @@
fn main() {
let n = 1;
let a = [0, ..n]; //~ ERROR expected constant integer for repeat count, found variable
let b = [0, ..()]; //~ ERROR expected positive integer for repeat count, found ()
//~^ ERROR: expected `uint`, found `()`
let b = [0, ..()];
//~^ ERROR expected constant integer for repeat count, found non-constant expression
//~^^ ERROR: expected `uint`, found `()`
let c = [0, ..true]; //~ ERROR expected positive integer for repeat count, found boolean
//~^ ERROR: expected `uint`, found `bool`
let d = [0, ..0.5]; //~ ERROR expected positive integer for repeat count, found float

View File

@ -15,12 +15,12 @@ pub fn main() {
assert_eq!(concat!("qux", "quux",).to_string(), "quxquux".to_string());
assert_eq!(
concat!(1, 2i, 3u, 4f32, 4.0, 'a', true, ()),
concat!(1, 2i, 3u, 4f32, 4.0, 'a', true),
"12344.0atrue"
);
assert!(match "12344.0atrue" {
concat!(1, 2i, 3u, 4f32, 4.0, 'a', true, ()) => true,
concat!(1, 2i, 3u, 4f32, 4.0, 'a', true) => true,
_ => false
})
}