--- src/testcases/org/apache/tools/ant/taskdefs/MacroDefTest.java 2004-01-28 17:40:00.000000000 -0600 +++ macro/MacroDefTest.java 2004-01-28 17:02:51.000000000 -0600 @@ -136,5 +136,39 @@ "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\""); + } +} +