Expanded test to clarify that the constants *are* matching when they should.
This commit is contained in:
parent
c0599b1bbb
commit
e2be7aca08
1 changed files with 15 additions and 0 deletions
|
@ -26,6 +26,11 @@ fn f() {
|
|||
(x, y) => 1 + x + y,
|
||||
};
|
||||
assert!(r == 1);
|
||||
let r = match (0,97) {
|
||||
(0, A) => 0,
|
||||
(x, y) => 1 + x + y,
|
||||
};
|
||||
assert!(r == 0);
|
||||
}
|
||||
|
||||
mod m {
|
||||
|
@ -39,6 +44,11 @@ fn g() {
|
|||
(x, y) => 1 + x + y,
|
||||
};
|
||||
assert!(r == 1);
|
||||
let r = match (0,7) {
|
||||
(0, AHA) => 0,
|
||||
(x, y) => 1 + x + y,
|
||||
};
|
||||
assert!(r == 0);
|
||||
}
|
||||
|
||||
fn h() {
|
||||
|
@ -47,6 +57,11 @@ fn h() {
|
|||
(x, y) => 1 + x + y,
|
||||
};
|
||||
assert!(r == 1);
|
||||
let r = match (0,7) {
|
||||
(0, m::aha) => 0,
|
||||
(x, y) => 1 + x + y,
|
||||
};
|
||||
assert!(r == 0);
|
||||
}
|
||||
|
||||
fn main () {
|
||||
|
|
Loading…
Add table
Reference in a new issue