| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/assert.h" | 5 #include "platform/assert.h" |
| 6 #include "vm/bit_vector.h" | 6 #include "vm/bit_vector.h" |
| 7 #include "vm/unit_test.h" | 7 #include "vm/unit_test.h" |
| 8 | 8 |
| 9 namespace dart { | 9 namespace dart { |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 EXPECT_EQ(false, a->Contains(127)); | 76 EXPECT_EQ(false, a->Contains(127)); |
| 77 a->Remove(0); | 77 a->Remove(0); |
| 78 a->Remove(32); | 78 a->Remove(32); |
| 79 a->Remove(64); | 79 a->Remove(64); |
| 80 a->Remove(96); | 80 a->Remove(96); |
| 81 EXPECT_EQ(false, a->Contains(0)); | 81 EXPECT_EQ(false, a->Contains(0)); |
| 82 EXPECT_EQ(false, a->Contains(32)); | 82 EXPECT_EQ(false, a->Contains(32)); |
| 83 EXPECT_EQ(false, a->Contains(64)); | 83 EXPECT_EQ(false, a->Contains(64)); |
| 84 EXPECT_EQ(false, a->Contains(96)); | 84 EXPECT_EQ(false, a->Contains(96)); |
| 85 } | 85 } |
| 86 |
| 87 { BitVector* a = new BitVector(34); |
| 88 BitVector* b = new BitVector(34); |
| 89 a->SetAll(); |
| 90 b->Add(0); |
| 91 b->Add(1); |
| 92 b->Add(31); |
| 93 b->Add(32); |
| 94 a->Intersect(*b); |
| 95 EXPECT_EQ(true, a->Equals(*b)); |
| 96 } |
| 97 |
| 98 { BitVector* a = new BitVector(2); |
| 99 BitVector* b = new BitVector(2); |
| 100 a->SetAll(); |
| 101 a->Remove(0); |
| 102 a->Remove(1); |
| 103 EXPECT_EQ(true, a->Equals(*b)); |
| 104 } |
| 86 } | 105 } |
| 87 | 106 |
| 88 } // namespace dart | 107 } // namespace dart |
| OLD | NEW |