This is an automated email from the ASF dual-hosted git repository. jlahoda pushed a commit to branch release90 in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git
commit feb42791275389f3dc0aee024c17b6553672b394 Author: Arunava Sinha <[email protected]> AuthorDate: Thu May 3 16:16:11 2018 +0530 [NETBEANS-481] JDK10-LVTI: Refactored Test class for CasualDiff changes --- ...icitArrayConversionTest.java => VarTypeTest.java} | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/java.source.base/test/unit/src/org/netbeans/api/java/source/gen/InvalidVarToExplicitArrayConversionTest.java b/java.source.base/test/unit/src/org/netbeans/api/java/source/gen/VarTypeTest.java similarity index 92% rename from java.source.base/test/unit/src/org/netbeans/api/java/source/gen/InvalidVarToExplicitArrayConversionTest.java rename to java.source.base/test/unit/src/org/netbeans/api/java/source/gen/VarTypeTest.java index f89a44d..4ce6433 100644 --- a/java.source.base/test/unit/src/org/netbeans/api/java/source/gen/InvalidVarToExplicitArrayConversionTest.java +++ b/java.source.base/test/unit/src/org/netbeans/api/java/source/gen/VarTypeTest.java @@ -42,21 +42,21 @@ import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; /** - * Tests conversion of invalid 'var' type variable with explicit array type + * Tests 'var' type variable rewrite statements. * * @author arusinha */ -public class InvalidVarToExplicitArrayConversionTest extends GeneratorTestBase { +public class VarTypeTest extends GeneratorTestBase { private static final String SOURCE_LEVEL = "1.10"; // NOI18N - public InvalidVarToExplicitArrayConversionTest(String testName) { + public VarTypeTest(String testName) { super(testName); } public static NbTestSuite suite() { NbTestSuite suite = new NbTestSuite(); - suite.addTestSuite(InvalidVarToExplicitArrayConversionTest.class); + suite.addTestSuite(VarTypeTest.class); return suite; } @@ -99,7 +99,7 @@ public class InvalidVarToExplicitArrayConversionTest extends GeneratorTestBase { prepareTest(code); - RewriteStatement("int"); + RewriteInvalidVarArrayInitStatement("int"); String res = TestUtilities.copyFileToString(testFile); System.err.println(res); assertEquals(golden, res); @@ -125,7 +125,7 @@ public class InvalidVarToExplicitArrayConversionTest extends GeneratorTestBase { prepareTest(code); - RewriteStatement("ArrayList"); + RewriteInvalidVarArrayInitStatement("ArrayList"); String res = TestUtilities.copyFileToString(testFile); System.err.println(res); assertEquals(golden, res); @@ -150,13 +150,13 @@ public class InvalidVarToExplicitArrayConversionTest extends GeneratorTestBase { prepareTest(code); - RewriteStatement("String"); + RewriteInvalidVarArrayInitStatement("String"); String res = TestUtilities.copyFileToString(testFile); System.err.println(res); assertEquals(golden, res); } - protected void prepareTest(String code) throws Exception { + private void prepareTest(String code) throws Exception { FileObject workFO = FileUtil.toFileObject(getWorkDir()); @@ -179,11 +179,13 @@ public class InvalidVarToExplicitArrayConversionTest extends GeneratorTestBase { } /** + * Replaces invalid var type array initialization statement with explicit + * array type. * * @param arrayType : target explicit array type. * @throws IOException */ - void RewriteStatement(String arrayType) throws IOException { + private void RewriteInvalidVarArrayInitStatement(String arrayType) throws IOException { JavaSource js = getJavaSource(getTestFile()); assertNotNull(js); -- To stop receiving notification emails like this one, please contact [email protected]. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
