diff options
author | aclement <aclement> | 2007-10-18 11:02:00 +0000 |
---|---|---|
committer | aclement <aclement> | 2007-10-18 11:02:00 +0000 |
commit | 499b8bcb0e89b39a63008fc68b44df9ed39d0750 (patch) | |
tree | 748080f3a5b8f4915cc5b1014bbac41ce4d8236f /tests/bugs160 | |
parent | 7d21be99acce64728f70e3f4b26bc5390a658672 (diff) | |
download | aspectj-499b8bcb0e89b39a63008fc68b44df9ed39d0750.tar.gz aspectj-499b8bcb0e89b39a63008fc68b44df9ed39d0750.zip |
these tests are now for 1.5.4, not 1.6.0
Diffstat (limited to 'tests/bugs160')
38 files changed, 0 insertions, 480 deletions
diff --git a/tests/bugs160/pr165631/Bug.java b/tests/bugs160/pr165631/Bug.java deleted file mode 100644 index e1ceb22ad..000000000 --- a/tests/bugs160/pr165631/Bug.java +++ /dev/null @@ -1,13 +0,0 @@ -interface A<T> {} - -interface B<T> extends A<T> {} - -class C implements A<String> { -} - -class D extends C { -} - -aspect X { - declare parents: D implements B<Number>; -} diff --git a/tests/bugs160/pr165631/Bug2.java b/tests/bugs160/pr165631/Bug2.java deleted file mode 100644 index 0754042e9..000000000 --- a/tests/bugs160/pr165631/Bug2.java +++ /dev/null @@ -1,15 +0,0 @@ -interface A<T> {} - -interface B<T> extends A<T> {} - -class C implements A<String> {} - -interface A1 {} - -class D extends C implements A1 { -} - -aspect X { - declare parents: D implements B<Number>; -} - diff --git a/tests/bugs160/pr165885/Abstract.java b/tests/bugs160/pr165885/Abstract.java deleted file mode 100644 index b2de830c4..000000000 --- a/tests/bugs160/pr165885/Abstract.java +++ /dev/null @@ -1,7 +0,0 @@ -package package1; - -public abstract class Abstract<T> { - - protected Object field; - -} diff --git a/tests/bugs160/pr165885/Aspect.java b/tests/bugs160/pr165885/Aspect.java deleted file mode 100644 index 127a8f271..000000000 --- a/tests/bugs160/pr165885/Aspect.java +++ /dev/null @@ -1,6 +0,0 @@ -public aspect Aspect { - - declare warning : set(* *) : "foo"; - - -} diff --git a/tests/bugs160/pr165885/Concrete.java b/tests/bugs160/pr165885/Concrete.java deleted file mode 100644 index 520d75a75..000000000 --- a/tests/bugs160/pr165885/Concrete.java +++ /dev/null @@ -1,11 +0,0 @@ -package bug.package2; - -import package1.Abstract; - -public class Concrete extends Abstract<Object> { - - public void method() { - field = null; - } - -} diff --git a/tests/bugs160/pr166084/Simple.java b/tests/bugs160/pr166084/Simple.java deleted file mode 100644 index c5992b4ee..000000000 --- a/tests/bugs160/pr166084/Simple.java +++ /dev/null @@ -1,14 +0,0 @@ -public class Simple { - public static void main(String []argv) { - new Simple().m(); - } - - public void m() { - int i = 1; - System.out.println(i); - } -} - -aspect X { - before(): call(* println(..)) {} -} diff --git a/tests/bugs160/pr166084/X.java b/tests/bugs160/pr166084/X.java deleted file mode 100644 index e60c2c397..000000000 --- a/tests/bugs160/pr166084/X.java +++ /dev/null @@ -1,3 +0,0 @@ -aspect X { - before(): call(* println(..)) {} -} diff --git a/tests/bugs160/pr166084/simple.jar b/tests/bugs160/pr166084/simple.jar Binary files differdeleted file mode 100644 index 3151ded97..000000000 --- a/tests/bugs160/pr166084/simple.jar +++ /dev/null diff --git a/tests/bugs160/pr168044/AbstractNode.java b/tests/bugs160/pr168044/AbstractNode.java deleted file mode 100644 index bb1401fb4..000000000 --- a/tests/bugs160/pr168044/AbstractNode.java +++ /dev/null @@ -1,19 +0,0 @@ -public abstract class AbstractNode < SelfNode extends AbstractNode<SelfNode, DualNode>, DualNode extends AbstractNode<DualNode, SelfNode> > { -} - -class SubClass extends AbstractNode<A,B> { -} - -class A extends AbstractNode<A,B> { } -class B extends AbstractNode<B,A> { } - -abstract class Mad -< - Id extends Comparable<Id>, - Np extends Mad<Id, Np, Nt, Np, Nt>, - Nt extends Mad<Id, Np, Nt, Nt, Np>, - SelfNode extends Mad<Id, Np, Nt, SelfNode, DualNode>, - DualNode extends Mad<Id, Np, Nt, DualNode, SelfNode> -> -{ -} diff --git a/tests/bugs160/pr168063/A.java b/tests/bugs160/pr168063/A.java deleted file mode 100644 index c4831ff9d..000000000 --- a/tests/bugs160/pr168063/A.java +++ /dev/null @@ -1,40 +0,0 @@ -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.Serializable; - - -public class A { - public static void main(String[] args) throws Exception { - A obj1 = new A(); - - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - ObjectOutputStream oos = new ObjectOutputStream(baos); - oos.writeObject(obj1); - oos.close(); - byte[] data = baos.toByteArray(); - - ByteArrayInputStream bais = new ByteArrayInputStream(data); - ObjectInputStream ois = new ObjectInputStream(bais); - Object o = ois.readObject(); - - int before = ((Persistable)obj1).getPersistableId(); - int after = ((Persistable)o).getPersistableId(); - if (before!=after) - System.out.println("The data was lost! before="+before+" after="+after); - else - System.out.println("It worked, data preserved!"); - } -} - -interface Persistable extends Serializable { - abstract public int getPersistableId(); -} - -aspect PersistableImpl { - declare parents: A extends Persistable; - - final public int Persistable.persistableId = 42; - public int Persistable.getPersistableId() { return persistableId; } -} diff --git a/tests/bugs160/pr169706/A.java b/tests/bugs160/pr169706/A.java deleted file mode 100644 index a40ef7bcf..000000000 --- a/tests/bugs160/pr169706/A.java +++ /dev/null @@ -1,8 +0,0 @@ -public class A { - - @MyAnnotation - public void foo() { - - } - -} diff --git a/tests/bugs160/pr169706/B.java b/tests/bugs160/pr169706/B.java deleted file mode 100644 index 120fb1868..000000000 --- a/tests/bugs160/pr169706/B.java +++ /dev/null @@ -1,3 +0,0 @@ -public class B extends A { - -} diff --git a/tests/bugs160/pr169706/C.java b/tests/bugs160/pr169706/C.java deleted file mode 100644 index 8acb6675c..000000000 --- a/tests/bugs160/pr169706/C.java +++ /dev/null @@ -1,3 +0,0 @@ -public class C extends B { - -} diff --git a/tests/bugs160/pr169706/MyAnnotation.java b/tests/bugs160/pr169706/MyAnnotation.java deleted file mode 100644 index 723084377..000000000 --- a/tests/bugs160/pr169706/MyAnnotation.java +++ /dev/null @@ -1,3 +0,0 @@ -import java.lang.annotation.*; - -@Retention(RetentionPolicy.RUNTIME) @interface MyAnnotation {} diff --git a/tests/bugs160/pr169706/MyAspect.java b/tests/bugs160/pr169706/MyAspect.java deleted file mode 100644 index e533064db..000000000 --- a/tests/bugs160/pr169706/MyAspect.java +++ /dev/null @@ -1,16 +0,0 @@ -public aspect MyAspect { - - // this throws an exception - before(MyAnnotation myAnnotation) : - //call(* *..*.*(..)) && - call(@MyAnnotation * *(..)) && - @annotation(myAnnotation) { - - } - - // this, however, works fine -// before() : - // call(@MyAnnotation * *(..)) { - // - // } -} diff --git a/tests/bugs160/pr169706/Test.java b/tests/bugs160/pr169706/Test.java deleted file mode 100644 index b8af6a677..000000000 --- a/tests/bugs160/pr169706/Test.java +++ /dev/null @@ -1,8 +0,0 @@ -public class Test { - - public static void main(String args[]) { - C c = new C(); - c.foo(); - } - -} diff --git a/tests/bugs160/pr170467/Bug.aj b/tests/bugs160/pr170467/Bug.aj deleted file mode 100644 index 4c68eda07..000000000 --- a/tests/bugs160/pr170467/Bug.aj +++ /dev/null @@ -1,16 +0,0 @@ -import java.util.*; - -// this should be OK, the parameterized forms of Set are the same - -abstract class BaseClass { } - -aspect BaseClassAspect { - public abstract void BaseClass.setSomething(Set<String> somethings); -} - -class ExtendedBaseClass extends BaseClass { - @Override - public void setSomething(Set<String> somethings) { } -} - - diff --git a/tests/bugs160/pr170467/Bug2.aj b/tests/bugs160/pr170467/Bug2.aj deleted file mode 100644 index 89b5121c4..000000000 --- a/tests/bugs160/pr170467/Bug2.aj +++ /dev/null @@ -1,16 +0,0 @@ -import java.util.*; - -// Trivial testcase to ensure the basics behave - -abstract class BaseClass { } - -aspect BaseClassAspect { - public abstract void BaseClass.setSomething(Set somethings); -} - -class ExtendedBaseClass extends BaseClass { - @Override - public void setSomething(Set somethings) { } -} - - diff --git a/tests/bugs160/pr171952/Foo.java b/tests/bugs160/pr171952/Foo.java deleted file mode 100644 index d60b9a65c..000000000 --- a/tests/bugs160/pr171952/Foo.java +++ /dev/null @@ -1,6 +0,0 @@ -import java.util.List; - -public interface Foo { - - <T> List<T> createList(); -}
\ No newline at end of file diff --git a/tests/bugs160/pr171952/FooAspect.java b/tests/bugs160/pr171952/FooAspect.java deleted file mode 100644 index a376442fc..000000000 --- a/tests/bugs160/pr171952/FooAspect.java +++ /dev/null @@ -1,10 +0,0 @@ -import java.util.ArrayList; -import java.util.List; - -public aspect FooAspect { - - - public <T> List<T> Foo.createList() { - return new ArrayList<T>(); - } -}
\ No newline at end of file diff --git a/tests/bugs160/pr171953/test/AbstractExecutable.java b/tests/bugs160/pr171953/test/AbstractExecutable.java deleted file mode 100644 index 6d9f880a6..000000000 --- a/tests/bugs160/pr171953/test/AbstractExecutable.java +++ /dev/null @@ -1,5 +0,0 @@ -package test; - -public abstract class AbstractExecutable implements AnotherExecutable { - -} diff --git a/tests/bugs160/pr171953/test/AnotherExecutable.java b/tests/bugs160/pr171953/test/AnotherExecutable.java deleted file mode 100644 index 75103a696..000000000 --- a/tests/bugs160/pr171953/test/AnotherExecutable.java +++ /dev/null @@ -1,5 +0,0 @@ -package test; - -public interface AnotherExecutable extends Executable { - -} diff --git a/tests/bugs160/pr171953/test/Executable.java b/tests/bugs160/pr171953/test/Executable.java deleted file mode 100644 index 13cb945b1..000000000 --- a/tests/bugs160/pr171953/test/Executable.java +++ /dev/null @@ -1,6 +0,0 @@ -package test; - -public interface Executable { - - void execute(); -} diff --git a/tests/bugs160/pr171953/test/ExecutionAspect.aj b/tests/bugs160/pr171953/test/ExecutionAspect.aj deleted file mode 100644 index 1dd0266d8..000000000 --- a/tests/bugs160/pr171953/test/ExecutionAspect.aj +++ /dev/null @@ -1,12 +0,0 @@ -package test; - -public aspect ExecutionAspect { - -declare parents: AbstractExecutable implements java.io.Serializable; - - pointcut executions(Executable executable): execution(public void Executable.execute()) && this(executable); - - void around(Executable executable): executions(executable) { - System.err.println(thisJoinPoint); - } -} diff --git a/tests/bugs160/pr171953/test/RunnableAspect.aj b/tests/bugs160/pr171953/test/RunnableAspect.aj deleted file mode 100644 index fa12b7b99..000000000 --- a/tests/bugs160/pr171953/test/RunnableAspect.aj +++ /dev/null @@ -1,11 +0,0 @@ -package test; - -public aspect RunnableAspect { - -// public void Executable.run() { -// execute(); -// } -// -// //declare parents: (Executable+ && !Executable) implements Runnable; -// declare parents: AbstractExecutable implements java.io.Serializable; -} diff --git a/tests/bugs160/pr171953/test/SecondTestExecutable.java b/tests/bugs160/pr171953/test/SecondTestExecutable.java deleted file mode 100644 index 1743a9728..000000000 --- a/tests/bugs160/pr171953/test/SecondTestExecutable.java +++ /dev/null @@ -1,13 +0,0 @@ -package test; - -public class SecondTestExecutable extends AbstractExecutable { - - public void execute() { - // should not happen because of ExecutionAspect prevents execution - throw new RuntimeException(); - } - - public static void main(String[] args) { - new SecondTestExecutable().execute(); - } -} diff --git a/tests/bugs160/pr171953/test/SubTestExecutable.java b/tests/bugs160/pr171953/test/SubTestExecutable.java deleted file mode 100644 index 8dd83bd03..000000000 --- a/tests/bugs160/pr171953/test/SubTestExecutable.java +++ /dev/null @@ -1,9 +0,0 @@ -package test; - -public class SubTestExecutable extends TestExecutable { - - @Override - public void execute() { - super.execute(); - } -} diff --git a/tests/bugs160/pr171953/test/TestExecutable.java b/tests/bugs160/pr171953/test/TestExecutable.java deleted file mode 100644 index bfd296a2d..000000000 --- a/tests/bugs160/pr171953/test/TestExecutable.java +++ /dev/null @@ -1,7 +0,0 @@ -package test; - -public class TestExecutable implements Executable { - - public void execute() { - } -} diff --git a/tests/bugs160/pr171953_2/test/AbstractProcessor.java b/tests/bugs160/pr171953_2/test/AbstractProcessor.java deleted file mode 100644 index 008fba159..000000000 --- a/tests/bugs160/pr171953_2/test/AbstractProcessor.java +++ /dev/null @@ -1,5 +0,0 @@ -package test; - -public abstract class AbstractProcessor implements Processor { - -} diff --git a/tests/bugs160/pr171953_2/test/ListFactory.java b/tests/bugs160/pr171953_2/test/ListFactory.java deleted file mode 100644 index 473ccac20..000000000 --- a/tests/bugs160/pr171953_2/test/ListFactory.java +++ /dev/null @@ -1,9 +0,0 @@ -package test; - -import java.util.List; - -public interface ListFactory { - - <T> List<T> createList(); - <T> List<T> createList(int initialCapacity); -} diff --git a/tests/bugs160/pr171953_2/test/ListFactoryAspect.aj b/tests/bugs160/pr171953_2/test/ListFactoryAspect.aj deleted file mode 100644 index acfc27e70..000000000 --- a/tests/bugs160/pr171953_2/test/ListFactoryAspect.aj +++ /dev/null @@ -1,30 +0,0 @@ -package test; - -import java.util.ArrayList; -import java.util.List; - -public aspect ListFactoryAspect { - - private ListFactory listFactory = new ListFactory() { - public <T> List<T> createList() { - return new ArrayList<T>(); - }; - public <T> List<T> createList(int initialCapacity) { - return new ArrayList<T>(); - }; - }; - - declare parents: Processor implements ListFactoryConsumer; - - public ListFactory ListFactoryConsumer.getListFactory() { - return ListFactoryAspect.aspectOf().listFactory; - } - - public <T> List<T> ListFactoryConsumer.createList() { - return getListFactory().<T>createList(); - } - - public <T> List<T> ListFactoryConsumer.createList(int initialCapacity) { - return getListFactory().<T>createList(initialCapacity); - } -} diff --git a/tests/bugs160/pr171953_2/test/ListFactoryConsumer.java b/tests/bugs160/pr171953_2/test/ListFactoryConsumer.java deleted file mode 100644 index 41747d902..000000000 --- a/tests/bugs160/pr171953_2/test/ListFactoryConsumer.java +++ /dev/null @@ -1,6 +0,0 @@ -package test; - -public interface ListFactoryConsumer { - - ListFactory getListFactory(); -} diff --git a/tests/bugs160/pr171953_2/test/Processor.java b/tests/bugs160/pr171953_2/test/Processor.java deleted file mode 100644 index c76cdaaf9..000000000 --- a/tests/bugs160/pr171953_2/test/Processor.java +++ /dev/null @@ -1,5 +0,0 @@ -package test; - -public interface Processor { - -} diff --git a/tests/bugs160/pr171953_2/test/SimpleListFactoryConsumer.java b/tests/bugs160/pr171953_2/test/SimpleListFactoryConsumer.java deleted file mode 100644 index ab1ec7cf7..000000000 --- a/tests/bugs160/pr171953_2/test/SimpleListFactoryConsumer.java +++ /dev/null @@ -1,16 +0,0 @@ -package test; - -import java.util.ArrayList; -import java.util.List; - -public class SimpleListFactoryConsumer extends AbstractProcessor { - - public void run() { - //List<List<String>> list1 = getListFactory().createList(); - List<List<String>> list2 = this.createList(); - } - - public static void main(String[] args) { - new SimpleListFactoryConsumer().run(); - } -} diff --git a/tests/bugs160/pr172107/Instrumentation.aj b/tests/bugs160/pr172107/Instrumentation.aj deleted file mode 100644 index d937dcbb0..000000000 --- a/tests/bugs160/pr172107/Instrumentation.aj +++ /dev/null @@ -1,40 +0,0 @@ -import java.lang.reflect.Field; - -import org.aspectj.lang.reflect.*; - -public aspect Instrumentation { - - /** - * Instrument field reads. - */ - pointcut getField() : get(* *) && !within(Instrumentation); - - after() : getField() { - final FieldSignature signature = (FieldSignature) thisJoinPointStaticPart - .getSignature(); - final Field field = signature.getField(); - final SourceLocation sl = thisJoinPointStaticPart.getSourceLocation(); - if (field == null) { - throw new IllegalStateException( - "See pr172107: get FieldSignature#getField()==null in " - + sl.getFileName() + " at line " + sl.getLine()); - } - } - - /** - * Instrument field reads. - */ - pointcut setField() : set(* *) && !within(Instrumentation); - - after() : setField() { - final FieldSignature signature = (FieldSignature) thisJoinPointStaticPart - .getSignature(); - final Field field = signature.getField(); - final SourceLocation sl = thisJoinPointStaticPart.getSourceLocation(); - if (field == null) { - throw new IllegalStateException( - "See pr172107: set FieldSignature#getField()==null in " - + sl.getFileName() + " at line " + sl.getLine()); - } - } -} diff --git a/tests/bugs160/pr172107/ReadWriteAJBug172107.java b/tests/bugs160/pr172107/ReadWriteAJBug172107.java deleted file mode 100644 index 999ed5bd6..000000000 --- a/tests/bugs160/pr172107/ReadWriteAJBug172107.java +++ /dev/null @@ -1,39 +0,0 @@ -interface I { - static final int CONST = 56; -} - -class A { - protected int prot; - protected String protS; - int def; - String defS; -} - -class B extends A implements I { - void m() { - // protected - super.prot = 1; - super.protS = "1"; - System.out.println(super.protS + super.prot); - prot = 2; - protS = "2"; - System.out.println(protS + prot); - // default - super.def = 1; - super.defS = "1"; - System.out.println(defS + def); - def = 2; - defS = "2"; - System.out.println(defS + def); - // interface - System.out.println(CONST); - } -} - -public class ReadWriteAJBug172107 { - - public static void main(String[] args) { - B b = new B(); - b.m(); - } -} diff --git a/tests/bugs160/pr174449/Foo.java b/tests/bugs160/pr174449/Foo.java deleted file mode 100644 index 68a400d7d..000000000 --- a/tests/bugs160/pr174449/Foo.java +++ /dev/null @@ -1,33 +0,0 @@ -abstract aspect Replicate<T> { - - protected pointcut broadcast(T servant); - - void around(T servant): broadcast(servant) { - System.err.println("around advice executing: servant class is "+servant.getClass()); - proceed(servant); - } - -} - -aspect ReplicateConcreteB extends Replicate<Boo> { - protected pointcut broadcast(Boo servant) : call(* *.setScene(..)) && target(servant); -} - -aspect ReplicateConcreteG extends Replicate<Goo> { - protected pointcut broadcast(Goo servant) : call(* *.setScene(..)) && target(servant); -} - -public class Foo { - public static void main(String []argv) { - new Boo().setScene(); - new Goo().setScene(); - } -} - -class Boo { - public void setScene() {} -} - -class Goo { - public void setScene() {} -} diff --git a/tests/bugs160/pr175806/A.java b/tests/bugs160/pr175806/A.java deleted file mode 100644 index 562276c39..000000000 --- a/tests/bugs160/pr175806/A.java +++ /dev/null @@ -1,12 +0,0 @@ -public class A { - - public static void main(String []argv) { - int i = 5; - try { - String s = "3"; - System.out.println(s); - } catch (Exception e) { - System.out.println(i); - } - } -} |