]> git.proxmox.com Git - rustc.git/blob - src/test/ui/structs-enums/enum-disr-val-pretty.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / structs-enums / enum-disr-val-pretty.rs
1 // run-pass
2 #![allow(non_camel_case_types)]
3 // pp-exact
4
5
6 enum color { red = 1, green, blue, imaginary = -1, }
7
8 pub fn main() {
9 test_color(color::red, 1, "red".to_string());
10 test_color(color::green, 2, "green".to_string());
11 test_color(color::blue, 3, "blue".to_string());
12 test_color(color::imaginary, -1, "imaginary".to_string());
13 }
14
15 fn test_color(color: color, val: isize, _name: String) {
16 assert_eq!(color as isize , val);
17 }