Fixes #1499: a test that shape code can walk explicit disr values

This commit is contained in:
Niko Matsakis 2012-01-13 13:56:50 -08:00
parent 6c05214ef8
commit 31bb6a60bb

View 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];
}