mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 05:57:03 +03:00
Fixes #1499: a test that shape code can walk explicit disr values
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
tag color {
|
||||
red = 0xff0000;
|
||||
green = 0x00ff00;
|
||||
blue = 0x0000ff;
|
||||
black = 0x000000;
|
||||
white = 0xFFFFFF;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
assert uint::to_str(red as uint, 10u) == #fmt["%?", red];
|
||||
assert uint::to_str(green as uint, 10u) == #fmt["%?", green];
|
||||
assert uint::to_str(white as uint, 10u) == #fmt["%?", white];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user