File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
branches/snap-stage3/src/test/run-pass Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: ba7299ba6576b2dcc63d76a72ca5cc589dcf199d
4
+ refs/heads/snap-stage3: 19a9a475a624ac8d0b73e126cc8b9670629429a0
5
5
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ enum color {
5
5
black = 0x000000 ,
6
6
white = 0xFFFFFF ,
7
7
imaginary = -1 ,
8
+ purple = 1 << 1 ,
9
+ orange = 8 >> 1
8
10
}
9
11
10
12
fn main ( ) {
@@ -14,6 +16,8 @@ fn main() {
14
16
test_color ( black, 0x000000 , "black" ) ;
15
17
test_color ( white, 0xFFFFFF , "white" ) ;
16
18
test_color ( imaginary, -1 , "imaginary" ) ;
19
+ test_color ( purple, 2 , "purple" ) ;
20
+ test_color ( orange, 4 , "orange" ) ;
17
21
}
18
22
19
23
fn test_color ( color : color , val : int , name : str ) unsafe {
@@ -32,6 +36,8 @@ fn get_color_alt(color: color) -> str {
32
36
black { "black"}
33
37
white { "white"}
34
38
imaginary { "imaginary"}
39
+ purple { "purple"}
40
+ orange { "orange"}
35
41
_ { "unknown"}
36
42
}
37
43
}
@@ -43,6 +49,8 @@ fn get_color_if(color: color) -> str {
43
49
else if color == black { "black" }
44
50
else if color == white { "white" }
45
51
else if color == imaginary { "imaginary" }
52
+ else if color == purple { "purple" }
53
+ else if color == orange { "orange" }
46
54
else { "unknown" }
47
55
}
48
56
You can’t perform that action at this time.
0 commit comments