Browse Source

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
master
Peter Donald 23 years ago
parent
commit
c0aae88c47
3 changed files with 38 additions and 0 deletions
  1. +32
    -0
      proposal/myrmidon/src/java/org/apache/antlib/selftest/TypedAdderTest.java
  2. +5
    -0
      proposal/myrmidon/src/make/primitive-tests.ant
  3. +1
    -0
      proposal/myrmidon/src/manifest/selftest-ant-descriptor.xml

+ 32
- 0
proposal/myrmidon/src/java/org/apache/antlib/selftest/TypedAdderTest.java View File

@@ -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 <a href="mailto:peter@apache.org">Peter Donald</a>
* @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
{
}
}

+ 5
- 0
proposal/myrmidon/src/make/primitive-tests.ant View File

@@ -75,4 +75,9 @@ Legal:
<extensions-test/>
</target>

<target name="typed-adder-test">
<log message="About to execute typed-adder-test"/>
<typed-adder-test/>
</target>

</project>

+ 1
- 0
proposal/myrmidon/src/manifest/selftest-ant-descriptor.xml View File

@@ -7,5 +7,6 @@
<task name="content-test" classname="org.apache.antlib.selftest.ContentTest" />
<task name="file-manip-test" classname="org.apache.antlib.selftest.FileManipulationTest" />
<task name="extensions-test" classname="org.apache.antlib.selftest.ExtensionsTest" />
<task name="typed-adder-test" classname="org.apache.antlib.selftest.TypedAdderTest" />
</types>
</ant-lib>

Loading…
Cancel
Save