From 8f3fef3da5b6477b7417a74f171f5bc875a8d8d7 Mon Sep 17 00:00:00 2001 From: wisberg Date: Thu, 28 Aug 2003 18:30:23 +0000 Subject: [PATCH] checking clone when doing xml round trips on our test specifications --- .../aspectj/testing/xml/AjcSpecXmlReaderTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/testing/testsrc/org/aspectj/testing/xml/AjcSpecXmlReaderTest.java b/testing/testsrc/org/aspectj/testing/xml/AjcSpecXmlReaderTest.java index fb46f3014..a945652b9 100644 --- a/testing/testsrc/org/aspectj/testing/xml/AjcSpecXmlReaderTest.java +++ b/testing/testsrc/org/aspectj/testing/xml/AjcSpecXmlReaderTest.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; +import junit.framework.*; import junit.framework.TestCase; import org.aspectj.testing.harness.bridge.AjcSpecTest; @@ -127,6 +128,18 @@ public class AjcSpecXmlReaderTest extends TestCase { assertNotNull(suite2); AjcSpecTest.sameAjcSuiteSpec(suite1, suite2, this); + // check clone while we're here + try { + Object clone = (AjcTest.Suite.Spec) suite1.clone(); + AjcSpecTest.sameAjcSuiteSpec(suite1, (AjcTest.Suite.Spec) clone, this); + clone = (AjcTest.Suite.Spec) suite2.clone(); + AjcSpecTest.sameAjcSuiteSpec(suite2, (AjcTest.Suite.Spec) clone, this); + AjcSpecTest.sameAjcSuiteSpec(suite1, (AjcTest.Suite.Spec) clone, this); + } catch (CloneNotSupportedException e) { + e.printStackTrace(System.err); + assertTrue("CloneNotSupportedException: " + e.getMessage(), false); + } + for (Iterator iter = toDelete.iterator(); iter.hasNext();) { ((File) iter.next()).delete(); } -- 2.39.5