diff options
Diffstat (limited to 'runtime/mirror/object_test.cc')
-rw-r--r-- | runtime/mirror/object_test.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/runtime/mirror/object_test.cc b/runtime/mirror/object_test.cc index 1cb22f2a5e..45a0437747 100644 --- a/runtime/mirror/object_test.cc +++ b/runtime/mirror/object_test.cc @@ -158,17 +158,17 @@ TEST_F(ObjectTest, AllocArray) { MutableHandle<Class> c = hs.NewHandle(class_linker_->FindSystemClass(soa.Self(), "[I")); gc::AllocatorType allocator_type = Runtime::Current()->GetHeap()->GetCurrentAllocator(); MutableHandle<Array> a = hs.NewHandle( - Array::Alloc<true>(soa.Self(), c.Get(), 1, c->GetComponentSizeShift(), allocator_type)); + Array::Alloc(soa.Self(), c.Get(), 1, c->GetComponentSizeShift(), allocator_type)); EXPECT_TRUE(c.Get() == a->GetClass()); EXPECT_EQ(1, a->GetLength()); c.Assign(class_linker_->FindSystemClass(soa.Self(), "[Ljava/lang/Object;")); - a.Assign(Array::Alloc<true>(soa.Self(), c.Get(), 1, c->GetComponentSizeShift(), allocator_type)); + a.Assign(Array::Alloc(soa.Self(), c.Get(), 1, c->GetComponentSizeShift(), allocator_type)); EXPECT_TRUE(c.Get() == a->GetClass()); EXPECT_EQ(1, a->GetLength()); c.Assign(class_linker_->FindSystemClass(soa.Self(), "[[Ljava/lang/Object;")); - a.Assign(Array::Alloc<true>(soa.Self(), c.Get(), 1, c->GetComponentSizeShift(), allocator_type)); + a.Assign(Array::Alloc(soa.Self(), c.Get(), 1, c->GetComponentSizeShift(), allocator_type)); EXPECT_TRUE(c.Get() == a->GetClass()); EXPECT_EQ(1, a->GetLength()); } @@ -179,25 +179,26 @@ TEST_F(ObjectTest, AllocArray_FillUsable) { MutableHandle<Class> c = hs.NewHandle(class_linker_->FindSystemClass(soa.Self(), "[B")); gc::AllocatorType allocator_type = Runtime::Current()->GetHeap()->GetCurrentAllocator(); MutableHandle<Array> a = hs.NewHandle( - Array::Alloc<true, true>(soa.Self(), c.Get(), 1, c->GetComponentSizeShift(), allocator_type)); + Array::Alloc</*kIsInstrumented=*/ true, /*kFillUsable=*/ true>( + soa.Self(), c.Get(), 1, c->GetComponentSizeShift(), allocator_type)); EXPECT_TRUE(c.Get() == a->GetClass()); EXPECT_LE(1, a->GetLength()); c.Assign(class_linker_->FindSystemClass(soa.Self(), "[I")); - a.Assign( - Array::Alloc<true, true>(soa.Self(), c.Get(), 2, c->GetComponentSizeShift(), allocator_type)); + a.Assign(Array::Alloc</*kIsInstrumented=*/ true, /*kFillUsable=*/ true>( + soa.Self(), c.Get(), 2, c->GetComponentSizeShift(), allocator_type)); EXPECT_TRUE(c.Get() == a->GetClass()); EXPECT_LE(2, a->GetLength()); c.Assign(class_linker_->FindSystemClass(soa.Self(), "[Ljava/lang/Object;")); - a.Assign( - Array::Alloc<true, true>(soa.Self(), c.Get(), 2, c->GetComponentSizeShift(), allocator_type)); + a.Assign(Array::Alloc</*kIsInstrumented=*/ true, /*kFillUsable=*/ true>( + soa.Self(), c.Get(), 2, c->GetComponentSizeShift(), allocator_type)); EXPECT_TRUE(c.Get() == a->GetClass()); EXPECT_LE(2, a->GetLength()); c.Assign(class_linker_->FindSystemClass(soa.Self(), "[[Ljava/lang/Object;")); - a.Assign( - Array::Alloc<true, true>(soa.Self(), c.Get(), 2, c->GetComponentSizeShift(), allocator_type)); + a.Assign(Array::Alloc</*kIsInstrumented=*/ true, /*kFillUsable=*/ true>( + soa.Self(), c.Get(), 2, c->GetComponentSizeShift(), allocator_type)); EXPECT_TRUE(c.Get() == a->GetClass()); EXPECT_LE(2, a->GetLength()); } |