diff options
author | wisberg <wisberg> | 2003-08-28 18:30:23 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2003-08-28 18:30:23 +0000 |
commit | 8f3fef3da5b6477b7417a74f171f5bc875a8d8d7 (patch) | |
tree | 763dc36081a9ca5d3bbb0c4f91b73a91821f31e6 /testing | |
parent | 53973533a79645d5f43383aa390064e303670cf0 (diff) | |
download | aspectj-8f3fef3da5b6477b7417a74f171f5bc875a8d8d7.tar.gz aspectj-8f3fef3da5b6477b7417a74f171f5bc875a8d8d7.zip |
checking clone when doing xml round trips on our test specifications
Diffstat (limited to 'testing')
-rw-r--r-- | testing/testsrc/org/aspectj/testing/xml/AjcSpecXmlReaderTest.java | 13 |
1 files changed, 13 insertions, 0 deletions
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(); } |