| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 EXPECT_EQ(true, a->Equals(*b)); | 95 EXPECT_EQ(true, a->Equals(*b)); |
| 96 } | 96 } |
| 97 | 97 |
| 98 { BitVector* a = new BitVector(2); | 98 { BitVector* a = new BitVector(2); |
| 99 BitVector* b = new BitVector(2); | 99 BitVector* b = new BitVector(2); |
| 100 a->SetAll(); | 100 a->SetAll(); |
| 101 a->Remove(0); | 101 a->Remove(0); |
| 102 a->Remove(1); | 102 a->Remove(1); |
| 103 EXPECT_EQ(true, a->Equals(*b)); | 103 EXPECT_EQ(true, a->Equals(*b)); |
| 104 } | 104 } |
| 105 |
| 106 { BitVector* a = new BitVector(128); |
| 107 BitVector* b = new BitVector(128); |
| 108 b->Add(0); |
| 109 b->Add(32); |
| 110 b->Add(64); |
| 111 a->Add(0); |
| 112 a->Add(64); |
| 113 b->RemoveAll(a); |
| 114 EXPECT_EQ(false, b->Contains(0)); |
| 115 EXPECT_EQ(true, b->Contains(32)); |
| 116 EXPECT_EQ(false, b->Contains(64)); |
| 117 } |
| 105 } | 118 } |
| 106 | 119 |
| 107 } // namespace dart | 120 } // namespace dart |
| OLD | NEW |