diff options
author | aclement <aclement> | 2008-07-03 23:50:46 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-07-03 23:50:46 +0000 |
commit | 288e4a9bf59acc44fc885f6ee7d8edd312d8608f (patch) | |
tree | c846afc36f69971dcc3b6882430e17a7378ae755 | |
parent | 93082a29639ef8919ca50c4124c52d4d6337077e (diff) | |
download | aspectj-288e4a9bf59acc44fc885f6ee7d8edd312d8608f.tar.gz aspectj-288e4a9bf59acc44fc885f6ee7d8edd312d8608f.zip |
162 test infra
-rw-r--r-- | tests/bugs162/pr239441/SampleAspect.java | 11 | ||||
-rw-r--r-- | tests/bugs162/pr239441/Test3.java | 23 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/AllTests16.java | 2 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java | 32 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc162/AllTestsAspectJ162.java | 25 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc162/ajc162.xml | 11 |
6 files changed, 104 insertions, 0 deletions
diff --git a/tests/bugs162/pr239441/SampleAspect.java b/tests/bugs162/pr239441/SampleAspect.java new file mode 100644 index 000000000..5aa4a369b --- /dev/null +++ b/tests/bugs162/pr239441/SampleAspect.java @@ -0,0 +1,11 @@ +import java.lang.annotation.*; + +public aspect SampleAspect { + declare parents : hasmethod(@Something * *.*(..)) implements SampleInterface; + + private interface SampleInterface{ + } +} + +@Retention(RetentionPolicy.RUNTIME) +@interface Something {}
\ No newline at end of file diff --git a/tests/bugs162/pr239441/Test3.java b/tests/bugs162/pr239441/Test3.java new file mode 100644 index 000000000..c743af7bc --- /dev/null +++ b/tests/bugs162/pr239441/Test3.java @@ -0,0 +1,23 @@ +import java.util.*; +public class Test3 { + + public Iterator<Integer> iter = new Iterator<Integer>() { +// +// @Override + public boolean hasNext() { + return false; + } +// +// @Override + public Integer next() { + return null; + } +// +// @Override + public void remove() { + } + + }; + +} + diff --git a/tests/src/org/aspectj/systemtest/AllTests16.java b/tests/src/org/aspectj/systemtest/AllTests16.java index a698fba28..8414657fb 100644 --- a/tests/src/org/aspectj/systemtest/AllTests16.java +++ b/tests/src/org/aspectj/systemtest/AllTests16.java @@ -8,6 +8,7 @@ import junit.framework.TestSuite; import org.aspectj.systemtest.ajc160.AllTestsAspectJ160; import org.aspectj.systemtest.ajc161.AllTestsAspectJ161; +import org.aspectj.systemtest.ajc162.AllTestsAspectJ162; public class AllTests16 { @@ -16,6 +17,7 @@ public class AllTests16 { //$JUnit-BEGIN$ suite.addTest(AllTestsAspectJ160.suite()); // dont require a 1.6 JRE to run but checks 1.6 compiler behaviour suite.addTest(AllTestsAspectJ161.suite()); // dont require a 1.6 JRE to run but checks 1.6 compiler behaviour + suite.addTest(AllTestsAspectJ162.suite()); // dont require a 1.6 JRE to run but checks 1.6 compiler behaviour suite.addTest(AllTests15.suite()); //$JUnit-END$ return suite; diff --git a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java new file mode 100644 index 000000000..d8d539b24 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2008 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://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Andy Clement - initial API and implementation + *******************************************************************************/ +package org.aspectj.systemtest.ajc162; + +import java.io.File; + +import junit.framework.Test; + +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + + // AspectJ1.6.2 + public void testAnnotationDecp_pr239441() { runTest("annotation decp"); } + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(Ajc162Tests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/ajc162/ajc162.xml"); + } + +}
\ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc162/AllTestsAspectJ162.java b/tests/src/org/aspectj/systemtest/ajc162/AllTestsAspectJ162.java new file mode 100644 index 000000000..409d0d670 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc162/AllTestsAspectJ162.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2008 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://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Andy Clement - initial API and implementation + *******************************************************************************/ +package org.aspectj.systemtest.ajc162; + +import junit.framework.Test; +import junit.framework.TestSuite; + +public class AllTestsAspectJ162 { + + public static Test suite() { + TestSuite suite = new TestSuite("AspectJ 1.6.2 tests"); + //$JUnit-BEGIN$ + suite.addTest(Ajc162Tests.suite()); + //$JUnit-END$ + return suite; + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml new file mode 100644 index 000000000..08e86272d --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml @@ -0,0 +1,11 @@ +<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]> + +<!-- AspectJ v1.6.2 Tests --> +<suite> + + <ajc-test dir="bugs162/pr239441" title="annotation decp"> + <compile files="Test3.java SampleAspect.java" options="-1.5 -showWeaveInfo -XhasMember"> + </compile> + </ajc-test> + +</suite>
\ No newline at end of file |