Return-Path: X-Original-To: apmail-ant-notifications-archive@minotaur.apache.org Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3E69A107C6 for ; Wed, 9 Apr 2014 02:40:29 +0000 (UTC) Received: (qmail 98225 invoked by uid 500); 9 Apr 2014 02:40:28 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 98150 invoked by uid 500); 9 Apr 2014 02:40:27 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 98140 invoked by uid 99); 9 Apr 2014 02:40:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Apr 2014 02:40:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Apr 2014 02:40:24 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C814D238890B for ; Wed, 9 Apr 2014 02:40:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1585881 - in /ant/core/trunk/src: etc/testcases/types/mapper.xml tests/junit/org/apache/tools/ant/types/MapperTest.java Date: Wed, 09 Apr 2014 02:40:01 -0000 To: notifications@ant.apache.org From: antoine@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140409024001.C814D238890B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: antoine Date: Wed Apr 9 02:40:01 2014 New Revision: 1585881 URL: http://svn.apache.org/r1585881 Log: changing tests to adopt unique temporary directories Modified: ant/core/trunk/src/etc/testcases/types/mapper.xml ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/MapperTest.java Modified: ant/core/trunk/src/etc/testcases/types/mapper.xml URL: http://svn.apache.org/viewvc/ant/core/trunk/src/etc/testcases/types/mapper.xml?rev=1585881&r1=1585880&r2=1585881&view=diff ============================================================================== --- ant/core/trunk/src/etc/testcases/types/mapper.xml (original) +++ ant/core/trunk/src/etc/testcases/types/mapper.xml Wed Apr 9 02:40:01 2014 @@ -18,21 +18,50 @@ - - - + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/MapperTest.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/MapperTest.java?rev=1585881&r1=1585880&r2=1585881&view=diff ============================================================================== --- ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/MapperTest.java (original) +++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/MapperTest.java Wed Apr 9 02:40:01 2014 @@ -18,6 +18,8 @@ package org.apache.tools.ant.types; +import java.io.File; +import java.io.FilenameFilter; import java.util.Arrays; import java.util.List; @@ -34,7 +36,6 @@ import org.apache.tools.ant.util.Merging /** * JUnit 3 testcases for org.apache.tools.ant.types.Mapper. - * */ public class MapperTest extends TestCase { @@ -58,7 +59,7 @@ public class MapperTest extends TestCase fail("Can add reference to Mapper with from attribute set"); } catch (BuildException be) { assertEquals("You must not specify more than one attribute when using refid", - be.getMessage()); + be.getMessage()); } m = new Mapper(project); @@ -68,7 +69,7 @@ public class MapperTest extends TestCase fail("Can set from in Mapper that is a reference."); } catch (BuildException be) { assertEquals("You must not specify more than one attribute when using refid", - be.getMessage()); + be.getMessage()); } m = new Mapper(project); @@ -78,7 +79,7 @@ public class MapperTest extends TestCase fail("Can set to in Mapper that is a reference."); } catch (BuildException be) { assertEquals("You must not specify more than one attribute when using refid", - be.getMessage()); + be.getMessage()); } try { Mapper.MapperType mt = new Mapper.MapperType(); @@ -87,7 +88,7 @@ public class MapperTest extends TestCase fail("Can set type in Mapper that is a reference."); } catch (BuildException be) { assertEquals("You must not specify more than one attribute when using refid", - be.getMessage()); + be.getMessage()); } } @@ -100,7 +101,7 @@ public class MapperTest extends TestCase fail("Can make Mapper a Reference to itself."); } catch (BuildException be) { assertEquals("This data type contains a circular reference.", - be.getMessage()); + be.getMessage()); } // dummy1 --> dummy2 --> dummy3 --> dummy1 @@ -118,7 +119,7 @@ public class MapperTest extends TestCase fail("Can make circular reference."); } catch (BuildException be) { assertEquals("This data type contains a circular reference.", - be.getMessage()); + be.getMessage()); } // dummy1 --> dummy2 --> dummy3 @@ -167,11 +168,11 @@ public class MapperTest extends TestCase assertEquals("wrong number of filenames mapped", 3, targets.length); List list = Arrays.asList(targets); assertTrue("cannot find expected target \"tofilename\"", - list.contains("tofilename")); + list.contains("tofilename")); assertTrue("cannot find expected target \"fromfilename\"", - list.contains("fromfilename")); + list.contains("fromfilename")); assertTrue("cannot find expected target \"mergefile\"", - list.contains("mergefile")); + list.contains("mergefile")); } public void testChained() { @@ -236,7 +237,11 @@ public class MapperTest extends TestCase } public void tearDown() { - executeTarget("cleanup"); + try { + super.tearDown(); + } catch (Exception exc) { + // ignore + } } public void test1() {