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

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

Issue 1660063002: Remove many features when building product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/object_id_ring.cc ('k') | runtime/vm/object_service.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/globals.h" 6 #include "vm/globals.h"
7 #include "vm/object_id_ring.h" 7 #include "vm/object_id_ring.h"
8 #include "vm/unit_test.h" 8 #include "vm/unit_test.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_api_state.h" 10 #include "vm/dart_api_state.h"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 #ifndef PRODUCT
14 15
15 class ObjectIdRingTestHelper { 16 class ObjectIdRingTestHelper {
16 public: 17 public:
17 static void SetCapacityAndMaxSerial(ObjectIdRing* ring, int32_t capacity, 18 static void SetCapacityAndMaxSerial(ObjectIdRing* ring, int32_t capacity,
18 int32_t max_serial) { 19 int32_t max_serial) {
19 ring->SetCapacityAndMaxSerial(capacity, max_serial); 20 ring->SetCapacityAndMaxSerial(capacity, max_serial);
20 } 21 }
21 22
22 static void ExpectIdIsValid(ObjectIdRing* ring, intptr_t id) { 23 static void ExpectIdIsValid(ObjectIdRing* ring, intptr_t id) {
23 EXPECT(ring->IsValidId(id)); 24 EXPECT(ring->IsValidId(id));
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 EXPECT_EQ(new_obj.raw(), new_obj_lookup); 268 EXPECT_EQ(new_obj.raw(), new_obj_lookup);
268 } 269 }
269 270
270 // Check our first entry reports it has expired. 271 // Check our first entry reports it has expired.
271 obj_lookup = ring->GetObjectForId(obj_id, &kind); 272 obj_lookup = ring->GetObjectForId(obj_id, &kind);
272 EXPECT_EQ(ObjectIdRing::kExpired, kind); 273 EXPECT_EQ(ObjectIdRing::kExpired, kind);
273 EXPECT_NE(obj.raw(), obj_lookup); 274 EXPECT_NE(obj.raw(), obj_lookup);
274 EXPECT_EQ(Object::null(), obj_lookup); 275 EXPECT_EQ(Object::null(), obj_lookup);
275 } 276 }
276 277
278 #endif // !PRODUCT
279
277 } // namespace dart 280 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object_id_ring.cc ('k') | runtime/vm/object_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698