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/example/tasks TaskdefTestContainerTask.java TaskdefTestSimpleTask.java
Date Fri, 09 Nov 2001 13:55:31 GMT
bodewig     01/11/09 05:55:31

  Modified:    .        build.xml
               src/etc/testcases/taskdefs taskdef.xml
               src/testcases/org/apache/tools/ant/taskdefs TaskdefTest.java
  Added:       src/testcases/org/example/tasks
                        TaskdefTestContainerTask.java
                        TaskdefTestSimpleTask.java
  Removed:     src/testcases/org/apache/tools/ant/taskdefs
                        TaskdefTestContainerTask.java
                        TaskdefTestSimpleTask.java
  Log:
  Enable the commented out tests in TaskdefTest - they failed because
  org.apache.tools.ant classes must live on the system classloader to be
  loaded.
  
  Revision  Changes    Path
  1.201     +1 -0      jakarta-ant/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/build.xml,v
  retrieving revision 1.200
  retrieving revision 1.201
  diff -u -r1.200 -r1.201
  --- build.xml	2001/11/09 11:15:14	1.200
  +++ build.xml	2001/11/09 13:55:31	1.201
  @@ -737,6 +737,7 @@
   
         <batchtest>
           <fileset dir="${tests.dir}">
  +          <exclude name="org/example/**" />
             <include name="**/*Test*" />
             <!-- abstract class, not a testcase -->
             <exclude name="org/apache/tools/ant/taskdefs/TaskdefsTest.java" />
  
  
  
  1.6       +11 -3     jakarta-ant/src/etc/testcases/taskdefs/taskdef.xml
  
  Index: taskdef.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/etc/testcases/taskdefs/taskdef.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- taskdef.xml	2001/11/02 14:37:33	1.5
  +++ taskdef.xml	2001/11/09 13:55:31	1.6
  @@ -2,6 +2,11 @@
   
   <project name="xxx-test" basedir="." default="test1">
   
  +  <path id="testclasses">
  +    <pathelement location="../../../../build/testcases" />
  +    <pathelement path="${java.class.path}" />
  +  </path>
  +
     <target name="test1">
       <taskdef/>
     </target>
  @@ -27,9 +32,10 @@
     </target>
   
     <target name="test6">
  -    <echo message="${build.test}" />
       <taskdef name="test6"
  -             classname="org.apache.tools.ant.taskdefs.TaskdefTestSimpleTask" />
  +             classname="org.example.tasks.TaskdefTestSimpleTask">
  +      <classpath refid="testclasses" />
  +    </taskdef>
       <test6>
         <echo message="worked" />
       </test6>
  @@ -37,7 +43,9 @@
   
     <target name="test7">
       <taskdef name="test7"
  -             classname="org.apache.tools.ant.taskdefs.TaskdefTestContainerTask" />
  +             classname="org.example.tasks.TaskdefTestContainerTask">
  +      <classpath refid="testclasses" />
  +    </taskdef>
       <test7>
         <echo message="worked" />
       </test7>
  
  
  
  1.5       +2 -4      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/TaskdefTest.java
  
  Index: TaskdefTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/TaskdefTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TaskdefTest.java	2001/11/02 14:37:34	1.4
  +++ TaskdefTest.java	2001/11/09 13:55:31	1.5
  @@ -93,13 +93,11 @@
           executeTarget("test5a");
       }
   
  -    /* disabled until I know why they fail when run via the junit task --SB
       public void test6() {
  -        expectOutput("test6", "simpletask: worked");
  +        expectLog("test6", "simpletask: worked");
       }
   
       public void test7() {
  -        expectOutput("test7", "worked");
  +        expectLog("test7", "worked");
       }
  -    */
   }
  
  
  
  1.1                  jakarta-ant/src/testcases/org/example/tasks/TaskdefTestContainerTask.java
  
  Index: TaskdefTestContainerTask.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Ant", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.example.tasks;
  
  import org.apache.tools.ant.taskdefs.Sequential;
  
  public class TaskdefTestContainerTask extends Sequential {
      public TaskdefTestContainerTask() {}
  }
  
  
  
  1.1                  jakarta-ant/src/testcases/org/example/tasks/TaskdefTestSimpleTask.java
  
  Index: TaskdefTestSimpleTask.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Ant", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.example.tasks;
  
  import org.apache.tools.ant.Project;
  import org.apache.tools.ant.Task;
  
  public class TaskdefTestSimpleTask extends Task {
  
      public class Echo {
          Echo() {}
          private String message = null;
          public void setMessage(String s) {message = s;}
      }
      
      public TaskdefTestSimpleTask() {}
      
      private Echo echo;
      public Echo createEcho() {
          echo = new Echo();
          return echo;
      }
      
      public void execute() {
          log("simpletask: "+echo.message, Project.MSG_INFO);
      }
  
  }
  
  
  
  

--
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