summaryrefslogtreecommitdiffstats
path: root/weaver/testsrc/org
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-06-22 15:15:49 +0000
committeracolyer <acolyer>2005-06-22 15:15:49 +0000
commit8d8939ac74bdfb9d9e543e667b49c9dff81f0d38 (patch)
treeb37bbe03af9e9f18a122b1720f0da6cb83c66143 /weaver/testsrc/org
parent5e65c6f7defe02f80aa8d30c416eb42e8abb7714 (diff)
downloadaspectj-8d8939ac74bdfb9d9e543e667b49c9dff81f0d38.tar.gz
aspectj-8d8939ac74bdfb9d9e543e667b49c9dff81f0d38.zip
rename weaver.patterns.TypeVariable to weaver.patterns.TypeVariablePattern
Diffstat (limited to 'weaver/testsrc/org')
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java64
1 files changed, 32 insertions, 32 deletions
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java
index 2b07aa6b6..9fb105ca8 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java
@@ -232,37 +232,37 @@ public class ParserTestCase extends TestCase {
public void testParseSimpleTypeVariable() {
PatternParser parser = new PatternParser("T");
- TypeVariable tv = parser.parseTypeVariable();
- TypeVariable expected = new TypeVariable("T");
+ TypeVariablePattern tv = parser.parseTypeVariable();
+ TypeVariablePattern expected = new TypeVariablePattern("T");
assertEquals("Expected simple type variable T",expected,tv);
}
public void testParseExtendingTypeVariable() {
PatternParser parser = new PatternParser("T extends Number");
- TypeVariable tv = parser.parseTypeVariable();
- TypeVariable expected = new TypeVariable("T",new PatternParser("Number").parseTypePattern());
+ TypeVariablePattern tv = parser.parseTypeVariable();
+ TypeVariablePattern expected = new TypeVariablePattern("T",new PatternParser("Number").parseTypePattern());
assertEquals("Expected type variable T extends Number",expected,tv);
}
public void testParseExtendingTypeVariableWithPattern() {
PatternParser parser = new PatternParser("T extends Number+");
- TypeVariable tv = parser.parseTypeVariable();
- TypeVariable expected = new TypeVariable("T",new PatternParser("Number+").parseTypePattern());
+ TypeVariablePattern tv = parser.parseTypeVariable();
+ TypeVariablePattern expected = new TypeVariablePattern("T",new PatternParser("Number+").parseTypePattern());
assertEquals("Expected type variable T extends Number+",expected,tv);
}
public void testParseExtendingTypeVariableWithInterface() {
PatternParser parser = new PatternParser("T extends Number & Comparable");
- TypeVariable tv = parser.parseTypeVariable();
- TypeVariable expected = new TypeVariable("T",new PatternParser("Number").parseTypePattern(),
+ TypeVariablePattern tv = parser.parseTypeVariable();
+ TypeVariablePattern expected = new TypeVariablePattern("T",new PatternParser("Number").parseTypePattern(),
new TypePattern[] {new PatternParser("Comparable").parseTypePattern()},null);
assertEquals("Expected type variable T extends Number",expected,tv);
}
public void testParseExtendingTypeVariableWithInterfaceList() {
PatternParser parser = new PatternParser("T extends Number & Comparable & Cloneable");
- TypeVariable tv = parser.parseTypeVariable();
- TypeVariable expected = new TypeVariable("T",new PatternParser("Number").parseTypePattern(),
+ TypeVariablePattern tv = parser.parseTypeVariable();
+ TypeVariablePattern expected = new TypeVariablePattern("T",new PatternParser("Number").parseTypePattern(),
new TypePattern[] {new PatternParser("Comparable").parseTypePattern(),
new PatternParser("Cloneable").parseTypePattern()},null);
assertEquals("Expected type variable T extends Number",expected,tv);
@@ -271,8 +271,8 @@ public class ParserTestCase extends TestCase {
public void testParseTypeParameterList() {
PatternParser parser = new PatternParser("<T>");
TypeVariablePatternList list = parser.maybeParseTypeVariableList();
- TypeVariable[] patterns = list.getTypeVariablePatterns();
- TypeVariable expected = new TypeVariable("T");
+ TypeVariablePattern[] patterns = list.getTypeVariablePatterns();
+ TypeVariablePattern expected = new TypeVariablePattern("T");
assertEquals("Expected simple type variable T",expected,patterns[0]);
assertEquals("One pattern in list",1,patterns.length);
}
@@ -280,12 +280,12 @@ public class ParserTestCase extends TestCase {
public void testParseTypeParameterListWithSeveralTypeParameters() {
PatternParser parser = new PatternParser("<T,S extends Number, R>");
TypeVariablePatternList list = parser.maybeParseTypeVariableList();
- TypeVariable[] patterns = list.getTypeVariablePatterns();
- TypeVariable expected0 = new TypeVariable("T");
+ TypeVariablePattern[] patterns = list.getTypeVariablePatterns();
+ TypeVariablePattern expected0 = new TypeVariablePattern("T");
assertEquals("Expected simple type variable T",expected0,patterns[0]);
- TypeVariable expected1 = new TypeVariable("S",new PatternParser("Number").parseTypePattern());
+ TypeVariablePattern expected1 = new TypeVariablePattern("S",new PatternParser("Number").parseTypePattern());
assertEquals("Expected type variable S extends Number",expected1,patterns[1]);
- TypeVariable expected2 = new TypeVariable("R");
+ TypeVariablePattern expected2 = new TypeVariablePattern("R");
assertEquals("Expected simple type variable R",expected2,patterns[2]);
assertEquals("3 patterns in list",3,patterns.length);
@@ -294,8 +294,8 @@ public class ParserTestCase extends TestCase {
public void testParseAllowedSuperInTypeVariable() {
PatternParser parser = new PatternParser("T super Number+");
- TypeVariable tv = parser.parseTypeVariable();
- TypeVariable expected = new TypeVariable("T",new ExactTypePattern(TypeX.OBJECT,false,false),null,new PatternParser("Number+").parseTypePattern());
+ TypeVariablePattern tv = parser.parseTypeVariable();
+ TypeVariablePattern expected = new TypeVariablePattern("T",new ExactTypePattern(TypeX.OBJECT,false,false),null,new PatternParser("Number+").parseTypePattern());
assertEquals("Expected type variable T super Number+",expected,tv);
}
@@ -362,11 +362,11 @@ public class ParserTestCase extends TestCase {
public void testSimpleTypeVariableList() {
PatternParser parser = new PatternParser("<T,S,V>");
TypeVariablePatternList tl = parser.maybeParseSimpleTypeVariableList();
- TypeVariable[] patterns = tl.getTypeVariablePatterns();
+ TypeVariablePattern[] patterns = tl.getTypeVariablePatterns();
assertEquals("3 patterns",3,patterns.length);
- assertEquals("T",new TypeVariable("T"),patterns[0]);
- assertEquals("S",new TypeVariable("S"),patterns[1]);
- assertEquals("V",new TypeVariable("V"),patterns[2]);
+ assertEquals("T",new TypeVariablePattern("T"),patterns[0]);
+ assertEquals("S",new TypeVariablePattern("S"),patterns[1]);
+ assertEquals("V",new TypeVariablePattern("V"),patterns[2]);
}
public void testSimpleTypeVariableListError() {
@@ -382,7 +382,7 @@ public class ParserTestCase extends TestCase {
public void testParseCallPCDWithTypeVariables() {
PatternParser parser = new PatternParser("call<T>(* Foo<T>.*(T))");
Pointcut pc = parser.parsePointcut();
- TypeVariable[] tvps = pc.getTypeVariables().getTypeVariablePatterns();
+ TypeVariablePattern[] tvps = pc.getTypeVariables().getTypeVariablePatterns();
assertEquals("1 type variable",1,tvps.length);
assertEquals("T",tvps[0].getName());
}
@@ -530,7 +530,7 @@ public class ParserTestCase extends TestCase {
public void testExecutionWithTypeVariables() {
PatternParser parser = new PatternParser("execution<T>(T Bar<T>.doSomething())");
Pointcut pc = parser.parsePointcut();
- TypeVariable[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
+ TypeVariablePattern[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
assertEquals("1 type pattern",1,tvs.length);
assertEquals("T",tvs[0].getName());
}
@@ -538,7 +538,7 @@ public class ParserTestCase extends TestCase {
public void testInitializationWithTypeVariables() {
PatternParser parser = new PatternParser("initialization<T>(Bar<T>.new())");
Pointcut pc = parser.parsePointcut();
- TypeVariable[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
+ TypeVariablePattern[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
assertEquals("1 type pattern",1,tvs.length);
assertEquals("T",tvs[0].getName());
}
@@ -546,7 +546,7 @@ public class ParserTestCase extends TestCase {
public void testPreInitializationWithTypeVariables() {
PatternParser parser = new PatternParser("preinitialization<T>(Bar<T>.new())");
Pointcut pc = parser.parsePointcut();
- TypeVariable[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
+ TypeVariablePattern[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
assertEquals("1 type pattern",1,tvs.length);
assertEquals("T",tvs[0].getName());
}
@@ -554,7 +554,7 @@ public class ParserTestCase extends TestCase {
public void testStaticInitializationWithTypeVariables() {
PatternParser parser = new PatternParser("staticinitialization<T>(Bar<T>)");
Pointcut pc = parser.parsePointcut();
- TypeVariable[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
+ TypeVariablePattern[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
assertEquals("1 type pattern",1,tvs.length);
assertEquals("T",tvs[0].getName());
}
@@ -562,7 +562,7 @@ public class ParserTestCase extends TestCase {
public void testWithinWithTypeVariables() {
PatternParser parser = new PatternParser("within<T>(Bar<T>)");
Pointcut pc = parser.parsePointcut();
- TypeVariable[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
+ TypeVariablePattern[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
assertEquals("1 type pattern",1,tvs.length);
assertEquals("T",tvs[0].getName());
}
@@ -580,7 +580,7 @@ public class ParserTestCase extends TestCase {
public void testWithinCodeWithTypeVariables() {
PatternParser parser = new PatternParser("withincode<T,S,R>(Bar<T,S extends T, R extends S>.new())");
Pointcut pc = parser.parsePointcut();
- TypeVariable[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
+ TypeVariablePattern[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
assertEquals("3 type patterns",3,tvs.length);
assertEquals("T",tvs[0].getName());
assertEquals("S",tvs[1].getName());
@@ -590,7 +590,7 @@ public class ParserTestCase extends TestCase {
public void testCallWithTypeVariables() {
PatternParser parser = new PatternParser("call<T>(* Bar<T>.*(..))");
Pointcut pc = parser.parsePointcut();
- TypeVariable[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
+ TypeVariablePattern[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
assertEquals("1 type pattern",1,tvs.length);
assertEquals("T",tvs[0].getName());
}
@@ -598,7 +598,7 @@ public class ParserTestCase extends TestCase {
public void testGetWithTypeVariables() {
PatternParser parser = new PatternParser("get<T>(* Bar<T>.*)");
Pointcut pc = parser.parsePointcut();
- TypeVariable[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
+ TypeVariablePattern[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
assertEquals("1 type pattern",1,tvs.length);
assertEquals("T",tvs[0].getName());
}
@@ -606,7 +606,7 @@ public class ParserTestCase extends TestCase {
public void testSetWithTypeVariables() {
PatternParser parser = new PatternParser("set<T>(* Bar<T>.*)");
Pointcut pc = parser.parsePointcut();
- TypeVariable[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
+ TypeVariablePattern[] tvs = pc.getTypeVariables().getTypeVariablePatterns();
assertEquals("1 type pattern",1,tvs.length);
assertEquals("T",tvs[0].getName());
}