From 31244b4cde9156632a08103a8bf1cbff4cbae3cc Mon Sep 17 00:00:00 2001 From: Aart Bik Date: Tue, 19 Apr 2016 15:07:23 -0700 Subject: Do not use EXPECT_DEATH in unit test, fails on device. Change-Id: I77ff843edb416fae72e7bbf66a6151405dab81b0 --- .../optimizing/reference_type_propagation_test.cc | 30 ---------------------- 1 file changed, 30 deletions(-) (limited to 'compiler') diff --git a/compiler/optimizing/reference_type_propagation_test.cc b/compiler/optimizing/reference_type_propagation_test.cc index 99d5f822c1..4653e2f8cc 100644 --- a/compiler/optimizing/reference_type_propagation_test.cc +++ b/compiler/optimizing/reference_type_propagation_test.cc @@ -61,16 +61,6 @@ class ReferenceTypePropagationTest : public CommonCompilerTest { return ReferenceTypeInfo::Create(propagation_->handle_cache_.GetStringClassHandle(), is_exact); } - // Helper method to construct the Throwable type. - ReferenceTypeInfo ThrowableType(bool is_exact = true) SHARED_REQUIRES(Locks::mutator_lock_) { - return ReferenceTypeInfo::Create(propagation_->handle_cache_.GetThrowableClassHandle(), is_exact); - } - - // Helper method to provide access to Throwable handle. - Handle GetThrowableHandle() { - return propagation_->handle_cache_.GetThrowableClassHandle(); - } - // General building fields. ArenaPool pool_; ArenaAllocator allocator_; @@ -124,26 +114,6 @@ TEST_F(ReferenceTypePropagationTest, MergeInvalidTypes) { EXPECT_TRUE(t5.IsEqual(StringType())); } -TEST_F(ReferenceTypePropagationTest, CreateErroneousType) { - ScopedObjectAccess soa(Thread::Current()); - StackHandleScopeCollection handles(soa.Self()); - SetupPropagation(&handles); - - // Some trickery to make the runtime think something went wrong with loading - // the throwable class, making this an erroneous type from here on. - soa.Self()->SetException(Thread::GetDeoptimizationException()); - Handle klass = GetThrowableHandle(); - ObjectLock lock(soa.Self(), klass); - mirror::Class::SetStatus(klass, mirror::Class::kStatusError, soa.Self()); - soa.Self()->ClearException(); - ASSERT_TRUE(klass->IsErroneous()); - - // Trying to get an erroneous type crashes (debug mode only). - if (kIsDebugBuild) { - EXPECT_DEATH(ThrowableType(), "Check failed: !type_handle->IsErroneous()"); - } -} - TEST_F(ReferenceTypePropagationTest, MergeValidTypes) { ScopedObjectAccess soa(Thread::Current()); StackHandleScopeCollection handles(soa.Self()); -- cgit v1.2.3-59-g8ed1b