--- src/testcases/org/apache/tools/ant/taskdefs/MacroDefTest.java 2004-01-28 17:54:25.000000000 -0600 +++ macro/MacroDefTest.java 2004-01-28 17:53:21.000000000 -0600 @@ -136,5 +136,45 @@ "duplicatetextname2", "the attribute name \"text\" has already been used by the text element"); } -} + public void testAttributeNoDescription() { + expectBuildException( + "attribute-no-description", + "Required attribute requiredattribute not set"); + } + + public void testAttributeDescription1() { + expectLog("attribute-description1", "@{requiredattribute}=A-OK!"); + } + + public void testAttributeDescription2() { + expectBuildException( + "attribute-description2", + "Required attribute requiredattribute not set; " + + "description=\"required attribute\""); + } + + public void testElementNoDescription() { + expectBuildException( + "element-no-description", + "Required nested element requiredelement not set"); + } + + public void testElementDescription1() { + expectLog("element-description1", "A-OK!"); + } + + public void testElementDescription2() { + expectBuildException( + "element-description2", + "Required nested element requiredelement missing; " + + "description=\"nested element\""); + } + public void testTextDescription() { + expectBuildException( + "text-description", + "Required text missing; " + + "description=\"nested text\""); + } +} +