-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added positive tests for integer literal base interpretation.
- Loading branch information
1 parent
66abb92
commit 6eba332
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
pub fn main() { | ||
let a = 0xBEEF; | ||
let b = 0o755; | ||
let c = 0b10101; | ||
let d = -0xBEEF; | ||
let e = -0o755; | ||
let f = -0b10101; | ||
|
||
assert_eq!(a, 48879); | ||
assert_eq!(b, 493); | ||
assert_eq!(c, 21); | ||
assert_eq!(d, -48879); | ||
assert_eq!(e, -493); | ||
assert_eq!(f, -21); | ||
|
||
|
||
} |
6eba332
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from brson
at https://github.com/mattcarberry/rust/commit/6eba332d0e7d4915184c9952b73643b59db9c417
6eba332
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging mattcarberry/rust/master = 6eba332 into auto
6eba332
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mattcarberry/rust/master = 6eba332 merged ok, testing candidate = 5619c460
6eba332
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some tests failed:
failure: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/1466
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/2356
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-c/builds/202
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/202
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/2360
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/1466
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/1465
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/2374
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/1466
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/1466
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/2375
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/1466
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/1466
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/1542
exception: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/2360
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/1464
exception: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/2138
6eba332
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from brson
at https://github.com/mattcarberry/rust/commit/6eba332d0e7d4915184c9952b73643b59db9c417
6eba332
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging mattcarberry/rust/master = 6eba332 into auto
6eba332
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mattcarberry/rust/master = 6eba332 merged ok, testing candidate = f00bb2e
6eba332
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/2358
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-c/builds/204
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/204
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/2362
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/1468
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/1467
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/2376
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/1468
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/1468
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/2377
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/1468
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/1468
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/1544
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/2362
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/1466
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/1468
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/2140
6eba332
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = f00bb2e