diff options
author | Andy Clement <aclement@pivotal.io> | 2019-11-28 15:56:46 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2019-11-28 15:56:46 -0800 |
commit | a3e5e4104ff31c9f06d90bd0f6876bef305831dc (patch) | |
tree | 06bcdf079072d3edb510107d51cfbb690aacf543 /util/src | |
parent | 355b79ad65fc6af650b1d5d6253401b8edbff395 (diff) | |
download | aspectj-a3e5e4104ff31c9f06d90bd0f6876bef305831dc.tar.gz aspectj-a3e5e4104ff31c9f06d90bd0f6876bef305831dc.zip |
Move to 1.9.6.BUILD-SNAPSHOT version
Diffstat (limited to 'util/src')
-rw-r--r-- | util/src/test/java/org/aspectj/util/FileUtilTest.java | 50 | ||||
-rw-r--r-- | util/src/test/java/org/aspectj/util/GenericSignatureParserTest.java | 19 |
2 files changed, 34 insertions, 35 deletions
diff --git a/util/src/test/java/org/aspectj/util/FileUtilTest.java b/util/src/test/java/org/aspectj/util/FileUtilTest.java index 8ce18c700..2d61a6a79 100644 --- a/util/src/test/java/org/aspectj/util/FileUtilTest.java +++ b/util/src/test/java/org/aspectj/util/FileUtilTest.java @@ -1,14 +1,14 @@ /* ******************************************************************* - * Copyright (c) 1999-2001 Xerox Corporation, + * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC). - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Xerox/PARC initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Xerox/PARC initial implementation * ******************************************************************/ package org.aspectj.util; @@ -30,13 +30,13 @@ import java.util.Iterator; import java.util.List; import java.util.ListIterator; -import junit.framework.AssertionFailedError; import junit.framework.TestCase; import junit.textui.TestRunner; /** - * + * */ +@SuppressWarnings("deprecation") public class FileUtilTest extends TestCase { public static final String[] NONE = new String[0]; public static boolean log = false; @@ -57,7 +57,7 @@ public class FileUtilTest extends TestCase { /** * Verify that dir contains files with names, and return the names of other files in dir. - * + * * @return the contents of dir after excluding files or NONE if none * @throws AssertionFailedError if any names are not in dir */ @@ -84,7 +84,7 @@ public class FileUtilTest extends TestCase { /** * Get a sorted String[] of all paths to all files/dirs under dir. Files with names starting with "." are ignored, as are * directory paths containing "CVS". The directory prefix of the path is stripped. Thus, given directory: - * + * * <pre> * path/to * .cvsignore @@ -99,31 +99,31 @@ public class FileUtilTest extends TestCase { * aspectj/ * Version.java * </pre> - * + * * a call - * + * * <pre> * dirPaths(new File("path/to"), new String[0]); * </pre> - * + * * returns - * + * * <pre> * { "Base.java", "com/parc/messages.properties", "org/aspectj/Version.java" } * </pre> - * + * * while the call - * + * * <pre> * dirPaths(new File("path/to"), new String[] { ".java" }); * </pre> - * + * * returns - * + * * <pre> * { "Base.java", "org/aspectj/Version.java" } * </pre> - * + * * @param dir the File path to the directory to inspect * @param suffixes if not empty, require files returned to have this suffix * @return sorted String[] of all paths to all files under dir ending with one of the listed suffixes but not starting with "." @@ -148,7 +148,7 @@ public class FileUtilTest extends TestCase { // trim prefix final String prefix = dir.getPath(); final int len = prefix.length() + 1; // plus directory separator - String[] ra = (String[]) result.toArray(new String[0]); + String[] ra = result.toArray(new String[0]); for (int i = 0; i < ra.length; i++) { // assertTrue(ra[i].startsWith(prefix)); assertTrue(ra[i], ra[i].length() > len); @@ -197,7 +197,7 @@ public class FileUtilTest extends TestCase { public void tearDown() { for (ListIterator<File> iter = tempFiles.listIterator(); iter.hasNext();) { - File dir = (File) iter.next(); + File dir = iter.next(); log("removing " + dir); FileUtil.deleteContents(dir); dir.delete(); @@ -332,7 +332,7 @@ public class FileUtilTest extends TestCase { /** * Method checkGetURL. - * + * * @param string * @param uRL */ diff --git a/util/src/test/java/org/aspectj/util/GenericSignatureParserTest.java b/util/src/test/java/org/aspectj/util/GenericSignatureParserTest.java index 5a9e083e4..73a272369 100644 --- a/util/src/test/java/org/aspectj/util/GenericSignatureParserTest.java +++ b/util/src/test/java/org/aspectj/util/GenericSignatureParserTest.java @@ -1,22 +1,22 @@ /* ******************************************************************* * Copyright (c) 2005-2008 Contributors - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html * * ******************************************************************/ package org.aspectj.util; -import junit.framework.TestCase; - import org.aspectj.util.GenericSignature.ClassSignature; import org.aspectj.util.GenericSignature.ClassTypeSignature; import org.aspectj.util.GenericSignature.FieldTypeSignature; import org.aspectj.util.GenericSignature.SimpleClassTypeSignature; +import junit.framework.TestCase; + /** * @author Adrian Colyer * @author Andy Clement @@ -176,7 +176,7 @@ public class GenericSignatureParserTest extends TestCase { assertEquals("Ljava/lang/Exception;", mSig.throwsSignatures[0].toString()); assertEquals("Ljava/lang/RuntimeException;", mSig.throwsSignatures[1].toString()); } - + public void testMethodSignaturePrimitiveParams() { GenericSignature.MethodTypeSignature mSig = parser.parseAsMethodSignature("(ILjava/lang/Object;)V"); assertEquals("2 parameters", 2, mSig.parameters.length); @@ -194,8 +194,7 @@ public class GenericSignatureParserTest extends TestCase { } public void testPr107784() { - parser - .parseAsMethodSignature("(Lcom/cibc/responders/mapping/CommonDataBeanScenario;Ljava/lang/Object;)Lcom/cibc/responders/response/Formatter<[BLjava/lang/Object;>;"); + parser.parseAsMethodSignature("(Lcom/cibc/responders/mapping/CommonDataBeanScenario;Ljava/lang/Object;)Lcom/cibc/responders/response/Formatter<[BLjava/lang/Object;>;"); parser.parseAsClassSignature("<Parent:Ljava/lang/Object;Child:Ljava/lang/Object;>Ljava/lang/Object;"); } |