diff options
author | Steve Kondik <steve@cyngn.com> | 2016-03-10 18:21:38 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-03-10 18:21:38 -0800 |
commit | 72904992b3e2803487c0deda965dc510d6d84fb5 (patch) | |
tree | 2ef063562534217cb088db5e45010153bd18a6cb /luni/src/test/java/libcore/java/lang/ref/FinalizeTest.java | |
parent | 333a40eacb56043cd8fa0e3e1556a0baead1ccf1 (diff) | |
parent | e7bdc26218b2f0fa323778de1ff1449f4c5f5a52 (diff) | |
download | libcore-72904992b3e2803487c0deda965dc510d6d84fb5.zip libcore-72904992b3e2803487c0deda965dc510d6d84fb5.tar.gz libcore-72904992b3e2803487c0deda965dc510d6d84fb5.tar.bz2 |
Merge tag 'android-6.0.1_r22' of https://android.googlesource.com/platform/libcore into cm-13.0
Android 6.0.1 release 22
Diffstat (limited to 'luni/src/test/java/libcore/java/lang/ref/FinalizeTest.java')
-rw-r--r-- | luni/src/test/java/libcore/java/lang/ref/FinalizeTest.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/luni/src/test/java/libcore/java/lang/ref/FinalizeTest.java b/luni/src/test/java/libcore/java/lang/ref/FinalizeTest.java index ef303bd..d71b5b0 100644 --- a/luni/src/test/java/libcore/java/lang/ref/FinalizeTest.java +++ b/luni/src/test/java/libcore/java/lang/ref/FinalizeTest.java @@ -69,13 +69,18 @@ public final class FinalizeTest extends TestCase { static class X {} - // http://b/issue?id=2136462 - public void testBackFromTheDead() throws Exception { + // Helper function since we do not want a vreg to keep the allocated object live. + // For b/25851249 + private void exceptionInConstructor() { try { new ConstructionFails(); } catch (AssertionError expected) { } + } + // http://b/issue?id=2136462 + public void testBackFromTheDead() throws Exception { + exceptionInConstructor(); FinalizationTester.induceFinalization(); assertTrue("object whose constructor threw was not finalized", ConstructionFails.finalized); } |