Skip to content

Commit

Permalink
Update tests accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Bukaj committed Nov 16, 2014
1 parent eb01b17 commit 28b1b2e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-16939.rs
Expand Up @@ -14,7 +14,7 @@
// wrong arity.

fn _foo<F: Fn()> (f: F) {
|t| f(t); //~ ERROR E0058
|t| f(t); //~ ERROR E0057
}

fn main() {}
2 changes: 1 addition & 1 deletion src/test/compile-fail/non-constant-enum-for-vec-repeat.rs
Expand Up @@ -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
}
5 changes: 3 additions & 2 deletions src/test/compile-fail/repeat_count.rs
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/test/run-pass/concat.rs
Expand Up @@ -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
})
}

0 comments on commit 28b1b2e

Please sign in to comment.