1mod all;
2mod bits;
3mod complement;
4mod contains;
5mod difference;
6mod empty;
7mod eq;
8mod extend;
9mod flags;
10mod fmt;
11mod from_bits;
12mod from_bits_retain;
13mod from_bits_truncate;
14mod from_name;
15mod insert;
16mod intersection;
17mod intersects;
18mod is_all;
19mod is_empty;
20mod iter;
21mod parser;
22mod remove;
23mod symmetric_difference;
24mod union;
25
26bitflags! {
27 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
28 pub struct TestFlags: u8 {
29 /// 1
30 const A = 1;
31
32 /// 1 << 1
33 const B = 1 << 1;
34
35 /// 1 << 2
36 const C = 1 << 2;
37
38 /// 1 | (1 << 1) | (1 << 2)
39 const ABC = Self::A.bits() | Self::B.bits() | Self::C.bits();
40 }
41
42 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
43 pub struct TestFlagsInvert: u8 {
44 /// 1 | (1 << 1) | (1 << 2)
45 const ABC = Self::A.bits() | Self::B.bits() | Self::C.bits();
46
47 /// 1
48 const A = 1;
49
50 /// 1 << 1
51 const B = 1 << 1;
52
53 /// 1 << 2
54 const C = 1 << 2;
55 }
56
57 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
58 pub struct TestZero: u8 {
59 /// 0
60 const ZERO = 0;
61 }
62
63 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
64 pub struct TestZeroOne: u8 {
65 /// 0
66 const ZERO = 0;
67
68 /// 1
69 const ONE = 1;
70 }
71
72 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
73 pub struct TestUnicode: u8 {
74 /// 1
75 const 一 = 1;
76
77 /// 2
78 const 二 = 1 << 1;
79 }
80
81 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
82 pub struct TestEmpty: u8 {}
83
84 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
85 pub struct TestOverlapping: u8 {
86 /// 1 | (1 << 1)
87 const AB = 1 | (1 << 1);
88
89 /// (1 << 1) | (1 << 2)
90 const BC = (1 << 1) | (1 << 2);
91 }
92
93 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
94 pub struct TestOverlappingFull: u8 {
95 /// 1
96 const A = 1;
97
98 /// 1
99 const B = 1;
100
101 /// 1
102 const C = 1;
103
104 /// 2
105 const D = 1 << 1;
106 }
107
108 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
109 pub struct TestExternal: u8 {
110 /// 1
111 const A = 1;
112
113 /// 1 << 1
114 const B = 1 << 1;
115
116 /// 1 << 2
117 const C = 1 << 2;
118
119 /// 1 | (1 << 1) | (1 << 2)
120 const ABC = Self::A.bits() | Self::B.bits() | Self::C.bits();
121
122 /// External
123 const _ = !0;
124 }
125
126 #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
127 pub struct TestExternalFull: u8 {
128 /// External
129 const _ = !0;
130 }
131}
132