fix tests for check-fast.

This commit is contained in:
Felix S. Klock II 2013-10-01 18:02:11 +02:00
parent 155857f548
commit 06f46902ca
2 changed files with 19 additions and 4 deletions

View File

@ -28,7 +28,7 @@ mod m {
}
fn g() {
use m::aha;
use self::m::aha;
let r = match (0,0) {
(0, aha) => 0,
//~^ ERROR static constant in pattern should be all caps
@ -37,7 +37,22 @@ fn g() {
assert!(r == 1);
}
mod n {
pub static OKAY : int = 8;
}
fn h() {
use not_okay = self::n::OKAY;
let r = match (0,0) {
(0, not_okay) => 0,
//~^ ERROR static constant in pattern should be all caps
(x, y) => 1 + x + y,
};
assert!(r == 1);
}
fn main () {
f();
g();
h();
}

View File

@ -38,7 +38,7 @@ mod m {
}
fn g() {
use AHA = m::aha;
use AHA = self::m::aha;
let r = match (0,0) {
(0, AHA) => 0,
(x, y) => 1 + x + y,
@ -53,12 +53,12 @@ fn g() {
fn h() {
let r = match (0,0) {
(0, m::aha) => 0,
(0, self::m::aha) => 0,
(x, y) => 1 + x + y,
};
assert!(r == 1);
let r = match (0,7) {
(0, m::aha) => 0,
(0, self::m::aha) => 0,
(x, y) => 1 + x + y,
};
assert!(r == 0);