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

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

Issue 1310463005: - Ensure that HandleScope is initialized with a thread. (Remove (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments Created 5 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
« no previous file with comments | « runtime/vm/benchmark_test.cc ('k') | runtime/vm/bootstrap.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
11 #define Z Thread::Current()->zone() 11 #define Z (thread->zone())
12 12
13 TEST_CASE(BitVector) { 13 TEST_CASE(BitVector) {
14 { BitVector* v = new BitVector(Z, 15); 14 { BitVector* v = new BitVector(Z, 15);
15 v->Add(1); 15 v->Add(1);
16 EXPECT_EQ(true, v->Contains(1)); 16 EXPECT_EQ(true, v->Contains(1));
17 EXPECT_EQ(false, v->Contains(0)); 17 EXPECT_EQ(false, v->Contains(0));
18 { BitVector::Iterator iter(v); 18 { BitVector::Iterator iter(v);
19 EXPECT_EQ(1, iter.Current()); 19 EXPECT_EQ(1, iter.Current());
20 iter.Advance(); 20 iter.Advance();
21 EXPECT(iter.Done()); 21 EXPECT(iter.Done());
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 a->Add(0); 113 a->Add(0);
114 a->Add(64); 114 a->Add(64);
115 b->RemoveAll(a); 115 b->RemoveAll(a);
116 EXPECT_EQ(false, b->Contains(0)); 116 EXPECT_EQ(false, b->Contains(0));
117 EXPECT_EQ(true, b->Contains(32)); 117 EXPECT_EQ(true, b->Contains(32));
118 EXPECT_EQ(false, b->Contains(64)); 118 EXPECT_EQ(false, b->Contains(64));
119 } 119 }
120 } 120 }
121 121
122 } // namespace dart 122 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/benchmark_test.cc ('k') | runtime/vm/bootstrap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698