aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core/java5-testsrc
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2019-01-29 12:57:37 -0800
committerAndy Clement <aclement@pivotal.io>2019-01-29 12:57:37 -0800
commitc17032a561dc4b7643c2d1ee667482c18093b6df (patch)
tree7c43eea31459b7829cfb1f59f53b77837246c312 /org.aspectj.ajdt.core/java5-testsrc
parent6fa7ee1a67699219bf91339582eff594f6bc67f3 (diff)
downloadaspectj-c17032a561dc4b7643c2d1ee667482c18093b6df.tar.gz
aspectj-c17032a561dc4b7643c2d1ee667482c18093b6df.zip
mavenizing org.aspectj.ajdt.core - wip
Diffstat (limited to 'org.aspectj.ajdt.core/java5-testsrc')
-rw-r--r--org.aspectj.ajdt.core/java5-testsrc/Eajc515ModuleTests.java24
-rw-r--r--org.aspectj.ajdt.core/java5-testsrc/org/aspectj/tools/ajc/AjAST5Test.java158
-rw-r--r--org.aspectj.ajdt.core/java5-testsrc/org/aspectj/tools/ajc/Ajc5Tests.java30
3 files changed, 0 insertions, 212 deletions
diff --git a/org.aspectj.ajdt.core/java5-testsrc/Eajc515ModuleTests.java b/org.aspectj.ajdt.core/java5-testsrc/Eajc515ModuleTests.java
deleted file mode 100644
index 9efd128cc..000000000
--- a/org.aspectj.ajdt.core/java5-testsrc/Eajc515ModuleTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * 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://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Matthew Webster - initial implementation
- *******************************************************************************/
-import junit.framework.*;
-import junit.framework.Test;
-
-public class Eajc515ModuleTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(Eajc515ModuleTests.class.getName());
- suite.addTest(org.aspectj.tools.ajc.Ajc5Tests.suite());
- return suite;
- }
-
- public Eajc515ModuleTests(String name) { super(name); }
-
-}
diff --git a/org.aspectj.ajdt.core/java5-testsrc/org/aspectj/tools/ajc/AjAST5Test.java b/org.aspectj.ajdt.core/java5-testsrc/org/aspectj/tools/ajc/AjAST5Test.java
deleted file mode 100644
index 213cf0e2c..000000000
--- a/org.aspectj.ajdt.core/java5-testsrc/org/aspectj/tools/ajc/AjAST5Test.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/********************************************************************
- * Copyright (c) 2006 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 - initital version
- * Matthew Webster - moved tests
- *******************************************************************/
-package org.aspectj.tools.ajc;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.aspectj.org.eclipse.jdt.core.dom.AST;
-import org.aspectj.org.eclipse.jdt.core.dom.AjAST;
-import org.aspectj.org.eclipse.jdt.core.dom.AjTypeDeclaration;
-import org.aspectj.org.eclipse.jdt.core.dom.AspectDeclaration;
-import org.aspectj.org.eclipse.jdt.core.dom.ChildListPropertyDescriptor;
-import org.aspectj.org.eclipse.jdt.core.dom.ChildPropertyDescriptor;
-import org.aspectj.org.eclipse.jdt.core.dom.DeclareParentsDeclaration;
-import org.aspectj.org.eclipse.jdt.core.dom.DefaultTypePattern;
-import org.aspectj.org.eclipse.jdt.core.dom.PerTypeWithin;
-import org.aspectj.org.eclipse.jdt.core.dom.SimplePropertyDescriptor;
-import org.aspectj.org.eclipse.jdt.core.dom.TypePattern;
-
-
-public class AjAST5Test extends AjASTTestCase {
-
- public void testInternalAspectDeclaration() {
- AjAST ajast = createAjAST();
- AspectDeclaration d = ajast.newAspectDeclaration();
- List props = AspectDeclaration.propertyDescriptors(AST.JLS3);
- for (Iterator iter = props.iterator(); iter.hasNext();) {
- Object o = iter.next();
- if (o instanceof ChildPropertyDescriptor) {
- ChildPropertyDescriptor element = (ChildPropertyDescriptor)o;
- if (element.getId().equals("perClause")) {
- assertNull("AspectDeclaration's " + element.getId() + " property" +
- "should be null since we haven't set it yet",
- d.getStructuralProperty(element));
- }
- } else if (o instanceof SimplePropertyDescriptor) {
- SimplePropertyDescriptor element = (SimplePropertyDescriptor)o;
- assertNotNull("AspectDeclaration's " + element.getId() + " property" +
- "should not be null since it is a boolean",
- d.getStructuralProperty(element));
- }
- }
- for (Iterator iter = props.iterator(); iter.hasNext();) {
- Object o = iter.next();
- if (o instanceof ChildPropertyDescriptor) {
- ChildPropertyDescriptor element = (ChildPropertyDescriptor) o;
- if (element.getId().equals("perClause")) {
- PerTypeWithin ptw = ajast.newPerTypeWithin();
- d.setStructuralProperty(element,ptw);
- assertEquals("AspectDeclaration's perClause property should" +
- " now be a perTypeWithin",ptw,d.getStructuralProperty(element));
- } else if (element.getId().equals("javadoc")) {
- // do nothing since makes no sense to have javadoc
- }
- } else if (o instanceof SimplePropertyDescriptor) {
- SimplePropertyDescriptor element = (SimplePropertyDescriptor)o;
- if (element.getId().equals("privileged")) {
- Boolean b = new Boolean(true);
- d.setStructuralProperty(element,b);
- assertEquals("AspectDeclaration's isPrivileged property should" +
- " now be a boolean",b,d.getStructuralProperty(element));
- }
- }
- }
- }
-
- public void testInternalAjTypeDeclaration() {
- AjAST ajast = createAjAST();
- AjTypeDeclaration d = ajast.newAjTypeDeclaration();
- List props = AjTypeDeclaration.propertyDescriptors(AST.JLS3);
- for (Iterator iter = props.iterator(); iter.hasNext();) {
- Object o = iter.next();
- if (o instanceof SimplePropertyDescriptor) {
- SimplePropertyDescriptor element = (SimplePropertyDescriptor) o;
- if (element.getId().equals("aspect")) {
- assertNotNull("AjTypeDeclaration's " + element.getId() + " property" +
- " should not be null since it is a boolean",
- d.getStructuralProperty(element));
- }
- }
- }
- for (Iterator iter = props.iterator(); iter.hasNext();) {
- Object o = iter.next();
- if (o instanceof SimplePropertyDescriptor) {
- SimplePropertyDescriptor element = (SimplePropertyDescriptor) o;
- if (element.getId().equals("aspect")) {
- Boolean b = new Boolean(true);
- d.setStructuralProperty(element,b);
- assertEquals("AjTypeDeclaration's aspect property should" +
- " now be a SignaturePattern",b,d.getStructuralProperty(element));
- }
- }
- }
- }
-
- public void testInternalDeclareParentsDeclaration() {
- AjAST ajast = createAjAST();
- DeclareParentsDeclaration d = ajast.newDeclareParentsDeclaration();
- List props = DeclareParentsDeclaration.propertyDescriptors(AST.JLS3);
- for (Iterator iter = props.iterator(); iter.hasNext();) {
- Object o = iter.next();
- if (o instanceof ChildPropertyDescriptor) {
- ChildPropertyDescriptor element = (ChildPropertyDescriptor)o;
- assertNull("DeclareParentsDeclaration's " + element.getId() + " property" +
- "should be null since we haven't set it yet",
- d.getStructuralProperty(element));
- } else if (o instanceof ChildListPropertyDescriptor) {
- ChildListPropertyDescriptor element = (ChildListPropertyDescriptor)o;
- assertNotNull("DeclareParentsDeclaration's " + element.getId() + " property" +
- "should not be null since it is a list",
- d.getStructuralProperty(element));
- assertEquals("should only be able to put TypePattern's into the list",
- TypePattern.class,element.getElementType());
- } else if (o instanceof SimplePropertyDescriptor) {
- SimplePropertyDescriptor element = (SimplePropertyDescriptor)o;
- assertNotNull("DeclareParentsDeclaration's " + element.getId() + " property" +
- "should not be null since it is a boolean",
- d.getStructuralProperty(element));
- } else {
- fail("unknown PropertyDescriptor associated with DeclareParentsDeclaration: " + o);
- }
- }
- for (Iterator iter = props.iterator(); iter.hasNext();) {
- Object o = iter.next();
- if (o instanceof ChildPropertyDescriptor) {
- ChildPropertyDescriptor element = (ChildPropertyDescriptor) o;
- if (element.getId().equals("childTypePattern")) {
- DefaultTypePattern dtp = ajast.newDefaultTypePattern();
- d.setStructuralProperty(element,dtp);
- assertEquals("DeclareParentsDeclaration's typePattern property should" +
- " now be a DefaultTypePattern",dtp,d.getStructuralProperty(element));
- } else if (element.getId().equals("javadoc")) {
- // do nothing since makes no sense to have javadoc
- } else {
- fail("unknown property for DeclareParentsDeclaration");
- }
- } else if (o instanceof SimplePropertyDescriptor) {
- SimplePropertyDescriptor element = (SimplePropertyDescriptor)o;
- if (element.getId().equals("isExtends")) {
- Boolean b = new Boolean(true);
- d.setStructuralProperty(element,b);
- assertEquals("DeclareParentsDeclaration's isExtends property should" +
- " now be a boolean",b,d.getStructuralProperty(element));
- }
- }
- }
- }
-
-}
diff --git a/org.aspectj.ajdt.core/java5-testsrc/org/aspectj/tools/ajc/Ajc5Tests.java b/org.aspectj.ajdt.core/java5-testsrc/org/aspectj/tools/ajc/Ajc5Tests.java
deleted file mode 100644
index 44bdc76eb..000000000
--- a/org.aspectj.ajdt.core/java5-testsrc/org/aspectj/tools/ajc/Ajc5Tests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/* *******************************************************************
- * Copyright (c) 2005 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:
- * Matthew Webster initial implementation
- * ******************************************************************/
-package org.aspectj.tools.ajc;
-
-import org.aspectj.testing.util.TestUtil;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-public class Ajc5Tests extends TestCase {
- public static String aspectjrtClasspath() {
- return TestUtil.aspectjrtPath().getPath();
- }
- public static Test suite() {
- TestSuite suite = new TestSuite(Ajc5Tests.class.getName());
- suite.addTestSuite(AjAST5Test.class);
- return suite;
- }
-
-}