Skip to content

Commit f24c881

Browse files
committed
---
yaml --- r: 7804 b: refs/heads/snap-stage3 c: 19a9a47 h: refs/heads/master v: v3
1 parent b73157a commit f24c881

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: ba7299ba6576b2dcc63d76a72ca5cc589dcf199d
4+
refs/heads/snap-stage3: 19a9a475a624ac8d0b73e126cc8b9670629429a0
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/src/test/run-pass/tag-variant-disr-val.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ enum color {
55
black = 0x000000,
66
white = 0xFFFFFF,
77
imaginary = -1,
8+
purple = 1 << 1,
9+
orange = 8 >> 1
810
}
911

1012
fn main() {
@@ -14,6 +16,8 @@ fn main() {
1416
test_color(black, 0x000000, "black");
1517
test_color(white, 0xFFFFFF, "white");
1618
test_color(imaginary, -1, "imaginary");
19+
test_color(purple, 2, "purple");
20+
test_color(orange, 4, "orange");
1721
}
1822

1923
fn test_color(color: color, val: int, name: str) unsafe {
@@ -32,6 +36,8 @@ fn get_color_alt(color: color) -> str {
3236
black {"black"}
3337
white {"white"}
3438
imaginary {"imaginary"}
39+
purple {"purple"}
40+
orange {"orange"}
3541
_ {"unknown"}
3642
}
3743
}
@@ -43,6 +49,8 @@ fn get_color_if(color: color) -> str {
4349
else if color == black {"black"}
4450
else if color == white {"white"}
4551
else if color == imaginary {"imaginary"}
52+
else if color == purple {"purple"}
53+
else if color == orange {"orange"}
4654
else {"unknown"}
4755
}
4856

0 commit comments

Comments
 (0)