From 6ed7b543c6d2b8c79087ac82e9929fc5337208dd Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Fri, 23 Jan 2004 11:56:14 +0000 Subject: [PATCH] followed up peter reilly's suggestion; full testing for unimplemented as well as undefined git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275958 13f79535-47bb-0310-9956-ffa450edef68 --- src/etc/testcases/taskdefs/conditions/typefound.xml | 10 ++++++++-- .../tools/ant/taskdefs/condition/TypeFoundTest.java | 8 ++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/etc/testcases/taskdefs/conditions/typefound.xml b/src/etc/testcases/taskdefs/conditions/typefound.xml index ea90f325c..12a8e6005 100644 --- a/src/etc/testcases/taskdefs/conditions/typefound.xml +++ b/src/etc/testcases/taskdefs/conditions/typefound.xml @@ -14,9 +14,15 @@ + + + + + + - + diff --git a/src/testcases/org/apache/tools/ant/taskdefs/condition/TypeFoundTest.java b/src/testcases/org/apache/tools/ant/taskdefs/condition/TypeFoundTest.java index 89fbeb311..e175a4989 100644 --- a/src/testcases/org/apache/tools/ant/taskdefs/condition/TypeFoundTest.java +++ b/src/testcases/org/apache/tools/ant/taskdefs/condition/TypeFoundTest.java @@ -78,15 +78,23 @@ public class TypeFoundTest extends BuildFileTest { 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"); }