Fixes #1499: a test that shape code can walk explicit disr values
This commit is contained in:
parent
6c05214ef8
commit
31bb6a60bb
14
src/test/run-pass/tag-disr-val-shape.rs
Normal file
14
src/test/run-pass/tag-disr-val-shape.rs
Normal file
@ -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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user