summaryrefslogtreecommitdiffstats
path: root/ajde/testsrc/org
diff options
context:
space:
mode:
authormkersten <mkersten>2005-11-08 02:33:59 +0000
committermkersten <mkersten>2005-11-08 02:33:59 +0000
commit9fe6c2bc5c7d9950fc3edeadb0d9cfb8c1f28495 (patch)
tree06fd48eafb4a02f29dbe35c6d857a45e20cea8a3 /ajde/testsrc/org
parent67ec9ca9ab089690ab376f1ed75006143f26fb84 (diff)
downloadaspectj-9fe6c2bc5c7d9950fc3edeadb0d9cfb8c1f28495.tar.gz
aspectj-9fe6c2bc5c7d9950fc3edeadb0d9cfb8c1f28495.zip
Fixed Bugzilla Bug 113554: support ajsym file generation for command line builds
Diffstat (limited to 'ajde/testsrc/org')
-rw-r--r--ajde/testsrc/org/aspectj/ajde/AjdeTests.java3
-rw-r--r--ajde/testsrc/org/aspectj/ajde/SymbolFileGenerationTest.java65
2 files changed, 67 insertions, 1 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/AjdeTests.java b/ajde/testsrc/org/aspectj/ajde/AjdeTests.java
index 461dfc52f..bf95d0e37 100644
--- a/ajde/testsrc/org/aspectj/ajde/AjdeTests.java
+++ b/ajde/testsrc/org/aspectj/ajde/AjdeTests.java
@@ -40,7 +40,8 @@ public class AjdeTests extends TestCase {
public static Test suite() {
TestSuite suite = new TestSuite(AjdeTests.class.getName());
//$JUnit-BEGIN$
- suite.addTestSuite(ShowWeaveMessagesTestCase.class);
+ suite.addTestSuite(SymbolFileGenerationTest.class);
+ suite.addTestSuite(ShowWeaveMessagesTestCase.class);
suite.addTestSuite(DuplicateManifestTest.class);
suite.addTestSuite(BuildOptionsTest.class);
suite.addTestSuite(BuildConfigurationTests.class);
diff --git a/ajde/testsrc/org/aspectj/ajde/SymbolFileGenerationTest.java b/ajde/testsrc/org/aspectj/ajde/SymbolFileGenerationTest.java
new file mode 100644
index 000000000..100ed2f66
--- /dev/null
+++ b/ajde/testsrc/org/aspectj/ajde/SymbolFileGenerationTest.java
@@ -0,0 +1,65 @@
+/* *******************************************************************
+ * Copyright (c) 1999-2001 Xerox Corporation,
+ * 2002 Palo Alto Research Center, Incorporated (PARC).
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Common Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * Xerox/PARC initial implementation
+ * ******************************************************************/
+
+package org.aspectj.ajde;
+
+import java.io.File;
+
+import org.aspectj.tools.ajc.AjcTestCase;
+
+/**
+ * @author Mik Kersten
+ */
+public class SymbolFileGenerationTest extends AjcTestCase {
+ private static final String DIR = "../ajde/testdata/examples/coverage";
+
+ protected File dir = new File(DIR);
+ protected File configFile = new File(DIR + "/coverage.lst");
+ protected File esymFile = new File(DIR + "/ModelCoverage.ajesym");
+ protected File outDir = new File(DIR + "/bin");
+ protected File crossRefsFile = new File(outDir.getAbsolutePath() + "/build.ajsym");
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ public void testCrossRefsFileGeneration() {
+ if (crossRefsFile.exists()) assertTrue(crossRefsFile.delete());
+ if (esymFile.exists()) assertTrue(esymFile.delete());
+ String[] args = new String[] {
+ "-d",
+ outDir.getAbsolutePath(),
+ "-crossrefs",
+ "@" + configFile.getAbsolutePath()
+ };
+ ajc(dir, args);
+
+ assertFalse(esymFile.exists());
+ assertTrue(crossRefsFile.exists());
+ }
+
+ public void testEmacssymGeneration() {
+ if (crossRefsFile.exists()) assertTrue(crossRefsFile.delete());
+ if (esymFile.exists()) assertTrue(esymFile.delete());
+ String[] args = new String[] {
+ "-d",
+ outDir.getAbsolutePath(),
+ "-emacssym",
+ "@" + configFile.getAbsolutePath()
+ };
+ ajc(dir, args);
+
+ assertTrue(esymFile.exists());
+ assertFalse(crossRefsFile.exists());
+ }
+}