From c3766197904de82ef46aa59e9230e4e126277807 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Sun, 6 Oct 2013 14:56:40 +0400 Subject: [PATCH] Allow omitting "public" and "test" --- .../org/objectweb/asm/tree/annotations.xml | 3 +++ test/org/jetbrains/eval4j/test/TestData.java | 20 +++++++++---------- test/org/jetbrains/eval4j/test/main.kt | 4 ++-- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/annotations/org.ow2.asm_asm-debug-all_4.1/org/objectweb/asm/tree/annotations.xml b/annotations/org.ow2.asm_asm-debug-all_4.1/org/objectweb/asm/tree/annotations.xml index 8e4c3eca809..f66428094e3 100644 --- a/annotations/org.ow2.asm_asm-debug-all_4.1/org/objectweb/asm/tree/annotations.xml +++ b/annotations/org.ow2.asm_asm-debug-all_4.1/org/objectweb/asm/tree/annotations.xml @@ -347,6 +347,9 @@ + + + diff --git a/test/org/jetbrains/eval4j/test/TestData.java b/test/org/jetbrains/eval4j/test/TestData.java index 0686b915ddd..aaba8cefad3 100644 --- a/test/org/jetbrains/eval4j/test/TestData.java +++ b/test/org/jetbrains/eval4j/test/TestData.java @@ -1,38 +1,38 @@ package org.jetbrains.eval4j.test; -public class TestData { - public static void testReturnVoid() { +class TestData { + static void returnVoid() { } - public static boolean testReturnBoolean() { + static boolean returnBoolean() { return true; } - public static byte testReturnByte() { + static byte returnByte() { return 2; } - public static short testReturnShort() { + static short returnShort() { return 2; } - public static char testReturnChar() { + static char returnChar() { return '2'; } - public static int testReturnInt() { + static int returnInt() { return 2; } - public static long testReturnLong() { + static long returnLong() { return 2; } - public static float testReturnFloat() { + static float returnFloat() { return 2.0f; } - public static double testReturnDouble() { + static double returnDouble() { return 2.0d; } } diff --git a/test/org/jetbrains/eval4j/test/main.kt b/test/org/jetbrains/eval4j/test/main.kt index 90968a10a98..7b40eeb314d 100644 --- a/test/org/jetbrains/eval4j/test/main.kt +++ b/test/org/jetbrains/eval4j/test/main.kt @@ -36,7 +36,7 @@ fun Class<*>.getInternalName(): String = Type.getType(this).getInternalName() fun doTest(ownerClass: Class, methodNode: MethodNode): TestCase? { var expected: InterpreterResult? = null - for (method in ownerClass.getMethods()) { + for (method in ownerClass.getDeclaredMethods()) { if (method.getName() == methodNode.name) { if ((method.getModifiers() and Modifier.STATIC) == 0) { println("Skipping instance method: $method") @@ -74,7 +74,7 @@ fun doTest(ownerClass: Class, methodNode: MethodNode): TestCase? { return null } - return object : TestCase(methodNode.name) { + return object : TestCase("test" + methodNode.name.capitalize()) { override fun runTest() { val value = interpreterLoop(