Index: runtime/vm/object_id_ring_test.cc |
diff --git a/runtime/vm/object_id_ring_test.cc b/runtime/vm/object_id_ring_test.cc |
index 27347ea9b0f46d7ec6ffbe037940f9206dc0db5e..e2eda2e17d0960a850bf12b0833287bb2628c061 100644 |
--- a/runtime/vm/object_id_ring_test.cc |
+++ b/runtime/vm/object_id_ring_test.cc |
@@ -48,7 +48,7 @@ class ObjectIdRingTestHelper { |
// Test that serial number wrapping works. |
-TEST_CASE(ObjectIdRingSerialWrapTest) { |
+VM_TEST_CASE(ObjectIdRingSerialWrapTest) { |
Isolate* isolate = Isolate::Current(); |
ObjectIdRing* ring = isolate->object_id_ring(); |
ObjectIdRingTestHelper::SetCapacityAndMaxSerial(ring, 2, 4); |
@@ -160,8 +160,11 @@ TEST_CASE(ObjectIdRingScavengeMoveTest) { |
EXPECT_NE(Object::null(), raw_obj2); |
EXPECT_EQ(RawObject::ToAddr(raw_obj), RawObject::ToAddr(raw_obj1)); |
EXPECT_EQ(RawObject::ToAddr(raw_obj), RawObject::ToAddr(raw_obj2)); |
- // Force a scavenge. |
- heap->CollectGarbage(Heap::kNew); |
+ { |
+ TransitionNativeToVM transition(thread); |
+ // Force a scavenge. |
+ heap->CollectGarbage(Heap::kNew); |
+ } |
RawObject* raw_object_moved1 = ring->GetObjectForId(raw_obj_id1, &kind); |
EXPECT_EQ(ObjectIdRing::kValid, kind); |
RawObject* raw_object_moved2 = ring->GetObjectForId(raw_obj_id2, &kind); |
@@ -187,7 +190,7 @@ TEST_CASE(ObjectIdRingScavengeMoveTest) { |
// Test that the ring table is updated with nulls when the old GC collects. |
-TEST_CASE(ObjectIdRingOldGCTest) { |
+VM_TEST_CASE(ObjectIdRingOldGCTest) { |
Isolate* isolate = thread->isolate(); |
Heap* heap = isolate->heap(); |
ObjectIdRing* ring = isolate->object_id_ring(); |
@@ -241,7 +244,7 @@ TEST_CASE(ObjectIdRingOldGCTest) { |
// Test that the ring table correctly reports an entry as expired when it is |
// overridden by new entries. |
-TEST_CASE(ObjectIdRingExpiredEntryTest) { |
+VM_TEST_CASE(ObjectIdRingExpiredEntryTest) { |
Isolate* isolate = Isolate::Current(); |
ObjectIdRing* ring = isolate->object_id_ring(); |