diff options
-rw-r--r-- | weaver/testsrc/org/aspectj/weaver/MemberTestCase.java | 26 | ||||
-rw-r--r-- | weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java | 12 |
2 files changed, 19 insertions, 19 deletions
diff --git a/weaver/testsrc/org/aspectj/weaver/MemberTestCase.java b/weaver/testsrc/org/aspectj/weaver/MemberTestCase.java index ad97a3cfa..e2efebe25 100644 --- a/weaver/testsrc/org/aspectj/weaver/MemberTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/MemberTestCase.java @@ -29,10 +29,10 @@ public class MemberTestCase extends TestCase { } public void testMethodConstruction() { - Member s = MemberImpl.methodFromString("void Foo.goo(int)"); + Member s = TestUtils.methodFromString("void Foo.goo(int)"); Member t = MemberImpl.method(UnresolvedType.forName("Foo"), 0, "goo", "(I)V"); - Member u = MemberImpl.methodFromString("void Foo1.goo(int)"); - Member v = MemberImpl.methodFromString("int Foo.goo(int)"); + Member u = TestUtils.methodFromString("void Foo1.goo(int)"); + Member v = TestUtils.methodFromString("int Foo.goo(int)"); TestUtil.assertCommutativeEquals(s, s, true); TestUtil.assertCommutativeEquals(t, t, true); @@ -45,10 +45,10 @@ public class MemberTestCase extends TestCase { TestUtil.assertCommutativeEquals(t, v, false); TestUtil.assertCommutativeEquals(u, v, false); - s = MemberImpl.fieldFromString("int Foo.goo"); + s = TestUtils.fieldFromString("int Foo.goo"); t = MemberImpl.field("Foo", 0, "goo", "I"); - u = MemberImpl.fieldFromString("int Foo.goo1"); - v = MemberImpl.fieldFromString("long Foo.goo"); + u = TestUtils.fieldFromString("int Foo.goo1"); + v = TestUtils.fieldFromString("long Foo.goo"); TestUtil.assertCommutativeEquals(s, s, true); TestUtil.assertCommutativeEquals(t, t, true); @@ -64,7 +64,7 @@ public class MemberTestCase extends TestCase { public void testMethodContents() { - Member m = MemberImpl.methodFromString("void Foo.goo(int)"); + Member m = TestUtils.methodFromString("void Foo.goo(int)"); kindTest(m, Member.METHOD); declaringTypeTest(m, "Foo"); nameTest(m, "goo"); @@ -75,7 +75,7 @@ public class MemberTestCase extends TestCase { isConstructorTest(m, false); isStaticTest(m, false); - m = MemberImpl.methodFromString("interface java.lang.Object java.util.Iterator.next()"); + m = TestUtils.methodFromString("interface java.lang.Object java.util.Iterator.next()"); kindTest(m, Member.METHOD); declaringTypeTest(m, "java.util.Iterator"); nameTest(m, "next"); @@ -86,7 +86,7 @@ public class MemberTestCase extends TestCase { isConstructorTest(m, false); isStaticTest(m, false); - m = MemberImpl.methodFromString("void Foo.<init>(int, java.lang.Object)"); + m = TestUtils.methodFromString("void Foo.<init>(int, java.lang.Object)"); kindTest(m, Member.CONSTRUCTOR); declaringTypeTest(m, "Foo"); nameTest(m, "<init>"); @@ -97,7 +97,7 @@ public class MemberTestCase extends TestCase { isConstructorTest(m, true); isStaticTest(m, false); - m = MemberImpl.methodFromString("private double Foo.sqrt(double)"); + m = TestUtils.methodFromString("private double Foo.sqrt(double)"); kindTest(m, Member.METHOD); declaringTypeTest(m, "Foo"); nameTest(m, "sqrt"); @@ -108,7 +108,7 @@ public class MemberTestCase extends TestCase { isConstructorTest(m, false); isStaticTest(m, false); - m = MemberImpl.methodFromString("static int java.lang.Math.max(int, int)"); + m = TestUtils.methodFromString("static int java.lang.Math.max(int, int)"); kindTest(m, Member.METHOD); declaringTypeTest(m, "java.lang.Math"); nameTest(m, "max"); @@ -121,7 +121,7 @@ public class MemberTestCase extends TestCase { } public void testFieldContents() { - Member m = MemberImpl.fieldFromString("int Foo.goo"); + Member m = TestUtils.fieldFromString("int Foo.goo"); kindTest(m, Member.FIELD); declaringTypeTest(m, "Foo"); nameTest(m, "goo"); @@ -132,7 +132,7 @@ public class MemberTestCase extends TestCase { isConstructorTest(m, false); isStaticTest(m, false); - m = MemberImpl.fieldFromString("static java.util.Iterator goo.Bar.i"); + m = TestUtils.fieldFromString("static java.util.Iterator goo.Bar.i"); kindTest(m, Member.FIELD); declaringTypeTest(m, "goo.Bar"); nameTest(m, "i"); diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java index 3bf23d698..3408e759a 100644 --- a/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java @@ -9,17 +9,17 @@ * ******************************************************************/ package org.aspectj.weaver.patterns; +import junit.framework.TestCase; + import org.aspectj.bridge.AbortException; import org.aspectj.util.LangUtil; import org.aspectj.weaver.AnnotatedElement; import org.aspectj.weaver.AnnotationX; -import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.BcweaverTests; +import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.bcel.BcelWorld; -import junit.framework.TestCase; - public class AnnotationPatternTestCase extends TestCase { @@ -29,7 +29,7 @@ public class AnnotationPatternTestCase extends TestCase { AnnotationTypePattern foo = p.maybeParseAnnotationPattern(); foo = foo.resolveBindings(makeSimpleScope(),new Bindings(3),true); assertTrue("ExactAnnotationTypePattern",foo instanceof ExactAnnotationTypePattern); - assertEquals("Foo",UnresolvedType.forName("Foo"),((ExactAnnotationTypePattern)foo).annotationType); + assertEquals("Foo", UnresolvedType.forSignature("LFoo;"), ((ExactAnnotationTypePattern) foo).annotationType); } public void testParseAndAnnotationPattern() { @@ -41,8 +41,8 @@ public class AnnotationPatternTestCase extends TestCase { assertEquals("@Foo @Goo",fooAndGoo.toString()); AnnotationTypePattern left = ((AndAnnotationTypePattern)fooAndGoo).getLeft(); AnnotationTypePattern right = ((AndAnnotationTypePattern)fooAndGoo).getRight(); - assertEquals("Foo",UnresolvedType.forName("Foo"),((ExactAnnotationTypePattern)left).annotationType); - assertEquals("Goo",UnresolvedType.forName("Goo"),((ExactAnnotationTypePattern)right).annotationType); + assertEquals("Foo", UnresolvedType.forSignature("LFoo;"), ((ExactAnnotationTypePattern) left).annotationType); + assertEquals("Goo", UnresolvedType.forSignature("LGoo;"), ((ExactAnnotationTypePattern) right).annotationType); } // // public void testParseOrAnnotationPattern() { |