Returns true if all the bits in the bitmap are equal to 'value'.
| 33 | |
| 34 | // Returns true if all the bits in the bitmap are equal to 'value'. |
| 35 | bool CheckAll(const Bitmap& bitmap, const bool value) { |
| 36 | for (int64_t i = 0; i < bitmap.num_bits(); ++i) { |
| 37 | if (bitmap.Get(i) != value) return false; |
| 38 | } |
| 39 | return true; |
| 40 | } |
| 41 | |
| 42 | TEST(Bitmap, SetupTest) { |
| 43 | Bitmap bm1(0); |