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

Unified Diff: runtime/vm/bit_vector_test.cc

Issue 587873003: Pass isolate to BitVector constructor. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/bit_vector.h ('k') | runtime/vm/flow_graph.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/bit_vector_test.cc
===================================================================
--- runtime/vm/bit_vector_test.cc (revision 40526)
+++ runtime/vm/bit_vector_test.cc (working copy)
@@ -8,8 +8,10 @@
namespace dart {
+#define I Isolate::Current()
+
TEST_CASE(BitVector) {
- { BitVector* v = new BitVector(15);
+ { BitVector* v = new BitVector(I, 15);
v->Add(1);
EXPECT_EQ(true, v->Contains(1));
EXPECT_EQ(false, v->Contains(0));
@@ -31,7 +33,7 @@
}
}
- { BitVector* v = new BitVector(128);
+ { BitVector* v = new BitVector(I, 128);
v->Add(49);
v->Add(62);
v->Add(63);
@@ -53,9 +55,9 @@
EXPECT(iter.Done());
}
- { BitVector* a = new BitVector(128);
- BitVector* b = new BitVector(128);
- BitVector* c = new BitVector(128);
+ { BitVector* a = new BitVector(I, 128);
+ BitVector* b = new BitVector(I, 128);
+ BitVector* c = new BitVector(I, 128);
b->Add(0);
b->Add(32);
b->Add(64);
@@ -84,8 +86,8 @@
EXPECT_EQ(false, a->Contains(96));
}
- { BitVector* a = new BitVector(34);
- BitVector* b = new BitVector(34);
+ { BitVector* a = new BitVector(I, 34);
+ BitVector* b = new BitVector(I, 34);
a->SetAll();
b->Add(0);
b->Add(1);
@@ -95,16 +97,16 @@
EXPECT_EQ(true, a->Equals(*b));
}
- { BitVector* a = new BitVector(2);
- BitVector* b = new BitVector(2);
+ { BitVector* a = new BitVector(I, 2);
+ BitVector* b = new BitVector(I, 2);
a->SetAll();
a->Remove(0);
a->Remove(1);
EXPECT_EQ(true, a->Equals(*b));
}
- { BitVector* a = new BitVector(128);
- BitVector* b = new BitVector(128);
+ { BitVector* a = new BitVector(I, 128);
+ BitVector* b = new BitVector(I, 128);
b->Add(0);
b->Add(32);
b->Add(64);
« no previous file with comments | « runtime/vm/bit_vector.h ('k') | runtime/vm/flow_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698