From 288e4a9bf59acc44fc885f6ee7d8edd312d8608f Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 3 Jul 2008 23:50:46 +0000 Subject: [PATCH] 162 test infra --- tests/bugs162/pr239441/SampleAspect.java | 11 +++++++ tests/bugs162/pr239441/Test3.java | 23 +++++++++++++ .../org/aspectj/systemtest/AllTests16.java | 2 ++ .../systemtest/ajc162/Ajc162Tests.java | 32 +++++++++++++++++++ .../systemtest/ajc162/AllTestsAspectJ162.java | 25 +++++++++++++++ .../org/aspectj/systemtest/ajc162/ajc162.xml | 11 +++++++ 6 files changed, 104 insertions(+) create mode 100644 tests/bugs162/pr239441/SampleAspect.java create mode 100644 tests/bugs162/pr239441/Test3.java create mode 100644 tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java create mode 100644 tests/src/org/aspectj/systemtest/ajc162/AllTestsAspectJ162.java create mode 100644 tests/src/org/aspectj/systemtest/ajc162/ajc162.xml 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 iter = new Iterator() { +// +// @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 @@ + + + + + + + + + + + \ No newline at end of file -- 2.39.5