From 9b81ac36e161fd993eab17b43b93a96e8c63b5cc Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 16 May 2019 16:47:08 +0100 Subject: Add default argument kIsInstrumented=true. kIsInstrumented=false is reserved for use by specialized entrypoints which are used only when we can ensure that the code is not instrumented. So add the default argument to simplify all other callers. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I3419795794fec9a1733ab3ad698b6415dbac679d --- runtime/mirror/object_test.cc | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'runtime/mirror/object_test.cc') 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 c = hs.NewHandle(class_linker_->FindSystemClass(soa.Self(), "[I")); gc::AllocatorType allocator_type = Runtime::Current()->GetHeap()->GetCurrentAllocator(); MutableHandle a = hs.NewHandle( - Array::Alloc(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(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(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 c = hs.NewHandle(class_linker_->FindSystemClass(soa.Self(), "[B")); gc::AllocatorType allocator_type = Runtime::Current()->GetHeap()->GetCurrentAllocator(); MutableHandle a = hs.NewHandle( - Array::Alloc(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_LE(1, a->GetLength()); c.Assign(class_linker_->FindSystemClass(soa.Self(), "[I")); - a.Assign( - Array::Alloc(soa.Self(), c.Get(), 2, c->GetComponentSizeShift(), allocator_type)); + a.Assign(Array::Alloc( + 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(soa.Self(), c.Get(), 2, c->GetComponentSizeShift(), allocator_type)); + a.Assign(Array::Alloc( + 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(soa.Self(), c.Get(), 2, c->GetComponentSizeShift(), allocator_type)); + a.Assign(Array::Alloc( + soa.Self(), c.Get(), 2, c->GetComponentSizeShift(), allocator_type)); EXPECT_TRUE(c.Get() == a->GetClass()); EXPECT_LE(2, a->GetLength()); } -- cgit v1.2.3-59-g8ed1b