ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs JavacTest.java
Date Thu, 29 Nov 2001 08:31:01 GMT
bodewig     01/11/29 00:31:01

  Modified:    src/testcases/org/apache/tools/ant/taskdefs JavacTest.java
  Log:
  split javac testcase so that it doesn't use Project.unsetProperty any longer.
  
  Revision  Changes    Path
  1.2       +18 -8     jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/JavacTest.java
  
  Index: JavacTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/JavacTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JavacTest.java	2001/11/06 13:07:02	1.1
  +++ JavacTest.java	2001/11/29 08:31:01	1.2
  @@ -62,7 +62,7 @@
    * Testcase for <javac>.
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @version $Revision: 1.1 $ $Date: 2001/11/06 13:07:02 $
  + * @version $Revision: 1.2 $ $Date: 2001/11/29 08:31:01 $
    */
   public class JavacTest extends TestCase {
   
  @@ -143,18 +143,28 @@
           assertEquals("both are jikes", 1, args.length);
           assertEquals(testArg, args[0]);
   
  -        project.unsetProperty("build.compiler");
  -        arg.setImplementation("extJavac");
  -        javac.setFork("true");
  -        args = javac.getCurrentCompilerArgs();
  -        assertEquals("both are forked javac", 1, args.length);
  -        assertEquals(testArg, args[0]);
  -
           arg.setLine(testArg);
           args = javac.getCurrentCompilerArgs();
           assertEquals("split at space", 2, args.length);
           assertEquals(ford, args[0]);
           assertEquals(prefect, args[1]);
  +    }
  +
  +    /**
  +     * Test nested compiler args in the fork="true" and
  +     * implementation="extJavac" case.
  +     */
  +    public void testCompilerArgForForkAndExtJavac() {
  +        Javac.ImplementationSpecificArgument arg = javac.createCompilerArg();
  +        String ford = "Ford";
  +        String prefect = "Prefect";
  +        String testArg = ford + " " + prefect;
  +        arg.setValue(testArg);
  +        arg.setImplementation("extJavac");
  +        javac.setFork("true");
  +        String[] args = javac.getCurrentCompilerArgs();
  +        assertEquals("both are forked javac", 1, args.length);
  +        assertEquals(testArg, args[0]);
       }
   
   }
  
  
  

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


Mime
View raw message