stevel      2004/01/23 03:56:14

  Modified:    src/testcases/org/apache/tools/ant/taskdefs/condition
                        TypeFoundTest.java
               src/etc/testcases/taskdefs/conditions typefound.xml
  Log:
  followed up peter reilly's suggestion; full testing for unimplemented as well 
as undefined
  
  Revision  Changes    Path
  1.2       +8 -0      
ant/src/testcases/org/apache/tools/ant/taskdefs/condition/TypeFoundTest.java
  
  Index: TypeFoundTest.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/condition/TypeFoundTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TypeFoundTest.java        22 Jan 2004 18:02:57 -0000      1.1
  +++ TypeFoundTest.java        23 Jan 2004 11:56:13 -0000      1.2
  @@ -78,15 +78,23 @@
       public void testUndefined() {
           expectBuildExceptionContaining("testUndefined","left out the name 
attribute", "No type specified");
       }
  +
  +    public void testTaskThatIsntDefined() {
  +        expectPropertyUnset("testTaskThatIsntDefined", 
"testTaskThatIsntDefined");
  +    }
  +
       public void testTaskThatDoesntReallyExist() {
           expectPropertyUnset("testTaskThatDoesntReallyExist", 
"testTaskThatDoesntReallyExist");
       }
  +
       public void testType() {
           expectPropertySet("testType", "testType");
       }
  +
       public void testPreset() {
           expectPropertySet("testPreset", "testPreset");
       }
  +
       public void testMacro() {
           expectPropertySet("testMacro", "testMacro");
       }
  
  
  
  1.2       +8 -2      ant/src/etc/testcases/taskdefs/conditions/typefound.xml
  
  Index: typefound.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/conditions/typefound.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- typefound.xml     22 Jan 2004 18:02:57 -0000      1.1
  +++ typefound.xml     23 Jan 2004 11:56:14 -0000      1.2
  @@ -14,9 +14,15 @@
           </condition>
       </target>
   
  +    <target name="testTaskThatIsntDefined">
  +        <condition property="testTaskThatIsntDefined">
  +            <typefound name="invalid-and-undefined-task-name"/>
  +        </condition>
  +    </target>
  +
       <target name="testTaskThatDoesntReallyExist">
  -     <!--        <taskdef name="invalid-task-name"
  -        classname="org.example.invalid.task.name.hopefully"/> -->
  +     <taskdef name="invalid-task-name" onerror="ignore"
  +        classname="org.example.invalid.task.name.hopefully"/>
           <condition property="testTaskThatDoesntReallyExist">
               <typefound name="invalid-task-name"/>
           </condition>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to