From 6ddbbe7667d5b203685d94e6af52a211700029e6 Mon Sep 17 00:00:00 2001 From: Ivan Dubrov Date: Wed, 30 Apr 2014 11:27:13 -0700 Subject: [PATCH] Updating MethodHandle test --- .../github/dcevm/test/methods/MethodHandleTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dcevm/src/test/java7/com/github/dcevm/test/methods/MethodHandleTest.java b/dcevm/src/test/java7/com/github/dcevm/test/methods/MethodHandleTest.java index 6bd0a096..979e5681 100644 --- a/dcevm/src/test/java7/com/github/dcevm/test/methods/MethodHandleTest.java +++ b/dcevm/src/test/java7/com/github/dcevm/test/methods/MethodHandleTest.java @@ -43,22 +43,22 @@ public class MethodHandleTest { // Version 0 public static class A { - public int value() { + public int method() { return 1; } - public static int staticValue() { + public static int staticMethod() { return 3; } } // Version 1 public static class A___1 { - public int value() { + public int method() { return 2; } - public static int staticValue() { + public static int staticMethod() { return 4; } } @@ -74,7 +74,7 @@ public class MethodHandleTest { assert __version__() == 0; MethodHandles.Lookup lookup = MethodHandles.lookup(); - MethodHandle handle = lookup.findVirtual(A.class, "value", MethodType.methodType(int.class)); + MethodHandle handle = lookup.findVirtual(A.class, "method", MethodType.methodType(int.class)); A a = new A(); assertEquals(1, handle.invoke(a)); @@ -93,7 +93,7 @@ public class MethodHandleTest { assert __version__() == 0; MethodHandles.Lookup lookup = MethodHandles.lookup(); - MethodHandle handle = lookup.findStatic(A.class, "staticValue", MethodType.methodType(int.class)); + MethodHandle handle = lookup.findStatic(A.class, "staticMethod", MethodType.methodType(int.class)); A a = new A(); assertEquals(3, handle.invoke()); -- 2.39.5