Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1276)

Side by Side Diff: runtime/vm/bit_vector_test.cc

Issue 10914314: Simple redundant load elimination. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/bit_vector.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « runtime/vm/bit_vector.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698