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

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: 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
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(33);
88 BitVector* b = new BitVector(33);
89 a->SetAll();
90 b->Add(0);
91 b->Add(1);
92 b->Add(31);
93 b->Add(32);
94 EXPECT_EQ(true, a->Intersect(*b));
95 EXPECT_EQ(true, a->Equals(*b));
96 }
86 } 97 }
87 98
88 } // namespace dart 99 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698