OSDN Git Service

Tests for libcore change d2aa1365d25911076cb174a04b1d5152f0ff80e3
authorPrzemyslaw Szczepaniak <pszczepaniak@google.com>
Fri, 3 Feb 2017 13:55:07 +0000 (13:55 +0000)
committerPrzemyslaw Szczepaniak <pszczepaniak@google.com>
Mon, 6 Feb 2017 10:50:03 +0000 (10:50 +0000)
Test: make test-art-host
Bug: 31028374
Change-Id: Ic6e459d068f8ff2f7bd958bca9e7be433170381b

test/956-methodhandles/src/Main.java

index 801904d..fc9f030 100644 (file)
@@ -676,6 +676,13 @@ public class Main {
             Integer.class, MethodType.methodType(Integer.class, Integer.class));
         fail("Unexpected success for non-void type for findConstructor");
     } catch (NoSuchMethodException e) {}
+
+    // Array class constructor.
+    try {
+        MethodHandle foo = MethodHandles.lookup().findConstructor(
+            Object[].class, MethodType.methodType(void.class));
+        fail("Unexpected success for array class type for findConstructor");
+    } catch (NoSuchMethodException e) {}
   }
 
   public static void testStringConstructors() throws Throwable {