ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant/types/optional/depend ClassFileSetTest.java
Date Fri, 17 Dec 2004 14:12:08 GMT
bodewig     2004/12/17 06:12:08

  Modified:    src/testcases/org/apache/tools/ant/taskdefs FixCrLfTest.java
                        JarTest.java ZipTest.java
               src/testcases/org/apache/tools/ant/taskdefs/optional/junit
                        Sleeper.java
               src/testcases/org/apache/tools/ant/taskdefs/optional/perforce
                        P4ChangeTest.java
               src/testcases/org/apache/tools/ant/taskdefs/optional/script
                        ScriptDefTest.java
               src/testcases/org/apache/tools/ant/types/optional/depend
                        ClassFileSetTest.java
  Log:
  More shadows and statics that make Jikes whine
  
  Revision  Changes    Path
  1.22      +1 -1      ant/src/testcases/org/apache/tools/ant/taskdefs/FixCrLfTest.java
  
  Index: FixCrLfTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/FixCrLfTest.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- FixCrLfTest.java	7 Dec 2004 09:10:38 -0000	1.21
  +++ FixCrLfTest.java	17 Dec 2004 14:12:08 -0000	1.22
  @@ -112,7 +112,7 @@
            * granularity (should be > 2s to account for Windows FAT).
            */
           try {
  -            Thread.currentThread().sleep(5000);
  +            Thread.sleep(5000);
           } catch (InterruptedException ie) {
               fail(ie.getMessage());
           } // end of try-catch
  
  
  
  1.30      +2 -2      ant/src/testcases/org/apache/tools/ant/taskdefs/JarTest.java
  
  Index: JarTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/JarTest.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- JarTest.java	9 Mar 2004 16:48:57 -0000	1.29
  +++ JarTest.java	17 Dec 2004 14:12:08 -0000	1.30
  @@ -96,7 +96,7 @@
           File jarFile = new File(getProjectDir(), tempJar);
           long jarModifiedDate = jarFile.lastModified();
           try {
  -            Thread.currentThread().sleep(2500);
  +            Thread.sleep(2500);
           } catch (InterruptedException e) {
           } // end of try-catch
           executeTarget(secondTarget);
  @@ -127,7 +127,7 @@
           long sleeptime = 3000
               + FileUtils.newFileUtils().getFileTimestampGranularity();
           try {
  -            Thread.currentThread().sleep(sleeptime);
  +            Thread.sleep(sleeptime);
           } catch (InterruptedException e) {
           } // end of try-catch
           File jarFile = new File(getProjectDir(), tempJar);
  
  
  
  1.22      +1 -1      ant/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java
  
  Index: ZipTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/ZipTest.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- ZipTest.java	25 Aug 2004 14:56:41 -0000	1.21
  +++ ZipTest.java	17 Dec 2004 14:12:08 -0000	1.22
  @@ -122,7 +122,7 @@
           throws InterruptedException {
           executeTarget("testFilesOnlyDoesntCauseRecreateSetup");
           long l = getProject().resolveFile("test3.zip").lastModified();
  -        Thread.currentThread().sleep(3000);
  +        Thread.sleep(3000);
           executeTarget("testFilesOnlyDoesntCauseRecreate");
           assertEquals(l, getProject().resolveFile("test3.zip").lastModified());
       }
  
  
  
  1.3       +2 -2      ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/Sleeper.java
  
  Index: Sleeper.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/Sleeper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Sleeper.java	6 Oct 2004 15:01:55 -0000	1.2
  +++ Sleeper.java	17 Dec 2004 14:12:08 -0000	1.3
  @@ -29,7 +29,7 @@
   
       public void testSleep() {
           try {
  -            Thread.currentThread().sleep(5 * 1000);
  +            Thread.sleep(5 * 1000);
           } catch (InterruptedException e) {
           } // end of try-catch
       }
  
  
  
  1.8       +2 -2      ant/src/testcases/org/apache/tools/ant/taskdefs/optional/perforce/P4ChangeTest.java
  
  Index: P4ChangeTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/perforce/P4ChangeTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- P4ChangeTest.java	9 Mar 2004 16:49:03 -0000	1.7
  +++ P4ChangeTest.java	17 Dec 2004 14:12:08 -0000	1.8
  @@ -36,14 +36,14 @@
   
       public void testBackslash(){
           String input = "comment with a / inside";
  -        String output = p4change.backslash(input);
  +        String output = P4Change.backslash(input);
           assertEquals("comment with a \\/ inside", output);
       }
   
       public void testSubstitute(){
           Perl5Util util = new Perl5Util();
           String tosubstitute = "xx<here>xx";
  -        String input = p4change.backslash("/a/b/c/");
  +        String input = P4Change.backslash("/a/b/c/");
           String output = util.substitute("s/<here>/" + input + "/", tosubstitute);
           assertEquals("xx/a/b/c/xx", output);
       }
  
  
  
  1.9       +6 -7      ant/src/testcases/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java
  
  Index: ScriptDefTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ScriptDefTest.java	9 Mar 2004 16:49:03 -0000	1.8
  +++ ScriptDefTest.java	17 Dec 2004 14:12:08 -0000	1.9
  @@ -42,9 +42,9 @@
       public void testSimple() {
           executeTarget("simple");
           // get the fileset and its basedir
  -        Project project = getProject();
  -        FileSet fileset = (FileSet) project.getReference("testfileset");
  -        File baseDir = fileset.getDir(project);
  +        Project p = getProject();
  +        FileSet fileset = (FileSet) p.getReference("testfileset");
  +        File baseDir = fileset.getDir(p);
           String log = getLog();
           assertTrue("Expecting attribute value printed",
               log.indexOf("Attribute attr1 = test") != -1);
  @@ -68,9 +68,9 @@
       public void testNestedByClassName() {
           executeTarget("nestedbyclassname");
           // get the fileset and its basedir
  -        Project project = getProject();
  -        FileSet fileset = (FileSet) project.getReference("testfileset");
  -        File baseDir = fileset.getDir(project);
  +        Project p = getProject();
  +        FileSet fileset = (FileSet) p.getReference("testfileset");
  +        File baseDir = fileset.getDir(p);
           String log = getLog();
           assertTrue("Expecting attribute value to be printed",
               log.indexOf("Attribute attr1 = test") != -1);
  @@ -107,7 +107,6 @@
       public void testProperty() {
           executeTarget("property");
           // get the fileset and its basedir
  -        Project project = getProject();
           String log = getLog();
           assertTrue("Expecting property in attribute value replaced",
               log.indexOf("Attribute value = test") != -1);
  
  
  
  1.11      +15 -15    ant/src/testcases/org/apache/tools/ant/types/optional/depend/ClassFileSetTest.java
  
  Index: ClassFileSetTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/types/optional/depend/ClassFileSetTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ClassFileSetTest.java	9 Mar 2004 16:49:06 -0000	1.10
  +++ ClassFileSetTest.java	17 Dec 2004 14:12:08 -0000	1.11
  @@ -53,10 +53,10 @@
        * Test basic clasfileset
        */
       public void testBasicSet() {
  -        Project project = getProject();
  +        Project p = getProject();
           executeTarget("testbasicset");
  -        FileSet resultFileSet = (FileSet)project.getReference(RESULT_FILESET);
  -        DirectoryScanner scanner = resultFileSet.getDirectoryScanner(project);
  +        FileSet resultFileSet = (FileSet)p.getReference(RESULT_FILESET);
  +        DirectoryScanner scanner = resultFileSet.getDirectoryScanner(p);
           String[] scannedFiles = scanner.getIncludedFiles();
           Hashtable files = new Hashtable();
           for (int i = 0; i < scannedFiles.length; ++i) {
  @@ -78,10 +78,10 @@
        * Test small classfileset
        */
       public void testSmallSet() {
  -        Project project = getProject();
  +        Project p = getProject();
           executeTarget("testsmallset");
  -        FileSet resultFileSet = (FileSet)project.getReference(RESULT_FILESET);
  -        DirectoryScanner scanner = resultFileSet.getDirectoryScanner(project);
  +        FileSet resultFileSet = (FileSet)p.getReference(RESULT_FILESET);
  +        DirectoryScanner scanner = resultFileSet.getDirectoryScanner(p);
           String[] scannedFiles = scanner.getIncludedFiles();
           Hashtable files = new Hashtable();
           for (int i = 0; i < scannedFiles.length; ++i) {
  @@ -99,10 +99,10 @@
        * Test conbo classfileset
        */
       public void testComboSet() {
  -        Project project = getProject();
  +        Project p = getProject();
           executeTarget("testcomboset");
  -        FileSet resultFileSet = (FileSet)project.getReference(RESULT_FILESET);
  -        DirectoryScanner scanner = resultFileSet.getDirectoryScanner(project);
  +        FileSet resultFileSet = (FileSet)p.getReference(RESULT_FILESET);
  +        DirectoryScanner scanner = resultFileSet.getDirectoryScanner(p);
           String[] scannedFiles = scanner.getIncludedFiles();
           Hashtable files = new Hashtable();
           for (int i = 0; i < scannedFiles.length; ++i) {
  @@ -125,10 +125,10 @@
        * Test that classes included in a method "System.out.println(MyClass.class)" are included.
        */
       public void testMethodParam() {
  -        Project project = getProject();
  +        Project p = getProject();
           executeTarget("testmethodparam");
  -        FileSet resultFileSet = (FileSet)project.getReference(RESULT_FILESET);
  -        DirectoryScanner scanner = resultFileSet.getDirectoryScanner(project);
  +        FileSet resultFileSet = (FileSet)p.getReference(RESULT_FILESET);
  +        DirectoryScanner scanner = resultFileSet.getDirectoryScanner(p);
           String[] scannedFiles = scanner.getIncludedFiles();
           Hashtable files = new Hashtable();
           for (int i = 0; i < scannedFiles.length; ++i) {
  @@ -152,10 +152,10 @@
        * Test that classes included in a method "System.out.println(Outer.Inner.class)" are
included.
        */
       public void testMethodParamInner() {
  -        Project project = getProject();
  +        Project p = getProject();
           executeTarget("testmethodparaminner");
  -        FileSet resultFileSet = (FileSet)project.getReference(RESULT_FILESET);
  -        DirectoryScanner scanner = resultFileSet.getDirectoryScanner(project);
  +        FileSet resultFileSet = (FileSet)p.getReference(RESULT_FILESET);
  +        DirectoryScanner scanner = resultFileSet.getDirectoryScanner(p);
           String[] scannedFiles = scanner.getIncludedFiles();
           Hashtable files = new Hashtable();
           for (int i = 0; i < scannedFiles.length; ++i) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message