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

Unified Diff: vm/bit_vector_test.cc

Issue 10539108: First step to SSA construction: Phi insertion. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: addressed comments, fixed bug in BitVector::Contains Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/bit_vector.h ('k') | vm/flow_graph_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/bit_vector_test.cc
===================================================================
--- vm/bit_vector_test.cc (revision 8546)
+++ vm/bit_vector_test.cc (working copy)
@@ -11,6 +11,8 @@
TEST_CASE(BitVector) {
{ BitVector* v = new BitVector(15);
v->Add(1);
+ EXPECT_EQ(true, v->Contains(1));
+ EXPECT_EQ(false, v->Contains(0));
{ BitVector::Iterator iter(v);
EXPECT_EQ(1, iter.Current());
iter.Advance();
@@ -18,6 +20,8 @@
}
v->Add(0);
v->Add(1);
+ EXPECT_EQ(true, v->Contains(0));
+ EXPECT_EQ(true, v->Contains(1));
{ BitVector::Iterator iter(v);
EXPECT_EQ(0, iter.Current());
iter.Advance();
@@ -32,6 +36,11 @@
v->Add(62);
v->Add(63);
v->Add(65);
+ EXPECT_EQ(true, v->Contains(49));
+ EXPECT_EQ(true, v->Contains(62));
+ EXPECT_EQ(true, v->Contains(63));
+ EXPECT_EQ(true, v->Contains(65));
+ EXPECT_EQ(false, v->Contains(64));
BitVector::Iterator iter(v);
EXPECT_EQ(49, iter.Current());
iter.Advance();
« no previous file with comments | « vm/bit_vector.h ('k') | vm/flow_graph_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698