From: aclement Date: Sun, 8 Nov 2009 17:44:09 +0000 (+0000) Subject: another test X-Git-Tag: V1_6_7~120 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2a9e8c4305302990aa001e911b438bf60680a073;p=aspectj.git another test --- diff --git a/tests/multiIncremental/oml/base/src/GenericInterfaceChain.java b/tests/multiIncremental/oml/base/src/GenericInterfaceChain.java new file mode 100644 index 000000000..ffde2cdb0 --- /dev/null +++ b/tests/multiIncremental/oml/base/src/GenericInterfaceChain.java @@ -0,0 +1,8 @@ +public interface GenericInterfaceChain extends Foo { +} + +interface Foo extends Bar,java.io.Serializable { +} + +interface Bar extends java.io.Serializable { +} diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index 990a93210..907d27a0e 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -1720,8 +1720,8 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa checkType(w, "com.foo.CCC"); // Type CCC implements an interface that extends another interface checkType(w, "com.foo.CCC"); - - checkType(w, "GenericMethodInterface"); + checkType(w, "GenericMethodInterface"); + checkType(w, "GenericInterfaceChain"); // Some random classes from rt.jar that did reveal some problems: checkType(w, "java.lang.StringBuffer"); @@ -1845,15 +1845,15 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa } } - private void checkTypeHierarchy(World w, String name, boolean genericsAware) { + private void checkTypeHierarchy(World w, String name, boolean wantGenerics) { ResolvedType typeA = w.resolve(name); assertFalse(typeA.isMissing()); - List viaIteratorList = exhaustTypeIterator(typeA.getHierarchy(genericsAware, false)); - List typeDirectlyList = typeA.getHierarchyWithoutIterator(true, true, genericsAware); + List viaIteratorList = exhaustTypeIterator(typeA.getHierarchy(wantGenerics, false)); + List typeDirectlyList = typeA.getHierarchyWithoutIterator(true, true, wantGenerics); assertFalse(viaIteratorList.isEmpty()); List directlyList = new ArrayList(); - for (ResolvedType method : typeDirectlyList) { - String n = method.getName(); + for (ResolvedType type : typeDirectlyList) { + String n = type.getName(); if (!directlyList.contains(n)) { directlyList.add(n); } @@ -1861,7 +1861,7 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa Collections.sort(viaIteratorList); Collections.sort(directlyList); compareTypeLists(viaIteratorList, directlyList); - // System.out.println(typeListsToString(viaIteratorList, directlyList)); + System.out.println("ShouldBeGenerics?" + wantGenerics + "\n" + typeListsToString(viaIteratorList, directlyList)); } private void compare(List viaIteratorList, List directlyList, String typename) {