From 2a9e8c4305302990aa001e911b438bf60680a073 Mon Sep 17 00:00:00 2001 From: aclement Date: Sun, 8 Nov 2009 17:44:09 +0000 Subject: [PATCH] another test --- .../oml/base/src/GenericInterfaceChain.java | 8 ++++++++ .../tools/MultiProjectIncrementalTests.java | 16 ++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 tests/multiIncremental/oml/base/src/GenericInterfaceChain.java 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) { -- 2.39.5