diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2013-10-01 02:03:43 +0200 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2013-10-01 02:03:43 +0200 |
| commit | e2be7aca08f5eac1c0a0eae589c916fc39d57193 (patch) | |
| tree | 4c97c8c27bc9d1159b49e7d13744676ab94a78f6 | |
| parent | c0599b1bbbf9e4dcfb05a06aa2eef900aa9e4965 (diff) | |
| download | rust-e2be7aca08f5eac1c0a0eae589c916fc39d57193.tar.gz rust-e2be7aca08f5eac1c0a0eae589c916fc39d57193.zip | |
Expanded test to clarify that the constants *are* matching when they should.
| -rw-r--r-- | src/test/run-pass/match-static-const-rename.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/run-pass/match-static-const-rename.rs b/src/test/run-pass/match-static-const-rename.rs index 0d3dd25ef9c..3da4e0505bb 100644 --- a/src/test/run-pass/match-static-const-rename.rs +++ b/src/test/run-pass/match-static-const-rename.rs @@ -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 () { |
