Lines Matching refs:b1
29 BitSet32 b1; member in android::BitSet32Test
32 b1.clear(); in TearDown()
39 b1.markBit(2); in TEST_F()
42 BitSet32 tmp = b1 | b2; in TEST_F()
46 EXPECT_TRUE((b2 | b1) == (b1 | b2)); in TEST_F()
48 b1 |= b2; in TEST_F()
49 EXPECT_EQ(b1.count(), 2u); in TEST_F()
50 EXPECT_TRUE(b1.hasBit(2) && b1.hasBit(4)); in TEST_F()
54 b1.markBit(2); in TEST_F()
55 b1.markBit(4); in TEST_F()
56 b1.markBit(6); in TEST_F()
58 BitSet32 tmp = b1 & b2; in TEST_F()
61 EXPECT_TRUE((b2 & b1) == (b1 & b2)); in TEST_F()
63 b2 &= b1; in TEST_F()
65 EXPECT_EQ(b1.count(), 3u); in TEST_F()
66 EXPECT_TRUE(b1.hasBit(2) && b1.hasBit(4) && b1.hasBit(6)); in TEST_F()
70 b1.markBit(2); in TEST_F()
71 b1.markBit(4); in TEST_F()
72 b1.markBit(6); in TEST_F()
77 BitSet32 tmp = b1 & b2; in TEST_F()
81 EXPECT_TRUE((b2 & b1) == (b1 & b2)); in TEST_F()
83 b1 &= b2; in TEST_F()
84 EXPECT_EQ(b1.count(), 1u); in TEST_F()
90 b1.markBit(1); in TEST_F()
92 b1.markFirstUnmarkedBit(); in TEST_F()
93 EXPECT_EQ(b1.count(), 2u); in TEST_F()
94 EXPECT_TRUE(b1.hasBit(0) && b1.hasBit(1)); in TEST_F()
96 b1.markFirstUnmarkedBit(); in TEST_F()
97 EXPECT_EQ(b1.count(), 3u); in TEST_F()
98 EXPECT_TRUE(b1.hasBit(0) && b1.hasBit(1) && b1.hasBit(2)); in TEST_F()
102 b1.markBit(0); in TEST_F()
103 b1.markBit(10); in TEST_F()
105 b1.clearFirstMarkedBit(); in TEST_F()
106 EXPECT_EQ(b1.count(), 1u); in TEST_F()
107 EXPECT_TRUE(b1.hasBit(10)); in TEST_F()
109 b1.markBit(30); in TEST_F()
110 b1.clearFirstMarkedBit(); in TEST_F()
111 EXPECT_EQ(b1.count(), 1u); in TEST_F()
112 EXPECT_TRUE(b1.hasBit(30)); in TEST_F()
116 b1.markBit(10); in TEST_F()
117 b1.markBit(31); in TEST_F()
119 b1.clearLastMarkedBit(); in TEST_F()
120 EXPECT_EQ(b1.count(), 1u); in TEST_F()
121 EXPECT_TRUE(b1.hasBit(10)); in TEST_F()
123 b1.markBit(5); in TEST_F()
124 b1.clearLastMarkedBit(); in TEST_F()
125 EXPECT_EQ(b1.count(), 1u); in TEST_F()
126 EXPECT_TRUE(b1.hasBit(5)); in TEST_F()
130 EXPECT_TRUE(b1.isEmpty()); in TEST_F()
132 b1.markFirstUnmarkedBit(); in TEST_F()
134 EXPECT_TRUE(b1.isFull()); in TEST_F()
135 b1.clear(); in TEST_F()
136 EXPECT_TRUE(b1.isEmpty()); in TEST_F()
140 b1.markBit(1); in TEST_F()
141 b1.markBit(4); in TEST_F()
142 EXPECT_EQ(0U, b1.getIndexOfBit(1)); in TEST_F()
143 EXPECT_EQ(1U, b1.getIndexOfBit(4)); in TEST_F()
144 b1.markFirstUnmarkedBit(); in TEST_F()
145 EXPECT_EQ(1U, b1.getIndexOfBit(1)); in TEST_F()
146 EXPECT_EQ(2U, b1.getIndexOfBit(4)); in TEST_F()
151 BitSet64 b1; member in android::BitSet64Test
154 b1.clear(); in TearDown()
161 b1.markBit(20); in TEST_F()
164 BitSet64 tmp = b1 | b2; in TEST_F()
168 EXPECT_TRUE((b2 | b1) == (b1 | b2)); in TEST_F()
170 b1 |= b2; in TEST_F()
171 EXPECT_EQ(b1.count(), 2u); in TEST_F()
172 EXPECT_TRUE(b1.hasBit(20) && b1.hasBit(40)); in TEST_F()
176 b1.markBit(20); in TEST_F()
177 b1.markBit(40); in TEST_F()
178 b1.markBit(60); in TEST_F()
180 BitSet64 tmp = b1 & b2; in TEST_F()
183 EXPECT_TRUE((b2 & b1) == (b1 & b2)); in TEST_F()
185 b2 &= b1; in TEST_F()
187 EXPECT_EQ(b1.count(), 3u); in TEST_F()
188 EXPECT_TRUE(b1.hasBit(20) && b1.hasBit(40) && b1.hasBit(60)); in TEST_F()
192 b1.markBit(20); in TEST_F()
193 b1.markBit(40); in TEST_F()
194 b1.markBit(60); in TEST_F()
199 BitSet64 tmp = b1 & b2; in TEST_F()
203 EXPECT_TRUE((b2 & b1) == (b1 & b2)); in TEST_F()
205 b1 &= b2; in TEST_F()
206 EXPECT_EQ(b1.count(), 1u); in TEST_F()
212 b1.markBit(1); in TEST_F()
214 b1.markFirstUnmarkedBit(); in TEST_F()
215 EXPECT_EQ(b1.count(), 2u); in TEST_F()
216 EXPECT_TRUE(b1.hasBit(0) && b1.hasBit(1)); in TEST_F()
218 b1.markFirstUnmarkedBit(); in TEST_F()
219 EXPECT_EQ(b1.count(), 3u); in TEST_F()
220 EXPECT_TRUE(b1.hasBit(0) && b1.hasBit(1) && b1.hasBit(2)); in TEST_F()
224 b1.markBit(0); in TEST_F()
225 b1.markBit(10); in TEST_F()
227 b1.clearFirstMarkedBit(); in TEST_F()
228 EXPECT_EQ(b1.count(), 1u); in TEST_F()
229 EXPECT_TRUE(b1.hasBit(10)); in TEST_F()
231 b1.markBit(50); in TEST_F()
232 b1.clearFirstMarkedBit(); in TEST_F()
233 EXPECT_EQ(b1.count(), 1u); in TEST_F()
234 EXPECT_TRUE(b1.hasBit(50)); in TEST_F()
238 b1.markBit(10); in TEST_F()
239 b1.markBit(63); in TEST_F()
241 b1.clearLastMarkedBit(); in TEST_F()
242 EXPECT_EQ(b1.count(), 1u); in TEST_F()
243 EXPECT_TRUE(b1.hasBit(10)); in TEST_F()
245 b1.markBit(5); in TEST_F()
246 b1.clearLastMarkedBit(); in TEST_F()
247 EXPECT_EQ(b1.count(), 1u); in TEST_F()
248 EXPECT_TRUE(b1.hasBit(5)); in TEST_F()
252 EXPECT_TRUE(b1.isEmpty()); in TEST_F()
254 b1.markFirstUnmarkedBit(); in TEST_F()
256 EXPECT_TRUE(b1.isFull()); in TEST_F()
257 b1.clear(); in TEST_F()
258 EXPECT_TRUE(b1.isEmpty()); in TEST_F()
262 b1.markBit(10); in TEST_F()
263 b1.markBit(40); in TEST_F()
264 EXPECT_EQ(0U, b1.getIndexOfBit(10)); in TEST_F()
265 EXPECT_EQ(1U, b1.getIndexOfBit(40)); in TEST_F()
266 b1.markFirstUnmarkedBit(); in TEST_F()
267 EXPECT_EQ(1U, b1.getIndexOfBit(10)); in TEST_F()
268 EXPECT_EQ(2U, b1.getIndexOfBit(40)); in TEST_F()