From 89636a5338570f0c1242b5a7a84cf6c347ad9db6 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Mon, 28 Jan 2002 00:58:34 +0000 Subject: [PATCH] Remove test tasks that are no longer relevent given new unit test infrastructure git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270979 13f79535-47bb-0310-9956-ffa450edef68 --- .../antlib/selftest/ConfigurationTest.java | 56 ------------------- .../apache/antlib/selftest/ContentTest.java | 37 ------------ .../antlib/selftest/SubElementTest.java | 44 --------------- .../myrmidon/src/make/primitive-tests.ant | 32 +---------- proposal/myrmidon/src/make/sample.ant | 4 +- .../src/manifest/selftest-ant-descriptor.xml | 4 -- 6 files changed, 4 insertions(+), 173 deletions(-) delete mode 100644 proposal/myrmidon/src/java/org/apache/antlib/selftest/ConfigurationTest.java delete mode 100644 proposal/myrmidon/src/java/org/apache/antlib/selftest/ContentTest.java delete mode 100644 proposal/myrmidon/src/java/org/apache/antlib/selftest/SubElementTest.java diff --git a/proposal/myrmidon/src/java/org/apache/antlib/selftest/ConfigurationTest.java b/proposal/myrmidon/src/java/org/apache/antlib/selftest/ConfigurationTest.java deleted file mode 100644 index b74550083..000000000 --- a/proposal/myrmidon/src/java/org/apache/antlib/selftest/ConfigurationTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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.avalon.framework.configuration.Configurable; -import org.apache.avalon.framework.configuration.Configuration; -import org.apache.avalon.framework.configuration.ConfigurationException; -import org.apache.myrmidon.api.AbstractTask; -import org.apache.myrmidon.api.TaskException; - -/** - * This is to test self interpretation of configuration. - * - * @author Peter Donald - */ -public class ConfigurationTest - extends AbstractTask - implements Configurable -{ - private String m_message; - - public void configure( final Configuration configuration ) - throws ConfigurationException - { - final String message = configuration.getAttribute( "message" ); - final Object object; - try - { - object = resolveValue( message ); - } - catch( final TaskException te ) - { - throw new ConfigurationException( te.getMessage(), te ); - } - - if( object instanceof String ) - { - m_message = (String)object; - } - else - { - m_message = object.toString(); - } - } - - public void execute() - throws TaskException - { - getLogger().warn( m_message ); - } -} diff --git a/proposal/myrmidon/src/java/org/apache/antlib/selftest/ContentTest.java b/proposal/myrmidon/src/java/org/apache/antlib/selftest/ContentTest.java deleted file mode 100644 index bd485890c..000000000 --- a/proposal/myrmidon/src/java/org/apache/antlib/selftest/ContentTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 content is added. - * - * @author Peter Donald - */ -public class ContentTest - extends AbstractTask -{ - public void addContent( final Integer value ) - { - getLogger().warn( "Integer content: " + value ); - } - - /* - public void addContent( final String blah ) - { - System.out.println( "String content: " + blah ); - } - */ - - public void execute() - throws TaskException - { - } -} diff --git a/proposal/myrmidon/src/java/org/apache/antlib/selftest/SubElementTest.java b/proposal/myrmidon/src/java/org/apache/antlib/selftest/SubElementTest.java deleted file mode 100644 index 767821075..000000000 --- a/proposal/myrmidon/src/java/org/apache/antlib/selftest/SubElementTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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; - -/** - * Test sub-elements addition. - * - * @author Peter Donald - */ -public class SubElementTest - extends AbstractTask -{ - public final static class Beep - { - public void setMessage( final String string ) - { - System.out.println( string ); - } - } - - public Beep createCreateBeep() - { - System.out.println( "createCreateBeep()" ); - return new Beep(); - } - - public void addAddBeep( final Beep beep ) - { - System.out.println( "addBeeper(" + beep + ");" ); - } - - public void execute() - throws TaskException - { - } -} diff --git a/proposal/myrmidon/src/make/primitive-tests.ant b/proposal/myrmidon/src/make/primitive-tests.ant index aa8b5841e..ed5cd0fb4 100644 --- a/proposal/myrmidon/src/make/primitive-tests.ant +++ b/proposal/myrmidon/src/make/primitive-tests.ant @@ -20,28 +20,14 @@ Legal: - - - - - + - - - - - + @@ -60,24 +46,10 @@ Legal: double="3.0" double2="4.0" /> - - - - - - - - 123 - - - - - - \ No newline at end of file diff --git a/proposal/myrmidon/src/make/sample.ant b/proposal/myrmidon/src/make/sample.ant index 773225449..b371897f5 100644 --- a/proposal/myrmidon/src/make/sample.ant +++ b/proposal/myrmidon/src/make/sample.ant @@ -23,8 +23,8 @@ Legal: + ant1-tasklib-test, + prim->extensions-test" /> diff --git a/proposal/myrmidon/src/manifest/selftest-ant-descriptor.xml b/proposal/myrmidon/src/manifest/selftest-ant-descriptor.xml index 95d22d1a7..1b5546e9f 100644 --- a/proposal/myrmidon/src/manifest/selftest-ant-descriptor.xml +++ b/proposal/myrmidon/src/manifest/selftest-ant-descriptor.xml @@ -2,10 +2,6 @@ - - - - \ No newline at end of file