aboutsummaryrefslogtreecommitdiffstats
path: root/weaver/testsrc
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2002-12-17 22:18:57 +0000
committerjhugunin <jhugunin>2002-12-17 22:18:57 +0000
commit2c79569b4b20adbb10cf9081536ecd7a9c37dfea (patch)
tree09a852e83cc80803ccd60788749142c05f8a1c68 /weaver/testsrc
parent7b7572bc37dca8798e29ffaa7c9f2d88c810af21 (diff)
downloadaspectj-2c79569b4b20adbb10cf9081536ecd7a9c37dfea.tar.gz
aspectj-2c79569b4b20adbb10cf9081536ecd7a9c37dfea.zip
better error handling for cases where type name is required
instead of type pattern
Diffstat (limited to 'weaver/testsrc')
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/BindingTestCase.java10
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/TypePatternListTestCase.java4
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/TypePatternTestCase.java6
3 files changed, 10 insertions, 10 deletions
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/BindingTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/BindingTestCase.java
index d7b598f38..18829b9fb 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/BindingTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/BindingTestCase.java
@@ -43,7 +43,7 @@ public class BindingTestCase extends TestCase {
BindingTypePattern[] b = new BindingTypePattern[] {null, bt};
checkBindings("this(b)",b);
- checkBindings("this(Foo)", none);
+ checkBindings("this(java.lang.String)", none);
checkBindings("this(*)", none);
checkBindings("this(a)", a);
@@ -65,12 +65,12 @@ public class BindingTestCase extends TestCase {
//checkBindingFailure("this(a) && this(b)");
checkBindingFailure("this(a) || this(b)", "inconsistent");
- checkBindingFailure("this(A) || this(b)", "inconsistent");
- checkBindingFailure("this(a) || this(B)", "inconsistent");
+ checkBindingFailure("this(java.lang.String) || this(b)", "inconsistent");
+ checkBindingFailure("this(a) || this(java.lang.String)", "inconsistent");
checkBindings("this(a) || this(a)", a);
- checkBindings("!this(Foo)", none);
- checkBindings("!this(Foo) && this(a)", a);
+ checkBindings("!this(java.lang.String)", none);
+ checkBindings("!this(java.lang.String) && this(a)", a);
checkBindingFailure("!this(a)", "negation");
//checkBindingFailure("this(a)");
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternListTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternListTestCase.java
index e756d11f4..b584b635f 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternListTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternListTestCase.java
@@ -113,7 +113,7 @@ public class TypePatternListTestCase extends TestCase {
types[i] = world.resolve(names[i]);
}
- p.resolveBindings(makeTestScope(), Bindings.NONE, false);
+ p.resolveBindings(makeTestScope(), Bindings.NONE, false, false);
//System.out.println("type: " + type);
FuzzyBoolean result = p.matches(types, TypePattern.STATIC);
String msg = "matches statically " + pattern + " to " + Arrays.asList(types);
@@ -127,7 +127,7 @@ public class TypePatternListTestCase extends TestCase {
public void stupidCheck(String pattern, boolean[] matches) {
TypePatternList p = makeArgumentsPattern(pattern);
- p.resolveBindings(makeTestScope(), Bindings.NONE, false);
+ p.resolveBindings(makeTestScope(), Bindings.NONE, false, false);
int len = matches.length;
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternTestCase.java
index 5b3c702e8..7c6ea7a4f 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternTestCase.java
@@ -173,7 +173,7 @@ public class TypePatternTestCase extends TestCase {
TestScope scope = makeTestScope();
scope.setImportedPrefixes(importedPrefixes);
scope.setImportedNames(importedNames);
- return (WildTypePattern) unresolved.resolveBindings(scope, Bindings.NONE, false);
+ return (WildTypePattern) unresolved.resolveBindings(scope, Bindings.NONE, false, false);
}
@@ -218,7 +218,7 @@ public class TypePatternTestCase extends TestCase {
TypePattern p = makeTypePattern(pattern);
ResolvedTypeX type = world.resolve(name);
- p = p.resolveBindings(makeTestScope(), null, false);
+ p = p.resolveBindings(makeTestScope(), null, false, false);
//System.out.println("type: " + p);
@@ -238,7 +238,7 @@ public class TypePatternTestCase extends TestCase {
private void checkMatch(String pattern, String name, boolean shouldMatch) {
TypePattern p = makeTypePattern(pattern);
- p = p.resolveBindings(makeTestScope(), null, false);
+ p = p.resolveBindings(makeTestScope(), null, false, false);
checkPatternMatch(p, name, shouldMatch);
}