From c0aae88c472291566d53cd120ce4618d5e9297fc Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Sun, 27 Jan 2002 23:42:15 +0000 Subject: [PATCH] Added a simple class to help test the typed adder construct git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270970 13f79535-47bb-0310-9956-ffa450edef68 --- .../antlib/selftest/TypedAdderTest.java | 32 +++++++++++++++++++ .../myrmidon/src/make/primitive-tests.ant | 5 +++ .../src/manifest/selftest-ant-descriptor.xml | 1 + 3 files changed, 38 insertions(+) create mode 100644 proposal/myrmidon/src/java/org/apache/antlib/selftest/TypedAdderTest.java diff --git a/proposal/myrmidon/src/java/org/apache/antlib/selftest/TypedAdderTest.java b/proposal/myrmidon/src/java/org/apache/antlib/selftest/TypedAdderTest.java new file mode 100644 index 000000000..abb4d8e8d --- /dev/null +++ b/proposal/myrmidon/src/java/org/apache/antlib/selftest/TypedAdderTest.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) The Apache Software Foundation. All rights reserved. + * + * This software is published under the terms of the Apache Software License + * version 1.1, a copy of which has been included with this distribution in + * the LICENSE.txt file. + */ +package org.apache.antlib.selftest; + +import org.apache.myrmidon.api.AbstractTask; +import org.apache.myrmidon.api.TaskException; + +/** + * This is to test whether adders with just a type (and no name) work. + * + * @author Peter Donald + * @ant:task name="typed-adder-test" + */ +public class TypedAdderTest + extends AbstractTask +{ + public void add( final Integer value ) + { + //Should fail as value is not an interface + getLogger().warn( "Integer add: " + value ); + } + + public void execute() + throws TaskException + { + } +} diff --git a/proposal/myrmidon/src/make/primitive-tests.ant b/proposal/myrmidon/src/make/primitive-tests.ant index a59df484e..aa8b5841e 100644 --- a/proposal/myrmidon/src/make/primitive-tests.ant +++ b/proposal/myrmidon/src/make/primitive-tests.ant @@ -75,4 +75,9 @@ Legal: + + + + + \ No newline at end of file diff --git a/proposal/myrmidon/src/manifest/selftest-ant-descriptor.xml b/proposal/myrmidon/src/manifest/selftest-ant-descriptor.xml index 95d22d1a7..2d058fa63 100644 --- a/proposal/myrmidon/src/manifest/selftest-ant-descriptor.xml +++ b/proposal/myrmidon/src/manifest/selftest-ant-descriptor.xml @@ -7,5 +7,6 @@ + \ No newline at end of file