@@ -1 +0,0 @@ | |||
@@ -1,17 +0,0 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<projectDescription> | |||
<name>ajde.core</name> | |||
<comment></comment> | |||
<projects> | |||
</projects> | |||
<buildSpec> | |||
<buildCommand> | |||
<name>org.eclipse.jdt.core.javabuilder</name> | |||
<arguments> | |||
</arguments> | |||
</buildCommand> | |||
</buildSpec> | |||
<natures> | |||
<nature>org.eclipse.jdt.core.javanature</nature> | |||
</natures> | |||
</projectDescription> |
@@ -1,6 +0,0 @@ | |||
<?xml version="1.0"?> | |||
<!-- see ../build/*.html for explanation --> | |||
<project name="ajde.core" default="test" basedir="."> | |||
<import file="${basedir}/../build/build.xml"/> | |||
</project> | |||
@@ -0,0 +1,44 @@ | |||
<project xmlns="http://maven.apache.org/POM/4.0.0" | |||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |||
<modelVersion>4.0.0</modelVersion> | |||
<parent> | |||
<groupId>org.aspectj</groupId> | |||
<artifactId>aspectj-parent</artifactId> | |||
<version>1.9.3.BUILD-SNAPSHOT</version> | |||
<relativePath>..</relativePath> | |||
</parent> | |||
<artifactId>ajde.core</artifactId> | |||
<packaging>jar</packaging> | |||
<name>ajde.core</name> | |||
<dependencies> | |||
<dependency> | |||
<groupId>org.aspectj</groupId> | |||
<artifactId>util</artifactId> | |||
<version>${project.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.aspectj</groupId> | |||
<artifactId>bridge</artifactId> | |||
<version>${project.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.aspectj</groupId> | |||
<artifactId>asm</artifactId> | |||
<version>${project.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.aspectj</groupId> | |||
<artifactId>org.aspectj.ajdt.core</artifactId> | |||
<version>${project.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.aspectj</groupId> | |||
<artifactId>org.eclipse.jdt.core</artifactId> | |||
<version>${project.version}</version> | |||
</dependency> | |||
</dependencies> | |||
</project> |
@@ -19,13 +19,13 @@ import junit.framework.AssertionFailedError; | |||
import junit.framework.TestCase; | |||
import org.aspectj.ajde.core.TestMessageHandler.TestMessage; | |||
import org.aspectj.tools.ajc.Ajc; | |||
import org.aspectj.testing.util.TestUtil; | |||
/** | |||
* Testcase class to be used by all ajde.core tests. Provides helper methods to set up the environment in a sandbox as well as to | |||
* drive a build. | |||
*/ | |||
public class AjdeCoreTestCase extends TestCase { | |||
public abstract class AjdeCoreTestCase extends TestCase { | |||
public final static String testdataSrcDir = "../ajde.core/testdata"; | |||
protected static File sandboxDir; | |||
@@ -36,7 +36,7 @@ public class AjdeCoreTestCase extends TestCase { | |||
protected void setUp() throws Exception { | |||
super.setUp(); | |||
// Create a sandbox in which to work | |||
sandboxDir = Ajc.createEmptySandbox(); | |||
sandboxDir = TestUtil.createEmptySandbox(); | |||
// AMC - added this next line as a temporary workaround for | |||
// listener leakage in AsmManager induced by the Ajde test suite. | |||
// AsmManager.getDefault().removeAllListeners(); |
@@ -20,7 +20,7 @@ import java.util.List; | |||
import java.util.Map; | |||
import java.util.Set; | |||
import org.aspectj.tools.ajc.AjcTests; | |||
import org.aspectj.testing.util.TestUtil; | |||
import org.aspectj.util.FileUtil; | |||
import org.aspectj.util.LangUtil; | |||
@@ -66,7 +66,7 @@ public class TestCompilerConfiguration implements ICompilerConfiguration { | |||
} else { | |||
classpath.append(File.pathSeparator).append(System.getProperty("sun.boot.class.path")); | |||
} | |||
classpath.append(File.pathSeparator).append(AjcTests.aspectjrtClasspath()); | |||
classpath.append(File.pathSeparator).append(TestUtil.aspectjrtClasspath()); | |||
return classpath.toString(); | |||
} | |||
@@ -30,7 +30,7 @@ import org.aspectj.ajdt.internal.core.builder.AjBuildConfig; | |||
/** | |||
* Tests that the AjBuildConfig is populated correctly from the ICompilerConfiguration | |||
*/ | |||
public class AjConfigTests extends AjdeCoreTestCase { | |||
public class AjConfigTest extends AjdeCoreTestCase { | |||
private TestCompilerConfiguration compilerConfig; | |||
private AjdeCoreBuildManager ajdeBuildManager; |
@@ -43,7 +43,7 @@ import org.aspectj.ajde.core.TestCompilerConfiguration; | |||
* phase then the disk will contain anything finished with by the cancellation | |||
* point. | |||
*/ | |||
public class BuildCancellingTests extends AjdeCoreTestCase { | |||
public class BuildCancellingTest extends AjdeCoreTestCase { | |||
private final boolean debugTests = false; | |||
private TestBuildProgressMonitor programmableBPM; |
@@ -22,7 +22,7 @@ import org.aspectj.ajde.core.TestMessageHandler; | |||
import org.aspectj.ajde.core.TestMessageHandler.TestMessage; | |||
import org.aspectj.bridge.IMessage; | |||
public class CompilerMessagesTests extends AjdeCoreTestCase { | |||
public class CompilerMessagesTest extends AjdeCoreTestCase { | |||
private TestMessageHandler handler; | |||
private TestCompilerConfiguration compilerConfig; |
@@ -22,7 +22,7 @@ import org.aspectj.ajde.core.AjdeCoreTestCase; | |||
import org.aspectj.ajde.core.TestCompilerConfiguration; | |||
import org.aspectj.ajde.core.TestMessageHandler; | |||
public class DuplicateManifestTests extends AjdeCoreTestCase { | |||
public class DuplicateManifestTest extends AjdeCoreTestCase { | |||
public static final String injarName = "injar.jar"; | |||
public static final String aspectjarName = "aspectjar.jar"; |
@@ -28,7 +28,7 @@ import org.aspectj.ajde.core.TestCompilerConfiguration; | |||
import org.aspectj.ajde.core.TestMessageHandler; | |||
import org.aspectj.util.FileUtil; | |||
public class InpathTests extends AjdeCoreTestCase { | |||
public class InpathTest extends AjdeCoreTestCase { | |||
public static final FileFilter aspectjResourceFileFilter = new FileFilter() { | |||
@Override |
@@ -21,7 +21,7 @@ import org.aspectj.ajde.core.AjdeCoreTestCase; | |||
import org.aspectj.ajde.core.TestCompilerConfiguration; | |||
import org.aspectj.ajde.core.TestMessageHandler; | |||
public class JarManifestTests extends AjdeCoreTestCase { | |||
public class JarManifestTest extends AjdeCoreTestCase { | |||
public static final String outjarName = "/bin/output.jar"; | |||
@@ -25,7 +25,7 @@ import org.aspectj.ajde.core.TestMessageHandler; | |||
import org.aspectj.ajde.core.TestMessageHandler.TestMessage; | |||
import org.aspectj.bridge.Constants; | |||
public class OutxmlTests extends AjdeCoreTestCase { | |||
public class OutxmlTest extends AjdeCoreTestCase { | |||
public static final String PROJECT_DIR = "OutxmlTest"; | |||
public static final String BIN_DIR = "bin"; |
@@ -27,7 +27,7 @@ import org.aspectj.ajde.core.TestCompilerConfiguration; | |||
import org.aspectj.ajde.core.TestMessageHandler; | |||
import org.aspectj.util.FileUtil; | |||
public class ResourceCopyTests extends AjdeCoreTestCase { | |||
public class ResourceCopyTest extends AjdeCoreTestCase { | |||
public static final String PROJECT_DIR = "bug-36071a"; | |||
public static final String srcDir = PROJECT_DIR + "/src"; |
@@ -22,7 +22,7 @@ import org.aspectj.ajde.core.TestCompilerConfiguration; | |||
import org.aspectj.ajde.core.TestMessageHandler; | |||
import org.aspectj.bridge.IMessage; | |||
public class ReweavableTests extends AjdeCoreTestCase { | |||
public class ReweavableTest extends AjdeCoreTestCase { | |||
private static final boolean debugTests = false; | |||
@@ -55,7 +55,7 @@ import org.aspectj.util.LangUtil; | |||
* | |||
* TODO - Other forms of declare? Do they need messages? e.g. declare precedence * | |||
*/ | |||
public class ShowWeaveMessagesTests extends AjdeCoreTestCase { | |||
public class ShowWeaveMessagesTest extends AjdeCoreTestCase { | |||
private static boolean regenerate; | |||
private static boolean debugTests = false; |
@@ -17,7 +17,7 @@ import org.aspectj.asm.AsmManager; | |||
import org.aspectj.asm.IHierarchy; | |||
import org.aspectj.asm.IProgramElement; | |||
public class AsmDeclarationsTests extends AjdeCoreTestCase { | |||
public class AsmDeclarationsTest extends AjdeCoreTestCase { | |||
private AsmManager manager = null; | |||
private IHierarchy model = null; |
@@ -20,7 +20,7 @@ import org.aspectj.asm.AsmManager; | |||
import org.aspectj.asm.IProgramElement; | |||
import org.aspectj.asm.IRelationship; | |||
public class AsmRelationshipsTests extends AjdeCoreTestCase { | |||
public class AsmRelationshipsTest extends AjdeCoreTestCase { | |||
private AsmManager manager = null; | |||
@@ -25,7 +25,7 @@ import org.aspectj.asm.HierarchyWalker; | |||
import org.aspectj.asm.IHierarchy; | |||
import org.aspectj.asm.IProgramElement; | |||
public class SavedModelConsistencyTests extends AjdeCoreTestCase { | |||
public class SavedModelConsistencyTest extends AjdeCoreTestCase { | |||
private final String[] files = new String[] { "ModelCoverage.java", "pkg" + File.separator + "InPackage.java" }; | |||
@@ -24,7 +24,7 @@ import org.aspectj.asm.HierarchyWalker; | |||
import org.aspectj.asm.IHierarchy; | |||
import org.aspectj.asm.IProgramElement; | |||
public class StructureModelTests extends AjdeCoreTestCase { | |||
public class StructureModelTest extends AjdeCoreTestCase { | |||
private AsmManager manager = null; | |||
@@ -1,28 +0,0 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* which accompanies this distribution and is available at | |||
* http://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version | |||
*******************************************************************/ | |||
package org.aspectj.ajde.core; | |||
import junit.framework.TestCase; | |||
import junit.framework.TestSuite; | |||
public class AjdeCoreModuleTests extends TestCase { | |||
public static TestSuite suite() { | |||
TestSuite suite = new TestSuite(AjdeCoreModuleTests.class.getName()); | |||
suite.addTest(org.aspectj.ajde.core.AjdeCoreTests.suite()); | |||
return suite; | |||
} | |||
public AjdeCoreModuleTests(String name) { | |||
super(name); | |||
} | |||
} |
@@ -1,60 +0,0 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* which accompanies this distribution and is available at | |||
* http://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version | |||
*******************************************************************/ | |||
package org.aspectj.ajde.core; | |||
import junit.framework.Test; | |||
import junit.framework.TestCase; | |||
import junit.framework.TestSuite; | |||
import org.aspectj.ajde.core.tests.AjConfigTests; | |||
import org.aspectj.ajde.core.tests.BuildCancellingTests; | |||
import org.aspectj.ajde.core.tests.CompilerMessagesTests; | |||
import org.aspectj.ajde.core.tests.DuplicateManifestTests; | |||
import org.aspectj.ajde.core.tests.InpathTests; | |||
import org.aspectj.ajde.core.tests.JarManifestTests; | |||
import org.aspectj.ajde.core.tests.OutxmlTests; | |||
import org.aspectj.ajde.core.tests.ResourceCopyTests; | |||
import org.aspectj.ajde.core.tests.ReweavableTests; | |||
import org.aspectj.ajde.core.tests.ShowWeaveMessagesTests; | |||
import org.aspectj.ajde.core.tests.model.AsmDeclarationsTests; | |||
import org.aspectj.ajde.core.tests.model.AsmRelationshipsTests; | |||
import org.aspectj.ajde.core.tests.model.SavedModelConsistencyTests; | |||
import org.aspectj.ajde.core.tests.model.StructureModelTests; | |||
public class AjdeCoreTests extends TestCase { | |||
public static Test suite() { | |||
TestSuite suite = new TestSuite(AjdeCoreTests.class.getName()); | |||
// $JUnit-BEGIN$ | |||
suite.addTestSuite(ShowWeaveMessagesTests.class); | |||
suite.addTestSuite(DuplicateManifestTests.class); | |||
suite.addTestSuite(StructureModelTests.class); | |||
suite.addTestSuite(CompilerMessagesTests.class); | |||
suite.addTestSuite(AsmDeclarationsTests.class); | |||
suite.addTestSuite(AsmRelationshipsTests.class); | |||
suite.addTestSuite(InpathTests.class); | |||
suite.addTestSuite(ReweavableTests.class); | |||
suite.addTestSuite(ResourceCopyTests.class); | |||
suite.addTestSuite(SavedModelConsistencyTests. class); | |||
suite.addTestSuite(BuildCancellingTests.class); | |||
suite.addTestSuite(JarManifestTests.class); | |||
suite.addTestSuite(OutxmlTests.class); | |||
suite.addTestSuite(AjConfigTests.class); | |||
// $JUnit-END$ | |||
return suite; | |||
} | |||
public AjdeCoreTests(String name) { | |||
super(name); | |||
} | |||
} |