Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 62191 Details for
Bug 179672
[assist] Only one assertion method should be called by completion parser test
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
bug179672_001.txt (text/plain), 561.69 KB, created by
David Audel
on 2007-03-28 04:18:52 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
David Audel
Created:
2007-03-28 04:18:52 EDT
Size:
561.69 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/parser/CompletionParserTestKeyword.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/CompletionParserTestKeyword.java,v >retrieving revision 1.12 >diff -u -r1.12 CompletionParserTestKeyword.java >--- src/org/eclipse/jdt/core/tests/compiler/parser/CompletionParserTestKeyword.java 29 Mar 2006 03:50:24 -0000 1.12 >+++ src/org/eclipse/jdt/core/tests/compiler/parser/CompletionParserTestKeyword.java 28 Mar 2007 08:17:42 -0000 >@@ -665,7 +665,7 @@ > /* > * Test for 'abstract' keyword. > */ >-public void test0021(){ >+public void test0021_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -699,20 +699,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:abst>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "abst"; >- expectedReplacedSource = "abst"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'abstract' keyword. >+ */ >+public void test0021_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:abst>;\n" + >+ " void foo(){\n" + >+ " abst\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "abst"; >+ int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:abst>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "abst"; >+ String expectedReplacedSource = "abst"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:abst>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -727,7 +742,7 @@ > /* > * Test for 'abstract' keyword. > */ >-public void test0022(){ >+public void test0022_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -761,20 +776,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:abst>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "abst"; >- expectedReplacedSource = "abst"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'abstract' keyword. >+ */ >+public void test0022_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:abst>;\n" + >+ " void foo(){\n" + >+ " abst zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "abst"; >+ int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:abst>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "abst"; >+ String expectedReplacedSource = "abst"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:abst>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -789,7 +819,7 @@ > /* > * Test for 'break' keyword. > */ >-public void test0023(){ >+public void test0023_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -823,20 +853,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:bre>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "bre"; >- expectedReplacedSource = "bre"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'break' keyword. >+ */ >+public void test0023_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:bre>;\n" + >+ " void foo(){\n" + >+ " bre\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "bre"; >+ int cursorLocation = str.lastIndexOf("bre") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:bre>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "bre"; >+ String expectedReplacedSource = "bre"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:bre>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -851,7 +896,7 @@ > /* > * Test for 'break' keyword. > */ >-public void test0024(){ >+public void test0024_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -887,23 +932,40 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:bre>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "bre"; >- expectedReplacedSource = "bre"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'break' keyword. >+ */ >+public void test0024_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " int i;\n" + >- " {\n" + >- " <CompleteOnName:bre>;\n" + >+ " void foo(){\n" + >+ " for(int i; i < 10; i++) {\n" + >+ " bre\n" + > " }\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "bre"; >+ int cursorLocation = str.lastIndexOf("bre") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:bre>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "bre"; >+ String expectedReplacedSource = "bre"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " int i;\n" + >+ " {\n" + >+ " <CompleteOnName:bre>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -918,7 +980,7 @@ > /* > * Test for 'case' keyword. > */ >-public void test0025(){ >+public void test0025_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -952,20 +1014,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:cas>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cas"; >- expectedReplacedSource = "cas"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'case' keyword. >+ */ >+public void test0025_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:cas>;\n" + >+ " void foo(){\n" + >+ " cas\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "cas"; >+ int cursorLocation = str.lastIndexOf("cas") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:cas>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cas"; >+ String expectedReplacedSource = "cas"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:cas>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -980,7 +1057,7 @@ > /* > * Test for 'case' keyword. > */ >-public void test0026(){ >+public void test0026_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1016,20 +1093,37 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnKeyword:cas>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cas"; >- expectedReplacedSource = "cas"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'case' keyword. >+ */ >+public void test0026_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnKeyword:cas>;\n" + >+ " void foo(){\n" + >+ " switch(0) {\n" + >+ " cas\n" + >+ " }\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "cas"; >+ int cursorLocation = str.lastIndexOf("cas") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnKeyword:cas>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cas"; >+ String expectedReplacedSource = "cas"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnKeyword:cas>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1044,7 +1138,7 @@ > /* > * Test for 'catch' keyword. > */ >-public void test0027(){ >+public void test0027_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1078,20 +1172,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:cat>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cat"; >- expectedReplacedSource = "cat"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'catch' keyword. >+ */ >+public void test0027_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:cat>;\n" + >+ " void foo(){\n" + >+ " cat\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "cat"; >+ int cursorLocation = str.lastIndexOf("cat") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:cat>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cat"; >+ String expectedReplacedSource = "cat"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:cat>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1106,7 +1215,7 @@ > /* > * Test for 'catch' keyword. > */ >-public void test0028(){ >+public void test0028_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1141,20 +1250,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnKeyword:cat>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cat"; >- expectedReplacedSource = "cat"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'catch' keyword. >+ */ >+public void test0028_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnKeyword:cat>;\n" + >+ " void foo(){\n" + >+ " try {\n" + >+ " } cat\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "cat"; >+ int cursorLocation = str.lastIndexOf("cat") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnKeyword:cat>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cat"; >+ String expectedReplacedSource = "cat"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnKeyword:cat>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1409,7 +1534,7 @@ > /* > * Test for 'class' keyword. > */ >-public void test0037(){ >+public void test0037_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1441,19 +1566,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:cla>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cla"; >- expectedReplacedSource = "cla"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'class' keyword. >+ */ >+public void test0037_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:cla>;\n" + >+ " cla\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "cla"; >+ int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:cla>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cla"; >+ String expectedReplacedSource = "cla"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:cla>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1468,7 +1607,7 @@ > /* > * Test for 'class' keyword. > */ >-public void test0038(){ >+public void test0038_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1500,19 +1639,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:cla>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cla"; >- expectedReplacedSource = "cla"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'class' keyword. >+ */ >+public void test0038_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:cla>;\n" + >+ " final cla\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "cla"; >+ int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:cla>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cla"; >+ String expectedReplacedSource = "cla"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:cla>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1527,7 +1680,7 @@ > /* > * Test for 'class' keyword. > */ >-public void test0039(){ >+public void test0039_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1559,19 +1712,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:cla>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cla"; >- expectedReplacedSource = "cla"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'class' keyword. >+ */ >+public void test0039_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:cla>;\n" + >+ " final cla Y\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "cla"; >+ int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:cla>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cla"; >+ String expectedReplacedSource = "cla"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:cla>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1586,7 +1753,7 @@ > /* > * Test for 'continue' keyword. > */ >-public void test0040(){ >+public void test0040_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1620,20 +1787,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:con>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "con"; >- expectedReplacedSource = "con"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'continue' keyword. >+ */ >+public void test0040_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:con>;\n" + >+ " void foo(){\n" + >+ " con\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "con"; >+ int cursorLocation = str.lastIndexOf("con") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:con>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "con"; >+ String expectedReplacedSource = "con"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:con>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1648,7 +1830,7 @@ > /* > * Test for 'continue' keyword. > */ >-public void test0041(){ >+public void test0041_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1684,23 +1866,40 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:con>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "con"; >- expectedReplacedSource = "con"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'continue' keyword. >+ */ >+public void test0041_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " int i;\n" + >- " {\n" + >- " <CompleteOnName:con>;\n" + >- " }\n" + >+ " void foo(){\n" + >+ " for(int i; i < 5; i++) {\n" + >+ " con\n" + >+ " }\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "con"; >+ int cursorLocation = str.lastIndexOf("con") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:con>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "con"; >+ String expectedReplacedSource = "con"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " int i;\n" + >+ " {\n" + >+ " <CompleteOnName:con>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1715,7 +1914,7 @@ > /* > * Test for 'default' keyword. > */ >-public void test0042(){ >+public void test0042_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1749,20 +1948,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:def>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "def"; >- expectedReplacedSource = "def"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'default' keyword. >+ */ >+public void test0042_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:def>;\n" + >+ " void foo(){\n" + >+ " def\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "def"; >+ int cursorLocation = str.lastIndexOf("def") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:def>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "def"; >+ String expectedReplacedSource = "def"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:def>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1777,7 +1991,7 @@ > /* > * Test for 'default' keyword. > */ >-public void test0043(){ >+public void test0043_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1814,22 +2028,40 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:def>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "def"; >- expectedReplacedSource = "def"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'default' keyword. >+ */ >+public void test0043_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " {\n" + >- " <CompleteOnName:def>;\n" + >- " }\n" + >+ " void foo(){\n" + >+ " switch(0) {\n" + >+ " case 1 : break;\n" + >+ " def\n" + >+ " }\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "def"; >+ int cursorLocation = str.lastIndexOf("def") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:def>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "def"; >+ String expectedReplacedSource = "def"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " {\n" + >+ " <CompleteOnName:def>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1844,7 +2076,7 @@ > /* > * Test for 'do' keyword. > */ >-public void test0044(){ >+public void test0044_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1878,20 +2110,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:do>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "do"; >- expectedReplacedSource = "do"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'do' keyword. >+ */ >+public void test0044_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:do>;\n" + >+ " void foo(){\n" + >+ " do\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "do"; >+ int cursorLocation = str.lastIndexOf("do") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:do>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "do"; >+ String expectedReplacedSource = "do"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:do>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1906,7 +2153,7 @@ > /* > * Test for 'else' keyword. > */ >-public void test0045(){ >+public void test0045_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1940,20 +2187,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:els>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "els"; >- expectedReplacedSource = "els"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'else' keyword. >+ */ >+public void test0045_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:els>;\n" + >+ " void foo(){\n" + >+ " els\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "els"; >+ int cursorLocation = str.lastIndexOf("els") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:els>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "els"; >+ String expectedReplacedSource = "els"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:els>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1968,7 +2230,7 @@ > /* > * Test for 'else' keyword. > */ >-public void test0046(){ >+public void test0046_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2003,20 +2265,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:els>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "els"; >- expectedReplacedSource = "els"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'else' keyword. >+ */ >+public void test0046_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:els>;\n" + >+ " void foo(){\n" + >+ " if(true) {\n" + >+ " } els\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "els"; >+ int cursorLocation = str.lastIndexOf("els") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:els>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "els"; >+ String expectedReplacedSource = "els"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:els>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2264,7 +2542,7 @@ > /* > * Test for 'finally' keyword. > */ >-public void test0055(){ >+public void test0055_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2298,20 +2576,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:fin>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "fin"; >- expectedReplacedSource = "fin"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'finally' keyword. >+ */ >+public void test0055_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:fin>;\n" + >+ " void foo(){\n" + >+ " fin" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "fin"; >+ int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:fin>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "fin"; >+ String expectedReplacedSource = "fin"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:fin>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2326,7 +2619,7 @@ > /* > * Test for 'finally' keyword. > */ >-public void test0056(){ >+public void test0056_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2361,20 +2654,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnKeyword:fin>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "fin"; >- expectedReplacedSource = "fin"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'finally' keyword. >+ */ >+public void test0056_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnKeyword:fin>;\n" + >+ " void foo(){\n" + >+ " try {" + >+ " } fin" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "fin"; >+ int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnKeyword:fin>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "fin"; >+ String expectedReplacedSource = "fin"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnKeyword:fin>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2389,7 +2698,7 @@ > /* > * Test for 'for' keyword. > */ >-public void test0057(){ >+public void test0057_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2423,20 +2732,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:for>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "for"; >- expectedReplacedSource = "for"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'for' keyword. >+ */ >+public void test0057_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:for>;\n" + >+ " void foo(){\n" + >+ " for" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "for"; >+ int cursorLocation = str.lastIndexOf("for") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:for>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "for"; >+ String expectedReplacedSource = "for"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:for>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2451,7 +2775,7 @@ > /* > * Test for 'if' keyword. > */ >-public void test0058(){ >+public void test0058_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2485,20 +2809,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:if>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "if"; >- expectedReplacedSource = "if"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'if' keyword. >+ */ >+public void test0058_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:if>;\n" + >+ " void foo(){\n" + >+ " if" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "if"; >+ int cursorLocation = str.lastIndexOf("if") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:if>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "if"; >+ String expectedReplacedSource = "if"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:if>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2513,7 +2852,7 @@ > /* > * Test for 'switch' keyword. > */ >-public void test0059(){ >+public void test0059_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2547,20 +2886,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:swi>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "swi"; >- expectedReplacedSource = "swi"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'switch' keyword. >+ */ >+public void test0059_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:swi>;\n" + >+ " void foo(){\n" + >+ " swi" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "swi"; >+ int cursorLocation = str.lastIndexOf("swi") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:swi>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "swi"; >+ String expectedReplacedSource = "swi"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:swi>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3162,7 +3516,7 @@ > /* > * Test for 'interface' keyword. > */ >-public void test0080(){ >+public void test0080_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -3194,19 +3548,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:int>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "int"; >- expectedReplacedSource = "int"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'interface' keyword. >+ */ >+public void test0080_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:int>;\n" + >+ " int\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "int"; >+ int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:int>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "int"; >+ String expectedReplacedSource = "int"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:int>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3221,7 +3589,7 @@ > /* > * Test for 'interface' keyword. > */ >-public void test0081(){ >+public void test0081_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -3253,19 +3621,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:int>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "int"; >- expectedReplacedSource = "int"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'interface' keyword. >+ */ >+public void test0081_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:int>;\n" + >+ " abstract int\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "int"; >+ int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:int>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "int"; >+ String expectedReplacedSource = "int"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:int>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3280,7 +3662,7 @@ > /* > * Test for 'interface' keyword. > */ >-public void test0082(){ >+public void test0082_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -3312,19 +3694,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:int>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "int"; >- expectedReplacedSource = "int"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'interface' keyword. >+ */ >+public void test0082_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:int>;\n" + >+ " abstract int Y\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "int"; >+ int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:int>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "int"; >+ String expectedReplacedSource = "int"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:int>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3537,7 +3933,7 @@ > /* > * Test for 'return' keyword. > */ >-public void test0090(){ >+public void test0090_Diet(){ > String str = > "public class X {\n" + > " int foo() {\n" + >@@ -3569,19 +3965,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:ret>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "ret"; >- expectedReplacedSource = "ret"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'return' keyword. >+ */ >+public void test0090_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " int foo() {\n" + >- " <CompleteOnName:ret>;\n" + >+ " ret\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "ret"; >+ int cursorLocation = str.lastIndexOf("ret") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:ret>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "ret"; >+ String expectedReplacedSource = "ret"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " int foo() {\n" + >+ " <CompleteOnName:ret>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3596,7 +4006,7 @@ > /* > * Test for 'throw' keyword. > */ >-public void test0091(){ >+public void test0091_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -3628,19 +4038,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:thr>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "thr"; >- expectedReplacedSource = "thr"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'throw' keyword. >+ */ >+public void test0091_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:thr>;\n" + >+ " thr\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "thr"; >+ int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:thr>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "thr"; >+ String expectedReplacedSource = "thr"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:thr>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3655,7 +4079,7 @@ > /* > * Test for 'try' keyword. > */ >-public void test0092(){ >+public void test0092_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -3687,19 +4111,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:try>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "try"; >- expectedReplacedSource = "try"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'try' keyword. >+ */ >+public void test0092_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:try>;\n" + >+ " try\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "try"; >+ int cursorLocation = str.lastIndexOf("try") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:try>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "try"; >+ String expectedReplacedSource = "try"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:try>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3714,7 +4152,7 @@ > /* > * Test for 'try' keyword. > */ >-public void test0093(){ >+public void test0093_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -3746,19 +4184,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:try>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "try"; >- expectedReplacedSource = "try"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'try' keyword. >+ */ >+public void test0093_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:try>;\n" + >+ " if(try\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "try"; >+ int cursorLocation = str.lastIndexOf("try") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:try>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "try"; >+ String expectedReplacedSource = "try"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:try>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3773,7 +4225,7 @@ > /* > * Test for 'do' keyword. > */ >-public void test0094(){ >+public void test0094_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -3805,19 +4257,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:do>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "do"; >- expectedReplacedSource = "do"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'do' keyword. >+ */ >+public void test0094_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:do>;\n" + >+ " if(do\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "do"; >+ int cursorLocation = str.lastIndexOf("do") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:do>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "do"; >+ String expectedReplacedSource = "do"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:do>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3832,7 +4298,7 @@ > /* > * Test for 'for' keyword. > */ >-public void test0095(){ >+public void test0095_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -3864,19 +4330,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:for>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "for"; >- expectedReplacedSource = "for"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'for' keyword. >+ */ >+public void test0095_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:for>;\n" + >+ " if(for\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "for"; >+ int cursorLocation = str.lastIndexOf("for") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:for>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "for"; >+ String expectedReplacedSource = "for"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:for>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3891,7 +4371,7 @@ > /* > * Test for 'if' keyword. > */ >-public void test0096(){ >+public void test0096_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -3923,19 +4403,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:if>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "if"; >- expectedReplacedSource = "if"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'if' keyword. >+ */ >+public void test0096_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:if>;\n" + >+ " if(if\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "if"; >+ int cursorLocation = str.lastIndexOf("if") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:if>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "if"; >+ String expectedReplacedSource = "if"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:if>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3950,7 +4444,7 @@ > /* > * Test for 'switch' keyword. > */ >-public void test0097(){ >+public void test0097_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -3982,19 +4476,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:swi>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "swi"; >- expectedReplacedSource = "swi"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'switch' keyword. >+ */ >+public void test0097_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:swi>;\n" + >+ " if(swi\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "swi"; >+ int cursorLocation = str.lastIndexOf("swi") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:swi>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "swi"; >+ String expectedReplacedSource = "swi"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:swi>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4009,7 +4517,7 @@ > /* > * Test for 'new' keyword. > */ >-public void test0098(){ >+public void test0098_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4041,19 +4549,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:new>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "new"; >- expectedReplacedSource = "new"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'new' keyword. >+ */ >+public void test0098_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:new>;\n" + >+ " new\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "new"; >+ int cursorLocation = str.lastIndexOf("new") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:new>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "new"; >+ String expectedReplacedSource = "new"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:new>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4068,7 +4590,7 @@ > /* > * Test for 'new' keyword. > */ >-public void test0099(){ >+public void test0099_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4100,19 +4622,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:new>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "new"; >- expectedReplacedSource = "new"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'new' keyword. >+ */ >+public void test0099_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:new>;\n" + >+ " new X\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "new"; >+ int cursorLocation = str.lastIndexOf("new") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:new>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "new"; >+ String expectedReplacedSource = "new"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:new>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4127,7 +4663,7 @@ > /* > * Test for 'new' keyword. > */ >-public void test0100(){ >+public void test0100_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4159,19 +4695,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:new>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "new"; >- expectedReplacedSource = "new"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'new' keyword. >+ */ >+public void test0100_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:new>;\n" + >+ " new X()\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "new"; >+ int cursorLocation = str.lastIndexOf("new") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:new>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "new"; >+ String expectedReplacedSource = "new"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:new>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4394,7 +4944,7 @@ > /* > * Test for 'while' keyword. > */ >-public void test0107(){ >+public void test0107_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4426,19 +4976,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:whi>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "whi"; >- expectedReplacedSource = "whi"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'while' keyword. >+ */ >+public void test0107_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:whi>;\n" + >+ " whi\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "whi"; >+ int cursorLocation = str.lastIndexOf("whi") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:whi>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "whi"; >+ String expectedReplacedSource = "whi"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:whi>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4453,7 +5017,7 @@ > /* > * Test for 'while' keyword. > */ >-public void test0108(){ >+public void test0108_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4485,19 +5049,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:whi>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "whi"; >- expectedReplacedSource = "whi"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'while' keyword. >+ */ >+public void test0108_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:whi>;\n" + >+ " if(whi\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "whi"; >+ int cursorLocation = str.lastIndexOf("whi") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:whi>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "whi"; >+ String expectedReplacedSource = "whi"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:whi>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4512,7 +5090,7 @@ > /* > * Test for 'assert' keyword. > */ >-public void test0109(){ >+public void test0109_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4544,19 +5122,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:ass>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "ass"; >- expectedReplacedSource = "ass"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'assert' keyword. >+ */ >+public void test0109_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:ass>;\n" + >+ " ass\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "ass"; >+ int cursorLocation = str.lastIndexOf("ass") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:ass>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "ass"; >+ String expectedReplacedSource = "ass"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:ass>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4571,7 +5163,7 @@ > /* > * Test for 'assert' keyword. > */ >-public void test0110(){ >+public void test0110_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4603,19 +5195,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:ass>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "ass"; >- expectedReplacedSource = "ass"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'assert' keyword. >+ */ >+public void test0110_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:ass>;\n" + >+ " if(ass\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "ass"; >+ int cursorLocation = str.lastIndexOf("ass") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:ass>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "ass"; >+ String expectedReplacedSource = "ass"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:ass>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5786,7 +6392,7 @@ > /* > * Test for 'synchronized' keyword. > */ >-public void test0147(){ >+public void test0147_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5818,19 +6424,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:syn>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "syn"; >- expectedReplacedSource = "syn"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'synchronized' keyword. >+ */ >+public void test0147_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:syn>;\n" + >+ " syn\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "syn"; >+ int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:syn>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "syn"; >+ String expectedReplacedSource = "syn"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:syn>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5845,7 +6465,7 @@ > /* > * Test for 'synchronized' keyword. > */ >-public void test0148(){ >+public void test0148_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5877,19 +6497,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:syn>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "syn"; >- expectedReplacedSource = "syn"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'synchronized' keyword. >+ */ >+public void test0148_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:syn>;\n" + >+ " if(syn\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "syn"; >+ int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:syn>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "syn"; >+ String expectedReplacedSource = "syn"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:syn>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6885,7 +7519,7 @@ > /* > * Test for 'super' keyword. > */ >-public void test0181(){ >+public void test0181_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -6917,19 +7551,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:sup>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "sup"; >- expectedReplacedSource = "sup"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'super' keyword. >+ */ >+public void test0181_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:sup>;\n" + >+ " void foo(){\n" + >+ " sup\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "sup"; >+ int cursorLocation = str.lastIndexOf("sup") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:sup>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "sup"; >+ String expectedReplacedSource = "sup"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:sup>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6944,7 +7592,7 @@ > /* > * Test for 'this' keyword. > */ >-public void test0182(){ >+public void test0182_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -6976,19 +7624,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:thi>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "thi"; >- expectedReplacedSource = "thi"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'this' keyword. >+ */ >+public void test0182_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:thi>;\n" + >+ " void foo(){\n" + >+ " thi\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "thi"; >+ int cursorLocation = str.lastIndexOf("thi") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:thi>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "thi"; >+ String expectedReplacedSource = "thi"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:thi>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7003,7 +7665,7 @@ > /* > * Test for 'true' keyword. > */ >-public void test0183(){ >+public void test0183_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7035,19 +7697,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:tru>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "tru"; >- expectedReplacedSource = "tru"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'true' keyword. >+ */ >+public void test0183_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:tru>;\n" + >+ " void foo(){\n" + >+ " tru\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "tru"; >+ int cursorLocation = str.lastIndexOf("tru") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:tru>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "tru"; >+ String expectedReplacedSource = "tru"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:tru>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7062,7 +7738,7 @@ > /* > * Test for 'false' keyword. > */ >-public void test0184(){ >+public void test0184_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7094,19 +7770,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:fal>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "fal"; >- expectedReplacedSource = "fal"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'false' keyword. >+ */ >+public void test0184_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:fal>;\n" + >+ " void foo(){\n" + >+ " fal\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "fal"; >+ int cursorLocation = str.lastIndexOf("fal") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:fal>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "fal"; >+ String expectedReplacedSource = "fal"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:fal>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7121,7 +7811,7 @@ > /* > * Test for 'null' keyword. > */ >-public void test0185(){ >+public void test0185_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7153,19 +7843,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:nul>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "nul"; >- expectedReplacedSource = "nul"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'null' keyword. >+ */ >+public void test0185_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:nul>;\n" + >+ " void foo(){\n" + >+ " nul\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "nul"; >+ int cursorLocation = str.lastIndexOf("nul") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:nul>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "nul"; >+ String expectedReplacedSource = "nul"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:nul>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7180,7 +7884,7 @@ > /* > * Test for 'instanceof' keyword. > */ >-public void test0186(){ >+public void test0186_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7212,19 +7916,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnKeyword:ins>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "ins"; >- expectedReplacedSource = "ins"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'instanceof' keyword. >+ */ >+public void test0186_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnKeyword:ins>;\n" + >+ " void foo(){\n" + >+ " if(zzz ins\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "ins"; >+ int cursorLocation = str.lastIndexOf("ins") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnKeyword:ins>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "ins"; >+ String expectedReplacedSource = "ins"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnKeyword:ins>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7239,7 +7957,7 @@ > /* > * Test for 'instanceof' keyword. > */ >-public void test0187(){ >+public void test0187_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7271,19 +7989,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:ins>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "ins"; >- expectedReplacedSource = "ins"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'instanceof' keyword. >+ */ >+public void test0187_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:ins>;\n" + >+ " void foo(){\n" + >+ " ins\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "ins"; >+ int cursorLocation = str.lastIndexOf("ins") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:ins>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "ins"; >+ String expectedReplacedSource = "ins"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:ins>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7298,7 +8030,7 @@ > /* > * Test for 'instanceof' keyword. > */ >-public void test0188(){ >+public void test0188_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7330,20 +8062,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:ins>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "ins"; >- expectedReplacedSource = "ins"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'instanceof' keyword. >+ */ >+public void test0188_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " zzz zzz;\n" + >- " <CompleteOnName:ins>;\n" + >+ " void foo(){\n" + >+ " if(zzz zzz ins\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "ins"; >+ int cursorLocation = str.lastIndexOf("ins") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:ins>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "ins"; >+ String expectedReplacedSource = "ins"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " zzz zzz;\n" + >+ " <CompleteOnName:ins>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7358,7 +8104,7 @@ > /* > * Test for 'while' keyword. > */ >-public void test0189(){ >+public void test0189_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -7391,19 +8137,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnKeyword:whi>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "whi"; >- expectedReplacedSource = "whi"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'while' keyword. >+ */ >+public void test0189_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnKeyword:whi>;\n" + >+ " do{\n" + >+ " } whi\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "whi"; >+ int cursorLocation = str.lastIndexOf("whi") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnKeyword:whi>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "whi"; >+ String expectedReplacedSource = "whi"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnKeyword:whi>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7418,7 +8179,7 @@ > /* > * Test for 'catch' keyword. > */ >-public void test0190(){ >+public void test0190_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -7454,20 +8215,37 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:cat>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cat"; >- expectedReplacedSource = "cat"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'catch' keyword. >+ */ >+public void test0190_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:cat>;\n" + >+ " void foo(){\n" + >+ " try {\n" + >+ " } catch(E e) {\n" + >+ " } cat\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "cat"; >+ int cursorLocation = str.lastIndexOf("cat") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:cat>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cat"; >+ String expectedReplacedSource = "cat"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:cat>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7482,7 +8260,7 @@ > /* > * Test for 'finally' keyword. > */ >-public void test0191(){ >+public void test0191_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -7518,20 +8296,37 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:fin>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "fin"; >- expectedReplacedSource = "fin"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'finally' keyword. >+ */ >+public void test0191_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:fin>;\n" + >+ " void foo(){\n" + >+ " try {" + >+ " } catch(E e) {" + >+ " } fin" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "fin"; >+ int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:fin>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "fin"; >+ String expectedReplacedSource = "fin"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:fin>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7546,7 +8341,7 @@ > /* > * Test for 'finally' keyword. > */ >-public void test0192(){ >+public void test0192_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -7582,20 +8377,37 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:fin>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "fin"; >- expectedReplacedSource = "fin"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'finally' keyword. >+ */ >+public void test0192_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:fin>;\n" + >+ " void foo(){\n" + >+ " try {" + >+ " } finally {" + >+ " } fin" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "fin"; >+ int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:fin>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "fin"; >+ String expectedReplacedSource = "fin"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:fin>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7610,7 +8422,7 @@ > /* > * Test for 'this' keyword. > */ >-public void test0193(){ >+public void test0193_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7642,19 +8454,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:X.thi>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "thi"; >- expectedReplacedSource = "X.thi"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'this' keyword. >+ */ >+public void test0193_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:X.thi>;\n" + >+ " void foo(){\n" + >+ " X.thi\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "thi"; >+ int cursorLocation = str.lastIndexOf("thi") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:X.thi>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "thi"; >+ String expectedReplacedSource = "X.thi"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:X.thi>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8359,7 +9185,7 @@ > /* > * Test for 'abstract' keyword. > */ >-public void test0214(){ >+public void test0214_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -8394,20 +9220,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:abst>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "abst"; >- expectedReplacedSource = "abst"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'abstract' keyword. >+ */ >+public void test0214_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:abst>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " abst\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "abst"; >+ int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:abst>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "abst"; >+ String expectedReplacedSource = "abst"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:abst>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8422,7 +9264,7 @@ > /* > * Test for 'abstract' keyword. > */ >-public void test0216(){ >+public void test0216_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -8457,20 +9299,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:abst>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "abst"; >- expectedReplacedSource = "abst"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'abstract' keyword. >+ */ >+public void test0216_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:abst>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " abst zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "abst"; >+ int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:abst>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "abst"; >+ String expectedReplacedSource = "abst"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:abst>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8485,7 +9343,7 @@ > /* > * Test for 'break' keyword. > */ >-public void test0217(){ >+public void test0217_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -8520,20 +9378,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:bre>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "bre"; >- expectedReplacedSource = "bre"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'break' keyword. >+ */ >+public void test0217_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:bre>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " bre\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "bre"; >+ int cursorLocation = str.lastIndexOf("bre") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:bre>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "bre"; >+ String expectedReplacedSource = "bre"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:bre>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8548,7 +9422,7 @@ > /* > * Test for 'break' keyword. > */ >-public void test0218(){ >+public void test0218_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -8585,23 +9459,41 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:bre>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "bre"; >- expectedReplacedSource = "bre"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'break' keyword. >+ */ >+public void test0218_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " int i;\n" + >- " {\n" + >- " <CompleteOnName:bre>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " for(int i; i < 10; i++) {\n" + >+ " bre\n" + > " }\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "bre"; >+ int cursorLocation = str.lastIndexOf("bre") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:bre>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "bre"; >+ String expectedReplacedSource = "bre"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " int i;\n" + >+ " {\n" + >+ " <CompleteOnName:bre>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8616,7 +9508,7 @@ > /* > * Test for 'case' keyword. > */ >-public void test0219(){ >+public void test0219_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -8651,20 +9543,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:cas>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cas"; >- expectedReplacedSource = "cas"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'case' keyword. >+ */ >+public void test0219_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:cas>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " cas\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "cas"; >+ int cursorLocation = str.lastIndexOf("cas") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:cas>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cas"; >+ String expectedReplacedSource = "cas"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:cas>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8679,7 +9587,7 @@ > /* > * Test for 'case' keyword. > */ >-public void test0220(){ >+public void test0220_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -8716,22 +9624,40 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnKeyword:cas>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cas"; >- expectedReplacedSource = "cas"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'case' keyword. >+ */ >+public void test0220_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " {\n" + >- " <CompleteOnKeyword:cas>;\n" + >- " }\n"+ >+ " void foo(){\n" + >+ " #\n" + >+ " switch(0) {\n" + >+ " cas\n" + >+ " }\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "cas"; >+ int cursorLocation = str.lastIndexOf("cas") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnKeyword:cas>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cas"; >+ String expectedReplacedSource = "cas"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " {\n" + >+ " <CompleteOnKeyword:cas>;\n" + >+ " }\n"+ >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8746,7 +9672,7 @@ > /* > * Test for 'catch' keyword. > */ >-public void test0221(){ >+public void test0221_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -8781,20 +9707,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:cat>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cat"; >- expectedReplacedSource = "cat"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'catch' keyword. >+ */ >+public void test0221_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:cat>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " cat\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "cat"; >+ int cursorLocation = str.lastIndexOf("cat") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:cat>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cat"; >+ String expectedReplacedSource = "cat"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:cat>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8809,7 +9751,7 @@ > /* > * Test for 'catch' keyword. > */ >-public void test0222(){ >+public void test0222_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -8845,20 +9787,37 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnKeyword:cat>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cat"; >- expectedReplacedSource = "cat"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'catch' keyword. >+ */ >+public void test0222_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnKeyword:cat>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " try {\n" + >+ " } cat\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "cat"; >+ int cursorLocation = str.lastIndexOf("cat") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnKeyword:cat>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cat"; >+ String expectedReplacedSource = "cat"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnKeyword:cat>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9121,7 +10080,7 @@ > /* > * Test for 'class' keyword. > */ >-public void test0231(){ >+public void test0231_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -9154,19 +10113,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:cla>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cla"; >- expectedReplacedSource = "cla"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'class' keyword. >+ */ >+public void test0231_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:cla>;\n" + >+ " #\n" + >+ " cla\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "cla"; >+ int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:cla>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cla"; >+ String expectedReplacedSource = "cla"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:cla>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9181,7 +10155,7 @@ > /* > * Test for 'class' keyword. > */ >-public void test0232(){ >+public void test0232_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -9214,19 +10188,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:cla>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cla"; >- expectedReplacedSource = "cla"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'class' keyword. >+ */ >+public void test0232_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:cla>;\n" + >+ " #\n" + >+ " final cla\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "cla"; >+ int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:cla>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cla"; >+ String expectedReplacedSource = "cla"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:cla>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9241,7 +10230,7 @@ > /* > * Test for 'class' keyword. > */ >-public void test0233(){ >+public void test0233_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -9274,19 +10263,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:cla>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cla"; >- expectedReplacedSource = "cla"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'class' keyword. >+ */ >+public void test0233_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:cla>;\n" + >+ " #\n" + >+ " final cla Y\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "cla"; >+ int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:cla>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cla"; >+ String expectedReplacedSource = "cla"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:cla>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9301,7 +10305,7 @@ > /* > * Test for 'continue' keyword. > */ >-public void test0234(){ >+public void test0234_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -9336,20 +10340,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:con>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "con"; >- expectedReplacedSource = "con"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'continue' keyword. >+ */ >+public void test0234_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:con>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " con\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "con"; >+ int cursorLocation = str.lastIndexOf("con") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:con>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "con"; >+ String expectedReplacedSource = "con"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:con>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9364,7 +10384,7 @@ > /* > * Test for 'continue' keyword. > */ >-public void test0235(){ >+public void test0235_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -9401,23 +10421,41 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:con>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "con"; >- expectedReplacedSource = "con"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'continue' keyword. >+ */ >+public void test0235_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " int i;\n" + >- " {\n" + >- " <CompleteOnName:con>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " for(int i; i < 5; i++) {\n" + >+ " con\n" + > " }\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "con"; >+ int cursorLocation = str.lastIndexOf("con") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:con>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "con"; >+ String expectedReplacedSource = "con"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " int i;\n" + >+ " {\n" + >+ " <CompleteOnName:con>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9432,7 +10470,7 @@ > /* > * Test for 'default' keyword. > */ >-public void test0236(){ >+public void test0236_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -9467,20 +10505,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:def>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "def"; >- expectedReplacedSource = "def"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'default' keyword. >+ */ >+public void test0236_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:def>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " def\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "def"; >+ int cursorLocation = str.lastIndexOf("def") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:def>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "def"; >+ String expectedReplacedSource = "def"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:def>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9495,7 +10549,7 @@ > /* > * Test for 'default' keyword. > */ >-public void test0237(){ >+public void test0237_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -9533,22 +10587,41 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:def>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "def"; >- expectedReplacedSource = "def"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'default' keyword. >+ */ >+public void test0237_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " {\n" + >- " <CompleteOnName:def>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " switch(0) {\n" + >+ " case 1 : break;\n" + >+ " def\n" + > " }\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "def"; >+ int cursorLocation = str.lastIndexOf("def") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:def>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "def"; >+ String expectedReplacedSource = "def"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " {\n" + >+ " <CompleteOnName:def>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9563,7 +10636,7 @@ > /* > * Test for 'do' keyword. > */ >-public void test0238(){ >+public void test0238_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -9598,20 +10671,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:do>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "do"; >- expectedReplacedSource = "do"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'do' keyword. >+ */ >+public void test0238_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:do>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " do\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "do"; >+ int cursorLocation = str.lastIndexOf("do") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:do>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "do"; >+ String expectedReplacedSource = "do"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:do>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9626,7 +10715,7 @@ > /* > * Test for 'else' keyword. > */ >-public void test0239(){ >+public void test0239_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -9661,20 +10750,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:els>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "els"; >- expectedReplacedSource = "els"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'else' keyword. >+ */ >+public void test0239_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:els>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " els\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "els"; >+ int cursorLocation = str.lastIndexOf("els") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:els>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "els"; >+ String expectedReplacedSource = "els"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:els>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9689,7 +10794,7 @@ > /* > * Test for 'else' keyword. > */ >-public void test0240(){ >+public void test0240_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -9725,20 +10830,37 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:els>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "els"; >- expectedReplacedSource = "els"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'else' keyword. >+ */ >+public void test0240_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:els>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " if(true) {\n" + >+ " } els\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "els"; >+ int cursorLocation = str.lastIndexOf("els") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:els>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "els"; >+ String expectedReplacedSource = "els"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:els>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9994,7 +11116,7 @@ > /* > * Test for 'finally' keyword. > */ >-public void test0249(){ >+public void test0249_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -10029,20 +11151,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:fin>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "fin"; >- expectedReplacedSource = "fin"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'finally' keyword. >+ */ >+public void test0249_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:fin>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " fin" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "fin"; >+ int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:fin>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "fin"; >+ String expectedReplacedSource = "fin"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:fin>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -10057,7 +11195,7 @@ > /* > * Test for 'finally' keyword. > */ >-public void test0250(){ >+public void test0250_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -10093,20 +11231,37 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnKeyword:fin>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "fin"; >- expectedReplacedSource = "fin"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'finally' keyword. >+ */ >+public void test0250_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnKeyword:fin>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " try {" + >+ " } fin" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "fin"; >+ int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnKeyword:fin>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "fin"; >+ String expectedReplacedSource = "fin"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnKeyword:fin>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -10121,7 +11276,7 @@ > /* > * Test for 'for' keyword. > */ >-public void test0251(){ >+public void test0251_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -10156,20 +11311,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:for>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "for"; >- expectedReplacedSource = "for"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'for' keyword. >+ */ >+public void test0251_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:for>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " for" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "for"; >+ int cursorLocation = str.lastIndexOf("for") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:for>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "for"; >+ String expectedReplacedSource = "for"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:for>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -10184,7 +11355,7 @@ > /* > * Test for 'if' keyword. > */ >-public void test0252(){ >+public void test0252_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -10219,20 +11390,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:if>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "if"; >- expectedReplacedSource = "if"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'if' keyword. >+ */ >+public void test0252_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:if>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " if" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "if"; >+ int cursorLocation = str.lastIndexOf("if") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:if>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "if"; >+ String expectedReplacedSource = "if"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:if>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -10247,7 +11434,7 @@ > /* > * Test for 'switch' keyword. > */ >-public void test0253(){ >+public void test0253_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -10282,20 +11469,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:swi>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "swi"; >- expectedReplacedSource = "swi"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'switch' keyword. >+ */ >+public void test0253_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:swi>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " swi" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "swi"; >+ int cursorLocation = str.lastIndexOf("swi") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:swi>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "swi"; >+ String expectedReplacedSource = "swi"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:swi>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -10917,7 +12120,7 @@ > /* > * Test for 'interface' keyword. > */ >-public void test0274(){ >+public void test0274_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -10950,19 +12153,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:int>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "int"; >- expectedReplacedSource = "int"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'interface' keyword. >+ */ >+public void test0274_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:int>;\n" + >+ " #\n" + >+ " int\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "int"; >+ int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:int>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "int"; >+ String expectedReplacedSource = "int"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:int>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -10977,7 +12195,7 @@ > /* > * Test for 'interface' keyword. > */ >-public void test0275(){ >+public void test0275_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -11010,19 +12228,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:int>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "int"; >- expectedReplacedSource = "int"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'interface' keyword. >+ */ >+public void test0275_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:int>;\n" + >+ " #\n" + >+ " abstract int\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "int"; >+ int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:int>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "int"; >+ String expectedReplacedSource = "int"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:int>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -11037,7 +12270,7 @@ > /* > * Test for 'interface' keyword. > */ >-public void test0276(){ >+public void test0276_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -11070,19 +12303,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:int>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "int"; >- expectedReplacedSource = "int"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'interface' keyword. >+ */ >+public void test0276_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:int>;\n" + >+ " #\n" + >+ " abstract int Y\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "int"; >+ int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:int>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "int"; >+ String expectedReplacedSource = "int"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:int>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -11302,7 +12550,7 @@ > /* > * Test for 'return' keyword. > */ >-public void test0284(){ >+public void test0284_Diet(){ > String str = > "public class X {\n" + > " int foo() {\n" + >@@ -11335,19 +12583,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:ret>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "ret"; >- expectedReplacedSource = "ret"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'return' keyword. >+ */ >+public void test0284_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " int foo() {\n" + >- " <CompleteOnName:ret>;\n" + >+ " #\n" + >+ " ret\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "ret"; >+ int cursorLocation = str.lastIndexOf("ret") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:ret>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "ret"; >+ String expectedReplacedSource = "ret"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " int foo() {\n" + >+ " <CompleteOnName:ret>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -11362,7 +12625,7 @@ > /* > * Test for 'throw' keyword. > */ >-public void test0285(){ >+public void test0285_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -11395,19 +12658,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:thr>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "thr"; >- expectedReplacedSource = "thr"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'throw' keyword. >+ */ >+public void test0285_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:thr>;\n" + >+ " #\n" + >+ " thr\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "thr"; >+ int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:thr>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "thr"; >+ String expectedReplacedSource = "thr"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:thr>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -11422,7 +12700,7 @@ > /* > * Test for 'try' keyword. > */ >-public void test0286(){ >+public void test0286_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -11455,19 +12733,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:try>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "try"; >- expectedReplacedSource = "try"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * Test for 'try' keyword. >+ */ >+public void test0286_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnName:try>;\n" + >+ " #\n" + >+ " try\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "try"; >+ int cursorLocation = str.lastIndexOf("try") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:try>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "try"; >+ String expectedReplacedSource = "try"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:try>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -11482,7 +12775,7 @@ > /* > * Test for 'try' keyword. > */ >-public void test0287(){ >+public void test0287_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -11515,19 +12808,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:try>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "try"; >- expectedReplacedSource = "try"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'try' keyword. >+ */ >+public void test0287_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:try>;\n" + >+ " #\n" + >+ " if(try\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "try"; >+ int cursorLocation = str.lastIndexOf("try") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:try>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "try"; >+ String expectedReplacedSource = "try"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:try>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -11542,7 +12850,7 @@ > /* > * Test for 'do' keyword. > */ >-public void test0288(){ >+public void test0288_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -11575,19 +12883,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:do>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "do"; >- expectedReplacedSource = "do"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'do' keyword. >+ */ >+public void test0288_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:do>;\n" + >+ " #\n" + >+ " if(do\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "do"; >+ int cursorLocation = str.lastIndexOf("do") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:do>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "do"; >+ String expectedReplacedSource = "do"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:do>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -11602,7 +12925,7 @@ > /* > * Test for 'for' keyword. > */ >-public void test0289(){ >+public void test0289_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -11635,19 +12958,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:for>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "for"; >- expectedReplacedSource = "for"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'for' keyword. >+ */ >+public void test0289_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:for>;\n" + >+ " #\n" + >+ " if(for\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "for"; >+ int cursorLocation = str.lastIndexOf("for") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:for>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "for"; >+ String expectedReplacedSource = "for"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:for>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -11662,7 +13000,7 @@ > /* > * Test for 'if' keyword. > */ >-public void test0290(){ >+public void test0290_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -11695,19 +13033,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:if>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "if"; >- expectedReplacedSource = "if"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'if' keyword. >+ */ >+public void test0290_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:if>;\n" + >+ " #\n" + >+ " if(if\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "if"; >+ int cursorLocation = str.lastIndexOf("if") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:if>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "if"; >+ String expectedReplacedSource = "if"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:if>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -11722,7 +13075,7 @@ > /* > * Test for 'switch' keyword. > */ >-public void test0291(){ >+public void test0291_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -11755,19 +13108,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:swi>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "swi"; >- expectedReplacedSource = "swi"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'switch' keyword. >+ */ >+public void test0291_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:swi>;\n" + >+ " #\n" + >+ " if(swi\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "swi"; >+ int cursorLocation = str.lastIndexOf("swi") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:swi>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "swi"; >+ String expectedReplacedSource = "swi"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:swi>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -11782,7 +13150,7 @@ > /* > * Test for 'new' keyword. > */ >-public void test0292(){ >+public void test0292_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -11815,19 +13183,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:new>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "new"; >- expectedReplacedSource = "new"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'new' keyword. >+ */ >+public void test0292_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:new>;\n" + >+ " #\n" + >+ " new\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "new"; >+ int cursorLocation = str.lastIndexOf("new") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:new>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "new"; >+ String expectedReplacedSource = "new"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:new>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -11842,7 +13225,7 @@ > /* > * Test for 'new' keyword. > */ >-public void test0293(){ >+public void test0293_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -11875,19 +13258,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:new>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "new"; >- expectedReplacedSource = "new"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'new' keyword. >+ */ >+public void test0293_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:new>;\n" + >+ " #\n" + >+ " new X\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "new"; >+ int cursorLocation = str.lastIndexOf("new") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:new>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "new"; >+ String expectedReplacedSource = "new"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:new>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -11902,7 +13300,7 @@ > /* > * Test for 'new' keyword. > */ >-public void test0294(){ >+public void test0294_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -11935,19 +13333,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:new>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "new"; >- expectedReplacedSource = "new"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'new' keyword. >+ */ >+public void test0294_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:new>;\n" + >+ " #\n" + >+ " new X()\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "new"; >+ int cursorLocation = str.lastIndexOf("new") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:new>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "new"; >+ String expectedReplacedSource = "new"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:new>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -12176,7 +13589,7 @@ > /* > * Test for 'while' keyword. > */ >-public void test0301(){ >+public void test0301_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -12209,19 +13622,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:whi>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "whi"; >- expectedReplacedSource = "whi"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'while' keyword. >+ */ >+public void test0301_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:whi>;\n" + >+ " #\n" + >+ " whi\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "whi"; >+ int cursorLocation = str.lastIndexOf("whi") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:whi>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "whi"; >+ String expectedReplacedSource = "whi"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:whi>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -12236,7 +13664,7 @@ > /* > * Test for 'while' keyword. > */ >-public void test0302(){ >+public void test0302_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -12269,19 +13697,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:whi>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "whi"; >- expectedReplacedSource = "whi"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'while' keyword. >+ */ >+public void test0302_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:whi>;\n" + >+ " #\n" + >+ " if(whi\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "whi"; >+ int cursorLocation = str.lastIndexOf("whi") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:whi>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "whi"; >+ String expectedReplacedSource = "whi"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:whi>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -12296,7 +13739,7 @@ > /* > * Test for 'assert' keyword. > */ >-public void test0303(){ >+public void test0303_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -12329,19 +13772,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:ass>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "ass"; >- expectedReplacedSource = "ass"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'assert' keyword. >+ */ >+public void test0303_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:ass>;\n" + >+ " #\n" + >+ " ass\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "ass"; >+ int cursorLocation = str.lastIndexOf("ass") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:ass>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "ass"; >+ String expectedReplacedSource = "ass"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:ass>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -12356,7 +13814,7 @@ > /* > * Test for 'assert' keyword. > */ >-public void test0304(){ >+public void test0304_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -12389,19 +13847,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:ass>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "ass"; >- expectedReplacedSource = "ass"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'assert' keyword. >+ */ >+public void test0304_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:ass>;\n" + >+ " #\n" + >+ " if(ass\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "ass"; >+ int cursorLocation = str.lastIndexOf("ass") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:ass>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "ass"; >+ String expectedReplacedSource = "ass"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:ass>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -13608,7 +15081,7 @@ > /* > * Test for 'synchronized' keyword. > */ >-public void test0341(){ >+public void test0341_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -13641,19 +15114,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:syn>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "syn"; >- expectedReplacedSource = "syn"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'synchronized' keyword. >+ */ >+public void test0341_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:syn>;\n" + >+ " #\n" + >+ " syn\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "syn"; >+ int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:syn>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "syn"; >+ String expectedReplacedSource = "syn"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:syn>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -13668,7 +15156,7 @@ > /* > * Test for 'synchronized' keyword. > */ >-public void test0342(){ >+public void test0342_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -13701,19 +15189,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:syn>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "syn"; >- expectedReplacedSource = "syn"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'synchronized' keyword. >+ */ >+public void test0342_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnName:syn>;\n" + >+ " #\n" + >+ " if(syn\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "syn"; >+ int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:syn>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "syn"; >+ String expectedReplacedSource = "syn"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:syn>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -14741,7 +16244,7 @@ > /* > * Test for 'super' keyword. > */ >-public void test0375(){ >+public void test0375_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -14774,19 +16277,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:sup>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "sup"; >- expectedReplacedSource = "sup"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'super' keyword. >+ */ >+public void test0375_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:sup>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " sup\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "sup"; >+ int cursorLocation = str.lastIndexOf("sup") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:sup>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "sup"; >+ String expectedReplacedSource = "sup"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:sup>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -14801,7 +16319,7 @@ > /* > * Test for 'this' keyword. > */ >-public void test0376(){ >+public void test0376_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -14834,19 +16352,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:thi>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "thi"; >- expectedReplacedSource = "thi"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'this' keyword. >+ */ >+public void test0376_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:thi>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " thi\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "thi"; >+ int cursorLocation = str.lastIndexOf("thi") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:thi>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "thi"; >+ String expectedReplacedSource = "thi"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:thi>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -14861,7 +16394,7 @@ > /* > * Test for 'true' keyword. > */ >-public void test0377(){ >+public void test0377_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -14894,19 +16427,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:tru>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "tru"; >- expectedReplacedSource = "tru"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'true' keyword. >+ */ >+public void test0377_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:tru>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " tru\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "tru"; >+ int cursorLocation = str.lastIndexOf("tru") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:tru>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "tru"; >+ String expectedReplacedSource = "tru"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:tru>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -14921,7 +16469,7 @@ > /* > * Test for 'false' keyword. > */ >-public void test0378(){ >+public void test0378_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -14954,19 +16502,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:fal>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "fal"; >- expectedReplacedSource = "fal"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'false' keyword. >+ */ >+public void test0378_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:fal>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " fal\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "fal"; >+ int cursorLocation = str.lastIndexOf("fal") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:fal>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "fal"; >+ String expectedReplacedSource = "fal"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:fal>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -14981,7 +16544,7 @@ > /* > * Test for 'null' keyword. > */ >-public void test0379(){ >+public void test0379_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -15014,19 +16577,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:nul>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "nul"; >- expectedReplacedSource = "nul"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'null' keyword. >+ */ >+public void test0379_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:nul>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " nul\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "nul"; >+ int cursorLocation = str.lastIndexOf("nul") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:nul>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "nul"; >+ String expectedReplacedSource = "nul"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:nul>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -15041,7 +16619,7 @@ > /* > * Test for 'instanceof' keyword. > */ >-public void test0380(){ >+public void test0380_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -15074,19 +16652,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnKeyword:ins>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "ins"; >- expectedReplacedSource = "ins"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'instanceof' keyword. >+ */ >+public void test0380_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnKeyword:ins>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " if(zzz ins\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "ins"; >+ int cursorLocation = str.lastIndexOf("ins") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnKeyword:ins>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "ins"; >+ String expectedReplacedSource = "ins"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnKeyword:ins>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -15101,7 +16694,7 @@ > /* > * Test for 'instanceof' keyword. > */ >-public void test0381(){ >+public void test0381_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -15134,19 +16727,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:ins>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "ins"; >- expectedReplacedSource = "ins"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'instanceof' keyword. >+ */ >+public void test0381_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:ins>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " ins\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "ins"; >+ int cursorLocation = str.lastIndexOf("ins") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:ins>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "ins"; >+ String expectedReplacedSource = "ins"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:ins>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -15161,7 +16769,7 @@ > /* > * Test for 'instanceof' keyword. > */ >-public void test0382(){ >+public void test0382_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -15194,20 +16802,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:ins>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "ins"; >- expectedReplacedSource = "ins"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'instanceof' keyword. >+ */ >+public void test0382_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " zzz zzz;\n" + >- " <CompleteOnName:ins>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " if(zzz zzz ins\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "ins"; >+ int cursorLocation = str.lastIndexOf("ins") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:ins>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "ins"; >+ String expectedReplacedSource = "ins"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " zzz zzz;\n" + >+ " <CompleteOnName:ins>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -15222,7 +16845,7 @@ > /* > * Test for 'while' keyword. > */ >-public void test0384(){ >+public void test0384_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -15256,19 +16879,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnKeyword:whi>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "whi"; >- expectedReplacedSource = "whi"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'while' keyword. >+ */ >+public void test0384_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " <CompleteOnKeyword:whi>;\n" + >+ " #\n" + >+ " do{\n" + >+ " } whi\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ String completeBehind = "whi"; >+ int cursorLocation = str.lastIndexOf("whi") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnKeyword:whi>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "whi"; >+ String expectedReplacedSource = "whi"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnKeyword:whi>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -15283,7 +16922,7 @@ > /* > * Test for 'catch' keyword. > */ >-public void test0385(){ >+public void test0385_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -15320,20 +16959,38 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:cat>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "cat"; >- expectedReplacedSource = "cat"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'catch' keyword. >+ */ >+public void test0385_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:cat>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " try {\n" + >+ " } catch(E e) {\n" + >+ " } cat\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "cat"; >+ int cursorLocation = str.lastIndexOf("cat") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:cat>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "cat"; >+ String expectedReplacedSource = "cat"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:cat>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -15348,7 +17005,7 @@ > /* > * Test for 'finally' keyword. > */ >-public void test0386(){ >+public void test0386_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -15385,20 +17042,38 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:fin>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "fin"; >- expectedReplacedSource = "fin"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'finally' keyword. >+ */ >+public void test0386_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:fin>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " try {" + >+ " } catch(E e) {" + >+ " } fin" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "fin"; >+ int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:fin>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "fin"; >+ String expectedReplacedSource = "fin"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:fin>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -15413,7 +17088,7 @@ > /* > * Test for 'finally' keyword. > */ >-public void test0387(){ >+public void test0387_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -15450,20 +17125,38 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:fin>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "fin"; >- expectedReplacedSource = "fin"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'finally' keyword. >+ */ >+public void test0387_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:fin>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " try {" + >+ " } finally {" + >+ " } fin" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "fin"; >+ int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:fin>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "fin"; >+ String expectedReplacedSource = "fin"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:fin>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -15478,7 +17171,7 @@ > /* > * Test for 'this' keyword. > */ >-public void test0388(){ >+public void test0388_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -15511,19 +17204,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:X.thi>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "thi"; >- expectedReplacedSource = "X.thi"; >- expectedUnitDisplayString = >+} >+/* >+ * Test for 'this' keyword. >+ */ >+public void test0388_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:X.thi>;\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " X.thi\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "thi"; >+ int cursorLocation = str.lastIndexOf("thi") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:X.thi>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "thi"; >+ String expectedReplacedSource = "X.thi"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:X.thi>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >Index: src/org/eclipse/jdt/core/tests/compiler/parser/CompletionParserTest2.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/CompletionParserTest2.java,v >retrieving revision 1.42 >diff -u -r1.42 CompletionParserTest2.java >--- src/org/eclipse/jdt/core/tests/compiler/parser/CompletionParserTest2.java 12 Feb 2007 14:36:41 -0000 1.42 >+++ src/org/eclipse/jdt/core/tests/compiler/parser/CompletionParserTest2.java 28 Mar 2007 08:17:40 -0000 >@@ -51,7 +51,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0002(){ >+public void test0002_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -85,21 +85,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0002_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " Object o = <CompleteOnName:zzz>;\n" + >- " }\n" + >- " public X() {\n" + >+ " Object o = zzz;\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " Object o = <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -110,7 +122,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0003(){ >+public void test0003_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -144,20 +156,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o = <CompleteOnName:zzz>;\n" + >+} >+public void test0003_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " Object o = zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o = <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -202,7 +226,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0005(){ >+public void test0005_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -237,22 +261,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0005_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " {\n" + >- " Object o = <CompleteOnName:zzz>;\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ " #\n" + >+ " Object o = zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " Object o = <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -264,7 +301,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0006(){ >+public void test0006_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -299,21 +336,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o = <CompleteOnName:zzz>;\n" + >+} >+public void test0006_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " Object o = zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o = <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -356,7 +405,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0008(){ >+public void test0008_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -389,21 +438,33 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:zzz>"; >- expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+ "diet ast"); >+} >+public void test0008_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " Object o = new <CompleteOnType:zzz>();\n" + >- " }\n" + >- " public X() {\n" + >+ " Object o = new zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnType:zzz>"; >+ String expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " Object o = new <CompleteOnType:zzz>();\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -415,7 +476,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0009(){ >+public void test0009_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -448,21 +509,33 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:zzz>"; >- expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o = new <CompleteOnType:zzz>();\n" + >+ "diet ast"); >+} >+public void test0009_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " Object o = new zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnType:zzz>"; >+ String expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o = new <CompleteOnType:zzz>();\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -507,7 +580,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0011(){ >+public void test0011_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -541,24 +614,37 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:zzz>"; >- expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " {\n" + >- " {\n" + >- " Object o = new <CompleteOnType:zzz>();\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ "diet ast"); >+} >+public void test0011_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " #\n" + >+ " Object o = new zzz;\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnType:zzz>"; >+ String expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " Object o = new <CompleteOnType:zzz>();\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -569,7 +655,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0012(){ >+public void test0012_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -603,21 +689,34 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:zzz>"; >- expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o = new <CompleteOnType:zzz>();\n" + >+ "diet ast"); >+} >+public void test0012_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " Object o = new zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnType:zzz>"; >+ String expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o = new <CompleteOnType:zzz>();\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -664,7 +763,7 @@ > "diet ast"); > } > >-public void test0014(){ >+public void test0014_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -698,22 +797,35 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+ "diet ast"); >+} >+public void test0014_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " Object o;\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " public X() {\n" + >+ " Object o = yyy;\n" + >+ " zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -726,7 +838,7 @@ > "full ast"); > } > >-public void test0015(){ >+public void test0015_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -760,22 +872,35 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o;\n" + >- " <CompleteOnName:zzz>;\n" + >+ "diet ast"); >+} >+public void test0015_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " Object o = yyy;\n" + >+ " zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -824,7 +949,7 @@ > "diet ast"); > } > >-public void test0017(){ >+public void test0017_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -859,24 +984,38 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+ "diet ast"); >+} >+public void test0017_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " {\n" + >- " Object o;\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ " #\n" + >+ " Object o = yyy;\n" + >+ " zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -889,7 +1028,7 @@ > "full ast"); > } > >-public void test0018(){ >+public void test0018_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -924,22 +1063,36 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o;\n" + >- " <CompleteOnName:zzz>;\n" + >+ "diet ast"); >+} >+public void test0018_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " Object o = yyy;\n" + >+ " zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -984,7 +1137,7 @@ > "diet ast"); > } > >-public void test0020(){ >+public void test0020_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1017,21 +1170,33 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+ "diet ast"); >+} >+public void test0020_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " Object o = bar(<CompleteOnName:zzz>);\n" + >- " }\n" + >- " public X() {\n" + >+ " Object o = bar(zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " Object o = bar(<CompleteOnName:zzz>);\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1044,7 +1209,7 @@ > "full ast"); > } > >-public void test0021(){ >+public void test0021_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1077,21 +1242,33 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o = bar(<CompleteOnName:zzz>);\n" + >+ "diet ast"); >+} >+public void test0021_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " Object o = bar(zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o = bar(<CompleteOnName:zzz>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1138,7 +1315,7 @@ > "diet ast"); > } > >-public void test0023(){ >+public void test0023_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1172,23 +1349,36 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+ "diet ast"); >+} >+public void test0023_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " {\n" + >- " Object o = bar(<CompleteOnName:zzz>);\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ " #\n" + >+ " Object o = bar(zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " Object o = bar(<CompleteOnName:zzz>);\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1201,7 +1391,7 @@ > "full ast"); > } > >-public void test0024(){ >+public void test0024_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1235,21 +1425,34 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o = bar(<CompleteOnName:zzz>);\n" + >+ "diet ast"); >+} >+public void test0024_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " Object o = bar(zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "bar(<CompleteOnName:zzz>)"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o = bar(<CompleteOnName:zzz>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1295,7 +1498,7 @@ > } > > >-public void test0026(){ >+public void test0026_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1328,21 +1531,33 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+ "diet ast"); >+} >+public void test0026_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " Object o = new X(<CompleteOnName:zzz>);\n" + >- " }\n" + >- " public X() {\n" + >+ " Object o = new X(zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " Object o = new X(<CompleteOnName:zzz>);\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1356,7 +1571,7 @@ > } > > >-public void test0027(){ >+public void test0027_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1389,21 +1604,33 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o = new X(<CompleteOnName:zzz>);\n" + >+ "diet ast"); >+} >+public void test0027_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " Object o = new X(zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o = new X(<CompleteOnName:zzz>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1452,7 +1679,7 @@ > } > > >-public void test0029(){ >+public void test0029_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1486,23 +1713,36 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+ "diet ast"); >+} >+public void test0029_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " {\n" + >- " Object o = new X(<CompleteOnName:zzz>);\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ " #\n" + >+ " Object o = new X(zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " Object o = new X(<CompleteOnName:zzz>);\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1516,7 +1756,7 @@ > } > > >-public void test0030(){ >+public void test0030_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1550,21 +1790,34 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o = new X(<CompleteOnName:zzz>);\n" + >+ "diet ast"); >+} >+public void test0030_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " Object o = new X(zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X(<CompleteOnName:zzz>)"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o = new X(<CompleteOnName:zzz>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1576,7 +1829,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0031(){ >+public void test0031_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1609,21 +1862,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " Object o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0031_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " Object o = {zzz;\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " Object o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1636,7 +1899,7 @@ > "full ast"); > } > >-public void test0032(){ >+public void test0032_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1670,23 +1933,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0032_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " Object o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ " Object o = {zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " Object o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1699,7 +1974,7 @@ > "full ast"); > } > >-public void test0033(){ >+public void test0033_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1736,23 +2011,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >+} >+public void test0033_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " Object o = {zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1765,7 +2052,7 @@ > "full ast"); > } > >-public void test0034(){ >+public void test0034_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1799,21 +2086,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " Object o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0034_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " #\n" + >+ " Object o = {zzz;\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " Object o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1826,7 +2124,7 @@ > "full ast"); > } > >-public void test0035(){ >+public void test0035_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1861,25 +2159,38 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0035_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " {\n" + >- " Object o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ " #\n" + >+ " Object o = {zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " Object o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1892,7 +2203,7 @@ > "full ast"); > } > >-public void test0036(){ >+public void test0036_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -1930,23 +2241,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >+} >+public void test0036_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " Object o = {zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1992,7 +2316,7 @@ > } > > >-public void test0038(){ >+public void test0038_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2026,20 +2350,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0038_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " Object[] o = {<CompleteOnName:zzz>};\n" + >- " }\n" + >- " public X() {\n" + >+ " Object[] o = {zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " Object[] o = {<CompleteOnName:zzz>};\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2053,7 +2389,7 @@ > } > > >-public void test0039(){ >+public void test0039_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2090,20 +2426,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object[] o = {<CompleteOnName:zzz>};\n" + >+} >+public void test0039_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " Object[] o = {zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object[] o = {<CompleteOnName:zzz>};\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2152,7 +2500,7 @@ > } > > >-public void test0041(){ >+public void test0041_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2187,22 +2535,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0041_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " {\n" + >- " Object[] o = {<CompleteOnName:zzz>};\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ " #\n" + >+ " Object[] o = {zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " Object[] o = {<CompleteOnName:zzz>};\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2216,7 +2577,7 @@ > } > > >-public void test0042(){ >+public void test0042_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2254,20 +2615,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object[] o = {<CompleteOnName:zzz>};\n" + >+} >+public void test0042_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " Object[] o = {zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object[] o = {<CompleteOnName:zzz>};\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2314,7 +2688,7 @@ > > > >-public void test0044(){ >+public void test0044_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2348,20 +2722,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " {\n" + >- " Object[] o = new X[<CompleteOnName:zzz>];\n" + >- " }\n" + >- " public X() {\n" + >+} >+public void test0044_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " Object[] o = new X[zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " Object[] o = new X[<CompleteOnName:zzz>];\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2376,7 +2762,7 @@ > > > >-public void test0045(){ >+public void test0045_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2409,21 +2795,33 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object[] o = new X[<CompleteOnName:zzz>];\n" + >+ "diet ast"); >+} >+public void test0045_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " Object[] o = new X[zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object[] o = new X[<CompleteOnName:zzz>];\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2474,7 +2872,7 @@ > > > >-public void test0047(){ >+public void test0047_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2509,22 +2907,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " {\n" + >- " {\n" + >- " Object[] o = new X[<CompleteOnName:zzz>];\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+} >+public void test0047_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " #\n" + >+ " Object[] o = new X[zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " Object[] o = new X[<CompleteOnName:zzz>];\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2539,7 +2950,7 @@ > > > >-public void test0048(){ >+public void test0048_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2574,20 +2985,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object[] o = new X[<CompleteOnName:zzz>];\n" + >+} >+public void test0048_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " Object[] o = new X[zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object[] o = new X[<CompleteOnName:zzz>];\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2631,7 +3055,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0050(){ >+public void test0050_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2665,20 +3089,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0050_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " Object[] o = new X[]{<CompleteOnName:zzz>};\n" + >- " }\n" + >- " public X() {\n" + >+ " Object[] o = new X[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " Object[] o = new X[]{<CompleteOnName:zzz>};\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2690,7 +3126,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0051(){ >+public void test0051_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2726,21 +3162,33 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object[] o = new X[]{<CompleteOnName:zzz>};\n" + >+ "diet ast"); >+} >+public void test0051_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " Object[] o = new X[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object[] o = new X[]{<CompleteOnName:zzz>};\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2785,7 +3233,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0053(){ >+public void test0053_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2820,22 +3268,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0053_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " {\n" + >- " Object[] o = new X[]{<CompleteOnName:zzz>};\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ " #\n" + >+ " Object[] o = new X[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " Object[] o = new X[]{<CompleteOnName:zzz>};\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2847,7 +3308,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0054(){ >+public void test0054_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2885,20 +3346,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object[] o = new X[]{<CompleteOnName:zzz>};\n" + >+} >+public void test0054_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " Object[] o = new X[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object[] o = new X[]{<CompleteOnName:zzz>};\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2944,7 +3418,7 @@ > "diet ast"); > } > >-public void test0056(){ >+public void test0056_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -2978,20 +3452,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0056_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " Object[] o = <CompleteOnName:zzz>;\n" + >- " }\n" + >- " public X() {\n" + >+ " Object[] o = zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " Object[] o = <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3004,7 +3490,7 @@ > "full ast"); > } > >-public void test0057(){ >+public void test0057_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -3037,21 +3523,33 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object[] o = <CompleteOnName:zzz>;\n" + >+ "diet ast"); >+} >+public void test0057_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " Object[] o = zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object[] o = <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3098,7 +3596,7 @@ > "diet ast"); > } > >-public void test0059(){ >+public void test0059_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -3133,22 +3631,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " {\n" + >- " {\n" + >- " Object[] o = <CompleteOnName:zzz>;\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+} >+public void test0059_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " #\n" + >+ " Object[] o = zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " Object[] o = <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3161,7 +3672,7 @@ > "full ast"); > } > >-public void test0060(){ >+public void test0060_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -3196,20 +3707,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object[] o = <CompleteOnName:zzz>;\n" + >+} >+public void test0060_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " Object[] o = zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object[] o = <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3254,7 +3778,7 @@ > "diet ast"); > } > >-public void test0062(){ >+public void test0062_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -3288,20 +3812,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0062_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " Object o = new X[<CompleteOnName:zzz>];\n" + >- " }\n" + >- " public X() {\n" + >+ " Object o = new X[zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " Object o = new X[<CompleteOnName:zzz>];\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3314,7 +3850,7 @@ > "full ast"); > } > >-public void test0063(){ >+public void test0063_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -3347,21 +3883,33 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o = new X[<CompleteOnName:zzz>];\n" + >+ "diet ast"); >+} >+public void test0063_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " Object o = new X[zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o = new X[<CompleteOnName:zzz>];\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3408,7 +3956,7 @@ > "diet ast"); > } > >-public void test0065(){ >+public void test0065_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -3443,22 +3991,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0065_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " {\n" + >- " Object o = new X[<CompleteOnName:zzz>];\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ " #\n" + >+ " Object o = new X[zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " Object o = new X[<CompleteOnName:zzz>];\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3471,7 +4032,7 @@ > "full ast"); > } > >-public void test0066(){ >+public void test0066_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -3506,21 +4067,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o = new X[<CompleteOnName:zzz>];\n" + >+} >+public void test0066_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " Object o = new X[zzz;\n" + > " }\n" + > "}\n"; >- >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o = new X[<CompleteOnName:zzz>];\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -3531,7 +4105,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0067(){ >+public void test0067_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -3564,22 +4138,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " Object o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0067_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " Object o = new X[]{zzz;\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " Object o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -3591,7 +4175,7 @@ > "full ast"); > } > >-public void test0068(){ >+public void test0068_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -3625,20 +4209,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0068_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " Object o = new X[]{<CompleteOnName:zzz>};\n" + >- " }\n" + >- " public X() {\n" + >+ " Object o = new X[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " Object o = new X[]{<CompleteOnName:zzz>};\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3650,7 +4246,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0069(){ >+public void test0069_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -3686,21 +4282,33 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o = new X[]{<CompleteOnName:zzz>};\n" + >+ "diet ast"); >+} >+public void test0069_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " Object o = new X[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o = new X[]{<CompleteOnName:zzz>};\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3713,7 +4321,7 @@ > "full ast"); > } > >-public void test0070(){ >+public void test0070_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -3747,21 +4355,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " Object o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0070_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " #\n" + >+ " Object o = new X[]{zzz;\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " Object o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3774,7 +4393,7 @@ > "full ast"); > } > >-public void test0071(){ >+public void test0071_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -3809,25 +4428,38 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0071_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " {\n" + >- " Object o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ " #\n" + >+ " Object o = new X[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " Object o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3840,7 +4472,7 @@ > "full ast"); > } > >-public void test0072(){ >+public void test0072_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -3878,23 +4510,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >+} >+public void test0072_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " Object o = new X[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3940,7 +4585,7 @@ > } > > >-public void test0074(){ >+public void test0074_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -3974,20 +4619,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0074_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " int o = new int[<CompleteOnName:zzz>];\n" + >- " }\n" + >- " public X() {\n" + >+ " int o = new int[zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " int o = new int[<CompleteOnName:zzz>];\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4001,7 +4658,7 @@ > } > > >-public void test0075(){ >+public void test0075_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -4034,21 +4691,33 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " int o = new int[<CompleteOnName:zzz>];\n" + >+ "diet ast"); >+} >+public void test0075_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " int o = new int[zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " int o = new int[<CompleteOnName:zzz>];\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4097,7 +4766,7 @@ > } > > >-public void test0077(){ >+public void test0077_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -4132,22 +4801,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0077_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " {\n" + >- " int o = new int[<CompleteOnName:zzz>];\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ " #\n" + >+ " int o = new int[zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " int o = new int[<CompleteOnName:zzz>];\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4161,7 +4843,7 @@ > } > > >-public void test0078(){ >+public void test0078_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -4196,20 +4878,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " int o = new int[<CompleteOnName:zzz>];\n" + >+} >+public void test0078_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " int o = new int[zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new int[<CompleteOnName:zzz>]"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " int o = new int[<CompleteOnName:zzz>];\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4222,7 +4917,7 @@ > "full ast"); > } > >-public void test0079(){ >+public void test0079_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -4255,21 +4950,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " int o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0079_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " int o = new int[]{zzz;\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " int o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4283,7 +4988,7 @@ > } > > >-public void test0080(){ >+public void test0080_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -4317,20 +5022,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new int[]{<CompleteOnName:zzz>}"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " {\n" + >- " int o = new int[]{<CompleteOnName:zzz>};\n" + >- " }\n" + >- " public X() {\n" + >+} >+public void test0080_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " int o = new int[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new int[]{<CompleteOnName:zzz>}"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " int o = new int[]{<CompleteOnName:zzz>};\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4344,7 +5061,7 @@ > } > > >-public void test0081(){ >+public void test0081_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -4380,21 +5097,33 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new int[]{<CompleteOnName:zzz>}"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " int o = new int[]{<CompleteOnName:zzz>};\n" + >+ "diet ast"); >+} >+public void test0081_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " int o = new int[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new int[]{<CompleteOnName:zzz>}"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " int o = new int[]{<CompleteOnName:zzz>};\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4408,7 +5137,7 @@ > } > > >-public void test0082(){ >+public void test0082_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -4442,21 +5171,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " int o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0082_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " #\n" + >+ " int o = new int[]{zzz;\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " int o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4470,7 +5210,7 @@ > } > > >-public void test0083(){ >+public void test0083_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -4505,25 +5245,38 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0083_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " {\n" + >- " int o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ " #\n" + >+ " int o = new int[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " int o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4535,7 +5288,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0084(){ >+public void test0084_Diet(){ > > > String str = >@@ -4575,23 +5328,38 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " int o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >+} >+public void test0084_Method(){ >+ >+ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " int o = new int[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " int o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4603,7 +5371,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0085(){ >+public void test0085_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -4636,21 +5404,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " X o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0085_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " X o = new X[]{zzz;\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " X o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4664,7 +5442,7 @@ > } > > >-public void test0086(){ >+public void test0086_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -4698,20 +5476,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0086_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " X o = new X[]{<CompleteOnName:zzz>};\n" + >- " }\n" + >- " public X() {\n" + >+ " X o = new X[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " X o = new X[]{<CompleteOnName:zzz>};\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4724,7 +5514,7 @@ > "full ast"); > } > >-public void test0087(){ >+public void test0087_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -4760,21 +5550,33 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " X o = new X[]{<CompleteOnName:zzz>};\n" + >+ "diet ast"); >+} >+public void test0087_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " X o = new X[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " X o = new X[]{<CompleteOnName:zzz>};\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4788,7 +5590,7 @@ > } > > >-public void test0088(){ >+public void test0088_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -4822,21 +5624,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " X o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0088_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " #\n" + >+ " X o = new X[]{zzz;\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " X o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4850,7 +5663,7 @@ > } > > >-public void test0089(){ >+public void test0089_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -4885,25 +5698,38 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+} >+public void test0089_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " {\n" + >- " X o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ " #\n" + >+ " X o = new X[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " X o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4917,7 +5743,7 @@ > } > > >-public void test0090(){ >+public void test0090_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -4955,23 +5781,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " X o;\n" + >- " {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >+} >+public void test0090_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " #\n" + >+ " X o = new X[]{zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " X o;\n" + >+ " {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5019,7 +5858,7 @@ > } > > >-public void test0092(){ >+public void test0092_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -5053,22 +5892,35 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+ "diet ast"); >+} >+public void test0092_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " Object o;\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " public X() {\n" + >+ " Object o = \"yyy;\n" + >+ " zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5082,7 +5934,7 @@ > } > > >-public void test0093(){ >+public void test0093_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -5116,22 +5968,35 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Object o;\n" + >- " <CompleteOnName:zzz>;\n" + >+ "diet ast"); >+} >+public void test0093_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " Object o = \"yyy;\n" + >+ " zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5182,7 +6047,7 @@ > } > > >-public void test0095(){ >+public void test0095_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -5217,24 +6082,38 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+ "diet ast"); >+} >+public void test0095_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " {\n" + >- " Object o;\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ " #\n" + >+ " Object o = \"yyy;\n" + >+ " zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5248,7 +6127,7 @@ > } > > >-public void test0096(){ >+public void test0096_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -5283,24 +6162,38 @@ > expectedUnitDisplayString, > completionIdentifier, > expectedReplacedSource, >- "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >+ "diet ast"); >+} >+public void test0096_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + > " {\n" + >- " {\n" + >- " Object o;\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >- " }\n" + >- " public X() {\n" + >+ " #\n" + >+ " Object o = \"yyy;\n" + >+ " zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " {\n" + >+ " {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5312,7 +6205,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0097(){ >+public void test0097_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -5347,21 +6240,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "o = <CompleteOnName:zzz>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >+} >+public void test0097_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + > " Object o;\n" + >- " o = <CompleteOnName:zzz>;\n" + >+ " o = zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "o = <CompleteOnName:zzz>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o;\n" + >+ " o = <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5374,7 +6280,7 @@ > "full ast"); > } > >-public void test0098(){ >+public void test0098_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -5409,21 +6315,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "o = <CompleteOnName:zzz>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >+} >+public void test0098_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + > " Object o;\n" + >- " o = <CompleteOnName:zzz>;\n" + >+ " o = zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "o = <CompleteOnName:zzz>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o;\n" + >+ " o = <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5435,7 +6354,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0099(){ >+public void test0099_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -5470,21 +6389,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:zzz>"; >- expectedParentNodeToString = "o = new <CompleteOnType:zzz>()"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >+} >+public void test0099_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + > " Object o;\n" + >- " o = new <CompleteOnType:zzz>();\n" + >+ " o = new zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnType:zzz>"; >+ String expectedParentNodeToString = "o = new <CompleteOnType:zzz>()"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o;\n" + >+ " o = new <CompleteOnType:zzz>();\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5497,7 +6429,7 @@ > "full ast"); > } > >-public void test0100(){ >+public void test0100_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -5532,21 +6464,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:zzz>"; >- expectedParentNodeToString = "o = new <CompleteOnType:zzz>()"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >+} >+public void test0100_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + > " Object o;\n" + >- " o = new <CompleteOnType:zzz>();\n" + >+ " o = new zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnType:zzz>"; >+ String expectedParentNodeToString = "o = new <CompleteOnType:zzz>()"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o;\n" + >+ " o = new <CompleteOnType:zzz>();\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5558,7 +6503,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0101(){ >+public void test0101_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -5594,21 +6539,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >+} >+public void test0101_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + > " Object o;\n" + >- " <CompleteOnName:zzz>;\n" + >+ " o = yyy;\n" + >+ " zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5621,7 +6580,7 @@ > "full ast"); > } > >-public void test0102(){ >+public void test0102_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -5657,21 +6616,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >+} >+public void test0102_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + > " Object o;\n" + >- " <CompleteOnName:zzz>;\n" + >+ " o = yyy;\n" + >+ " zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5683,7 +6656,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0103(){ >+public void test0103_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -5719,21 +6692,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >+} >+public void test0103_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + > " Object o;\n" + >- " <CompleteOnName:zzz>;\n" + >+ " o = \"yyy;\n" + >+ " zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5746,7 +6733,7 @@ > "full ast"); > } > >-public void test0104(){ >+public void test0104_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -5782,21 +6769,35 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >+} >+public void test0104_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + > " Object o;\n" + >- " <CompleteOnName:zzz>;\n" + >+ " o = \"yyy;\n" + >+ " zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5809,7 +6810,7 @@ > "full ast"); > } > >-public void test0105(){ >+public void test0105_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -5843,20 +6844,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "(1 + <CompleteOnName:zzz>)"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " int x = (1 + <CompleteOnName:zzz>);\n" + >+} >+public void test0105_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " int x = 1 + zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "(1 + <CompleteOnName:zzz>)"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " int x = (1 + <CompleteOnName:zzz>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5868,7 +6881,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0106(){ >+public void test0106_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -5902,20 +6915,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "(1 + <CompleteOnName:zzz>)"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " int x = (1 + <CompleteOnName:zzz>);\n" + >+} >+public void test0106_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " int x = 1 + (zzz\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "(1 + <CompleteOnName:zzz>)"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " int x = (1 + <CompleteOnName:zzz>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5927,7 +6952,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0107(){ >+public void test0107_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -5963,22 +6988,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " int x;\n" + >- " int y;\n" + >- " <CompleteOnName:zzz>;\n" + >+} >+public void test0107_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " int x = 0;\n" + >+ " int y = 1 + x;\n" + >+ " zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " int x;\n" + >+ " int y;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5990,7 +7029,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0108(){ >+public void test0108_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -6024,20 +7063,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "(- <CompleteOnName:zzz>)"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " int x = (- <CompleteOnName:zzz>);\n" + >+} >+public void test0108_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " int x = -zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "(- <CompleteOnName:zzz>)"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " int x = (- <CompleteOnName:zzz>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6049,7 +7100,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0109(){ >+public void test0109_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -6083,20 +7134,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "(- <CompleteOnName:zzz>)"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " int x = (- <CompleteOnName:zzz>);\n" + >+} >+public void test0109_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " int x = -(zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "(- <CompleteOnName:zzz>)"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " int x = (- <CompleteOnName:zzz>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6108,7 +7171,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0110(){ >+public void test0110_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -6144,22 +7207,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " int x;\n" + >- " int y;\n" + >- " <CompleteOnName:zzz>;\n" + >+} >+public void test0110_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " int x = 0;\n" + >+ " int y = -x;\n" + >+ " zzz;\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " int x;\n" + >+ " int y;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6171,7 +7248,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0111(){ >+public void test0111_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -6205,20 +7282,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "(1 == <CompleteOnName:zzz>)"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " (1 == <CompleteOnName:zzz>);\n" + >+} >+public void test0111_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " if(1 == zzz) {}\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "(1 == <CompleteOnName:zzz>)"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " (1 == <CompleteOnName:zzz>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6230,7 +7319,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0112(){ >+public void test0112_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -6264,20 +7353,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "(1 == <CompleteOnName:zzz>)"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " (1 == <CompleteOnName:zzz>);\n" + >+} >+public void test0112_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(){\n" + >+ " if(1 == (zzz)) {}\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "(1 == <CompleteOnName:zzz>)"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " (1 == <CompleteOnName:zzz>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6289,7 +7390,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0113(){ >+public void test0113_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -6323,20 +7424,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:ZZZ>"; >- expectedParentNodeToString = "(x instanceof <CompleteOnType:ZZZ>)"; >- completionIdentifier = "ZZZ"; >- expectedReplacedSource = "ZZZ"; >- expectedUnitDisplayString = >- "package p;\n" + >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo(Object x) {\n" + >- " (x instanceof <CompleteOnType:ZZZ>);\n" + >+} >+public void test0113_Method(){ >+ String str = >+ "package p;\n" + >+ "public class X {\n" + >+ " void foo(Object x){\n" + >+ " if(x instanceof ZZZ) {}\n" + > " }\n" + > "}\n"; >+ >+ String completeBehind = "ZZZ"; >+ int cursorLocation = str.indexOf("ZZZ") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnType:ZZZ>"; >+ String expectedParentNodeToString = "(x instanceof <CompleteOnType:ZZZ>)"; >+ String completionIdentifier = "ZZZ"; >+ String expectedReplacedSource = "ZZZ"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo(Object x) {\n" + >+ " (x instanceof <CompleteOnType:ZZZ>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6348,7 +7461,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0114(){ >+public void test0114_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -6383,24 +7496,37 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "c = <CompleteOnName:zzz>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >+} >+public void test0114_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " boolean a;\n" + >- " boolean b;\n" + >- " boolean c;\n" + >- " c = <CompleteOnName:zzz>;\n" + >+ " void foo(){\n" + >+ " boolean a, b, c;\n" + >+ " c = a == b ? zzz\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "c = <CompleteOnName:zzz>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " boolean a;\n" + >+ " boolean b;\n" + >+ " boolean c;\n" + >+ " c = <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -6411,7 +7537,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0115(){ >+public void test0115_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -6446,23 +7572,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >+} >+public void test0115_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " boolean a;\n" + >- " boolean b;\n" + >- " <CompleteOnName:zzz>;\n" + >+ " void foo(){\n" + >+ " boolean a, b;\n" + >+ " a == b ? zzz\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " boolean a;\n" + >+ " boolean b;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -6473,7 +7612,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0116(){ >+public void test0116_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -6508,24 +7647,37 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "c = ((a == b) ? a : <CompleteOnName:zzz>)"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >+} >+public void test0116_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " boolean a;\n" + >- " boolean b;\n" + >- " boolean c;\n" + >- " c = ((a == b) ? a : <CompleteOnName:zzz>);\n" + >+ " void foo(){\n" + >+ " boolean a, b, c;\n" + >+ " c = a == b ? a : zzz\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "c = ((a == b) ? a : <CompleteOnName:zzz>)"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " boolean a;\n" + >+ " boolean b;\n" + >+ " boolean c;\n" + >+ " c = ((a == b) ? a : <CompleteOnName:zzz>);\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -6536,7 +7688,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0117(){ >+public void test0117_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -6571,24 +7723,37 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "c = <CompleteOnName:zzz>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >+} >+public void test0117_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " boolean a;\n" + >- " boolean b;\n" + >- " boolean c;\n" + >- " c = <CompleteOnName:zzz>;\n" + >+ " void foo(){\n" + >+ " boolean a, b, c;\n" + >+ " c = a == b ? a : (zzz\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "c = <CompleteOnName:zzz>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " boolean a;\n" + >+ " boolean b;\n" + >+ " boolean c;\n" + >+ " c = <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -6599,7 +7764,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0118(){ >+public void test0118_Diet(){ > String str = > "package p;\n" + > "public class X {\n" + >@@ -6634,24 +7799,37 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >+} >+public void test0118_Method(){ >+ String str = > "package p;\n" + > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " boolean a;\n" + >- " boolean b;\n" + >- " boolean c;\n" + >- " <CompleteOnName:zzz>;\n" + >+ " void foo(){\n" + >+ " boolean a, b, c;\n" + >+ " c = a# == b ? a : zzz\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "package p;\n" + >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " boolean a;\n" + >+ " boolean b;\n" + >+ " boolean c;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -6662,7 +7840,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0119(){ >+public void test0119_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -6696,27 +7874,40 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = >- "switch (1) {\n" + >- "case <CompleteOnName:zzz> : ;\n" + >- "}"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " {\n" + >- " switch (1) {\n" + >- " case <CompleteOnName:zzz> : ;\n" + >- " }\n" + >- " }\n" + >- " }\n" + >+} >+public void test0119_Method(){ >+ String str = >+ "public class X {\n" + >+ " void foo(){\n" + >+ " switch(1) {\n" + >+ " case zzz\n" + >+ " }\n" + >+ " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = >+ "switch (1) {\n" + >+ "case <CompleteOnName:zzz> : ;\n" + >+ "}"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " {\n" + >+ " switch (1) {\n" + >+ " case <CompleteOnName:zzz> : ;\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -6727,7 +7918,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0120(){ >+public void test0120_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -6762,29 +7953,43 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = >- "switch (1) {\n" + >- "case Something : ;\n" + >- "case <CompleteOnName:zzz> : ;\n" + >- "}"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " {\n" + >- " switch (1) {\n" + >- " case Something : ;\n" + >- " case <CompleteOnName:zzz> : ;\n" + >- " }\n" + >- " }\n" + >- " }\n" + >+} >+public void test0120_Method(){ >+ String str = >+ "public class X {\n" + >+ " void foo(){\n" + >+ " switch(1) {\n" + >+ " case Something :\n" + >+ " case zzz\n" + >+ " }\n" + >+ " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = >+ "switch (1) {\n" + >+ "case Something : ;\n" + >+ "case <CompleteOnName:zzz> : ;\n" + >+ "}"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " {\n" + >+ " switch (1) {\n" + >+ " case Something : ;\n" + >+ " case <CompleteOnName:zzz> : ;\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -6795,7 +8000,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0121(){ >+public void test0121_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -6827,20 +8032,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "tab[<CompleteOnName:zzz>]"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >+} >+public void test0121_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " tab[<CompleteOnName:zzz>];\n" + >+ " void foo(){\n" + >+ " tab[zzz]\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "tab[<CompleteOnName:zzz>]"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " tab[<CompleteOnName:zzz>];\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -6851,7 +8067,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0122(){ >+public void test0122_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -6883,20 +8099,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnClassLiteralAccess:tab[].zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "tab[].zzz"; >- expectedUnitDisplayString = >+} >+public void test0122_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnClassLiteralAccess:tab[].zzz>;\n" + >+ " void foo(){\n" + >+ " tab[].zzz\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnClassLiteralAccess:tab[].zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "tab[].zzz"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnClassLiteralAccess:tab[].zzz>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -6907,7 +8134,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0123(){ >+public void test0123_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -6939,20 +8166,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnMemberAccess:tab[0].zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >+} >+public void test0123_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnMemberAccess:tab[0].zzz>;\n" + >+ " void foo(){\n" + >+ " tab[0].zzz\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnMemberAccess:tab[0].zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnMemberAccess:tab[0].zzz>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -6963,7 +8201,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0124(){ >+public void test0124_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -6995,20 +8233,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "foo()[<CompleteOnName:zzz>]"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >+} >+public void test0124_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " foo()[<CompleteOnName:zzz>];\n" + >+ " void foo(){\n" + >+ " foo()[zzz]\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "foo()[<CompleteOnName:zzz>]"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " foo()[<CompleteOnName:zzz>];\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -7019,7 +8268,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0125(){ >+public void test0125_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7051,20 +8300,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >+} >+public void test0125_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:zzz>;\n" + >+ " void foo(){\n" + >+ " foo()[].zzz\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -7075,7 +8335,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0126(){ >+public void test0126_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7107,20 +8367,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnMemberAccess:foo()[1].zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >+} >+public void test0126_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnMemberAccess:foo()[1].zzz>;\n" + >+ " void foo(){\n" + >+ " foo()[1].zzz\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnMemberAccess:foo()[1].zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnMemberAccess:foo()[1].zzz>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -7166,7 +8437,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0128(){ >+public void test0128_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7202,24 +8473,39 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "a[<CompleteOnName:zzz>]"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >+} >+public void test0128_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >+ " void foo(){\n" + > " new Object() {\n" + > " void bar() {\n" + >- " a[<CompleteOnName:zzz>];\n" + >+ " a[zzz\n" + > " }\n" + >- " };\n" + >+ " }\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "a[<CompleteOnName:zzz>]"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " new Object() {\n" + >+ " void bar() {\n" + >+ " a[<CompleteOnName:zzz>];\n" + >+ " }\n" + >+ " };\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -7230,7 +8516,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0129(){ >+public void test0129_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7267,22 +8553,38 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >+} >+public void test0129_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >+ " void foo(){\n" + > " Object local;\n" + > " double bar;\n" + >- " <CompleteOnName:zzz>;\n" + >+ " for(;;) {\n" + >+ " bar = (double)0;\n" + >+ " }\n" + >+ " zzz\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object local;\n" + >+ " double bar;\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -7296,7 +8598,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=42856 > */ >-public void test0130(){ >+public void test0130_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7329,21 +8631,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnMessageSend:zzz()>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "zzz("; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " A.B c;\n" + >- " <CompleteOnMessageSend:zzz()>;\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=42856 >+ */ >+public void test0130_Method(){ >+ String str = >+ "public class X {\n" + >+ " void foo(){\n" + >+ " A.B c = null;\n" + >+ " zzz();\n" + >+ " }\n" + > "}\n"; > >+ String completeBehind = "zzz("; >+ int cursorLocation = str.indexOf("zzz(") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnMessageSend:zzz()>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "zzz("; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " A.B c;\n" + >+ " <CompleteOnMessageSend:zzz()>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -7357,7 +8674,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=42856 > */ >-public void test0131(){ >+public void test0131_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7392,23 +8709,40 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnMessageSend:zzz()>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "zzz("; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " {\n" + >- " A.B e;\n" + >- " <CompleteOnMessageSend:zzz()>;\n" + >- " }\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=42856 >+ */ >+public void test0131_Method(){ >+ String str = >+ "public class X {\n" + >+ " void foo(){\n" + >+ " try {\n" + >+ " } catch(A.B e) {\n" + >+ " zzz();\n" + >+ " }\n" + >+ " }\n" + > "}\n"; > >+ String completeBehind = "zzz("; >+ int cursorLocation = str.indexOf("zzz(") + completeBehind.length() - 1; >+ >+ String expectedCompletionNodeToString = "<CompleteOnMessageSend:zzz()>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "zzz("; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " {\n" + >+ " A.B e;\n" + >+ " <CompleteOnMessageSend:zzz()>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -7422,7 +8756,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=44647 > */ >-public void test0132(){ >+public void test0132_Diet(){ > String str = > "public class A\n" + > "{\n" + >@@ -7472,24 +8806,56 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = ""; >- expectedUnitDisplayString = >- "public class A {\n" + >- " public A(final String str1, final String str2) {\n" + >- " }\n" + >- " private A[] methodA(final String str1, final String str2) {\n" + >- " new A(str1, str2) {\n" + >- " {\n" + >- " <CompleteOnName:>;\n" + >- " }\n" + >- " };\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=44647 >+ */ >+public void test0132_Method(){ >+ String str = >+ "public class A\n" + >+ "{\n" + >+ " public A(final String str1, final String str2)\n" + >+ " {\n" + >+ " \n" + >+ " }\n" + >+ " \n" + >+ " private A[] methodA(final String str1, final String str2)\n" + >+ " {\n" + >+ " return new A[]\n" + >+ " {\n" + >+ " new A(str1, str2)\n" + >+ " {\n" + >+ " //initialiser!\n" + >+ " {\n" + >+ " methodA(\"1\", \"2\");\n" + >+ " }\n" + >+ " },\n" + >+ " new A(\"hello\".c) //<--------code complete to \"hello\".concat()\n" + >+ " };\n" + >+ " \n" + >+ " }\n" + > "}\n"; > >+ >+ String completeBehind = "\"2\");"; >+ int cursorLocation = str.indexOf("\"2\");") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = ""; >+ String expectedUnitDisplayString = >+ "public class A {\n" + >+ " public A(final String str1, final String str2) {\n" + >+ " }\n" + >+ " private A[] methodA(final String str1, final String str2) {\n" + >+ " new A(str1, str2) {\n" + >+ " {\n" + >+ " <CompleteOnName:>;\n" + >+ " }\n" + >+ " };\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -7503,7 +8869,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=46470 > */ >-public void test0133(){ >+public void test0133_Diet(){ > String str = > "public class X {\n" + > " int x;\n" + >@@ -7541,20 +8907,39 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=46470 >+ */ >+public void test0133_Method(){ >+ String str = >+ "public class X {\n" + >+ " int x;\n" + >+ " void foo() {\n" + >+ " switch(x){\n" + >+ " case 0:\n" + >+ " break;\n" + >+ " }\n" + >+ " bar\n" + >+ " }\n" + >+ "}\n"; > >- expectedCompletionNodeToString = "<CompleteOnName:bar>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "bar"; >- expectedReplacedSource = "bar"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " int x;\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:bar>;\n" + >- " }\n" + >- "}\n"; >+ >+ String completeBehind = "bar"; >+ int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:bar>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "bar"; >+ String expectedReplacedSource = "bar"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " int x;\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:bar>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7616,7 +9001,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=43212 > */ >-public void test0135(){ >+public void test0135_Diet(){ > String str = > "public class X {\n" + > " void bar(){\n" + >@@ -7656,28 +9041,50 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=43212 >+ */ >+public void test0135_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar(){\n" + >+ " #\n" + >+ " class Inner {\n" + >+ " void foo() {\n" + >+ " try {\n" + >+ " } catch(Exception e) {\n" + >+ " e.\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > >- expectedCompletionNodeToString = "<CompleteOnName:e.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "e."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " class Inner {\n" + >- " Inner() {\n" + >- " }\n" + >- " void foo() {\n" + >- " {\n" + >- " Exception e;\n" + >- " <CompleteOnName:e.>;\n" + >- " }\n" + >- " }\n" + >- " }\n" + >- " }\n" + >- "}\n"; >+ >+ String completeBehind = "e."; >+ int cursorLocation = str.indexOf("e.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:e.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "e."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " class Inner {\n" + >+ " Inner() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " {\n" + >+ " Exception e;\n" + >+ " <CompleteOnName:e.>;\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7726,7 +9133,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=53624 > */ >-public void test0137(){ >+public void test0137_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7762,24 +9169,42 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnMessageSend:super.zzz()>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "zzz("; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " new Object() {\n" + >- " void bar() {\n" + >- " <CompleteOnMessageSend:super.zzz()>;\n" + >- " }\n" + >- " };\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=53624 >+ */ >+public void test0137_Method(){ >+ String str = >+ "public class X {\n" + >+ " void foo(){\n" + >+ " new Object(){\n" + >+ " void bar(){\n" + >+ " super.zzz();\n" + >+ " }\n" + >+ " };\n" + >+ " }\n" + > "}\n"; > >+ >+ String completeBehind = "zzz("; >+ int cursorLocation = str.indexOf("zzz(") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnMessageSend:super.zzz()>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "zzz("; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " new Object() {\n" + >+ " void bar() {\n" + >+ " <CompleteOnMessageSend:super.zzz()>;\n" + >+ " }\n" + >+ " };\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -7793,7 +9218,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=41395 > */ >-public void test0138(){ >+public void test0138_Diet(){ > String str = > "public class X{\n" + > " public void foo() {\n" + >@@ -7836,27 +9261,52 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnFieldName:void to>;"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "to"; >- expectedReplacedSource = "toto"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=41395 >+ */ >+public void test0138_Method(){ >+ String str = >+ "public class X{\n" + > " public void foo() {\n" + > " new Y() {\n" + > " public void bar() {\n" + >+ " switch (zzz){\n" + >+ " case 1 :\n" + >+ " };\n" + >+ " }\n" + > " new Z() {\n" + >- " <CompleteOnFieldName:void to>;\n" + >- " {\n" + >- " }\n" + >- " };\n" + >- " }\n" + >- " };\n" + >+ " public void toto() { \n" + >+ " }\n" + >+ " });\n" + >+ " });\n" + > " }\n" + >- "}\n"; >+ "}\n" + >+ "\n"; >+ >+ >+ String completeBehind = "to"; >+ int cursorLocation = str.indexOf("to") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnFieldName:void to>;"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "to"; >+ String expectedReplacedSource = "toto"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public void foo() {\n" + >+ " new Y() {\n" + >+ " public void bar() {\n" + >+ " new Z() {\n" + >+ " <CompleteOnFieldName:void to>;\n" + >+ " {\n" + >+ " }\n" + >+ " };\n" + >+ " }\n" + >+ " };\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7992,7 +9442,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=39499 > */ >-public void test0142(){ >+public void test0142_Diet(){ > String str = > "public class X{\n" + > " public void foo() {\n" + >@@ -8029,23 +9479,42 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnKeyword:instanceof>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "instanceof"; >- expectedReplacedSource = "instanceof"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=39499 >+ */ >+public void test0142_Method(){ >+ String str = >+ "public class X{\n" + > " public void foo() {\n" + >- " new Object() {\n" + >+ " bar(new Object(){\n" + > " public void toto() {\n" + >- " <CompleteOnKeyword:instanceof>;\n" + >+ " if(a instanceof Object) {}\n" + > " }\n" + >- " };\n" + >+ " });\n" + > " }\n" + >- "}\n"; >+ "}\n" + >+ "\n"; >+ >+ >+ String completeBehind = "instanceof"; >+ int cursorLocation = str.indexOf("instanceof") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnKeyword:instanceof>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "instanceof"; >+ String expectedReplacedSource = "instanceof"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public void foo() {\n" + >+ " new Object() {\n" + >+ " public void toto() {\n" + >+ " <CompleteOnKeyword:instanceof>;\n" + >+ " }\n" + >+ " };\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8060,7 +9529,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 > */ >-public void test0143(){ >+public void test0143_Diet(){ > String str = > "public class X{\n" + > " public void foo() {\n" + >@@ -8094,20 +9563,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:bar>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "bar"; >- expectedReplacedSource = "bar"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 >+ */ >+public void test0143_Method(){ >+ String str = >+ "public class X{\n" + > " public void foo() {\n" + >- " Object o;\n" + >- " <CompleteOnName:bar>;\n" + >+ " Object o =(int) tmp;\n" + >+ " bar\n" + > " }\n" + >- "}\n"; >+ "}\n" + >+ "\n"; >+ >+ >+ String completeBehind = "bar"; >+ int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:bar>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "bar"; >+ String expectedReplacedSource = "bar"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:bar>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8122,7 +9607,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 > */ >-public void test0144(){ >+public void test0144_Diet(){ > String str = > "public class X{\n" + > " public void foo() {\n" + >@@ -8156,20 +9641,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:bar>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "bar"; >- expectedReplacedSource = "bar"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 >+ */ >+public void test0144_Method(){ >+ String str = >+ "public class X{\n" + > " public void foo() {\n" + >- " Object o;\n" + >- " <CompleteOnName:bar>;\n" + >+ " Object o =(int[]) tmp;\n" + >+ " bar\n" + > " }\n" + >- "}\n"; >+ "}\n" + >+ "\n"; >+ >+ >+ String completeBehind = "bar"; >+ int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:bar>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "bar"; >+ String expectedReplacedSource = "bar"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:bar>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8184,7 +9685,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 > */ >-public void test0145(){ >+public void test0145_Diet(){ > String str = > "public class X{\n" + > " public void foo() {\n" + >@@ -8218,20 +9719,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:bar>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "bar"; >- expectedReplacedSource = "bar"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 >+ */ >+public void test0145_Method(){ >+ String str = >+ "public class X{\n" + > " public void foo() {\n" + >- " Object o;\n" + >- " <CompleteOnName:bar>;\n" + >+ " Object o =(X) tmp;\n" + >+ " bar\n" + > " }\n" + >- "}\n"; >+ "}\n" + >+ "\n"; >+ >+ >+ String completeBehind = "bar"; >+ int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:bar>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "bar"; >+ String expectedReplacedSource = "bar"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:bar>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8246,7 +9763,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 > */ >-public void test0146(){ >+public void test0146_Diet(){ > String str = > "public class X{\n" + > " public void foo() {\n" + >@@ -8280,20 +9797,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:bar>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "bar"; >- expectedReplacedSource = "bar"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 >+ */ >+public void test0146_Method(){ >+ String str = >+ "public class X{\n" + > " public void foo() {\n" + >- " Object o;\n" + >- " <CompleteOnName:bar>;\n" + >+ " Object o =(X[]) tmp;\n" + >+ " bar\n" + > " }\n" + >- "}\n"; >+ "}\n" + >+ "\n"; >+ >+ >+ String completeBehind = "bar"; >+ int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:bar>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "bar"; >+ String expectedReplacedSource = "bar"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:bar>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8384,7 +9917,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=91371 > */ >-public void test0149(){ >+public void test0149_Diet(){ > String str = > "public class X{\n" + > " public void foo() {\n" + >@@ -8418,23 +9951,39 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:ZZ>"; >- expectedParentNodeToString = "(titi & <CompleteOnName:ZZ>)"; >- completionIdentifier = "ZZ"; >- expectedReplacedSource = "ZZ"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=91371 >+ */ >+public void test0149_Method(){ >+ String str = >+ "public class X{\n" + > " public void foo() {\n" + >- " new Object() {\n" + >- " void bar() {\n" + >- " (titi & <CompleteOnName:ZZ>);\n" + >- " }\n" + >- " };\n" + >- " }\n" + >- "}\n"; >+ " new Object(){\n" + >+ " void bar(){\n" + >+ " if((titi & (ZZ\n" + >+ "}\n" + >+ "\n"; >+ >+ >+ String completeBehind = "ZZ"; >+ int cursorLocation = str.indexOf("ZZ") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:ZZ>"; >+ String expectedParentNodeToString = "(titi & <CompleteOnName:ZZ>)"; >+ String completionIdentifier = "ZZ"; >+ String expectedReplacedSource = "ZZ"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public void foo() {\n" + >+ " new Object() {\n" + >+ " void bar() {\n" + >+ " (titi & <CompleteOnName:ZZ>);\n" + >+ " }\n" + >+ " };\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8449,7 +9998,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=91371 > */ >-public void test0150(){ >+public void test0150_Diet(){ > String str = > "public class X{\n" + > " public void foo() {\n" + >@@ -8481,19 +10030,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:ZZ>"; >- expectedParentNodeToString = "(titi & <CompleteOnName:ZZ>)"; >- completionIdentifier = "ZZ"; >- expectedReplacedSource = "ZZ"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=91371 >+ */ >+public void test0150_Method(){ >+ String str = >+ "public class X{\n" + > " public void foo() {\n" + >- " (titi & <CompleteOnName:ZZ>);\n" + >- " }\n" + >- "}\n"; >+ " if((titi & (ZZ\n" + >+ "}\n" + >+ "\n"; >+ >+ >+ String completeBehind = "ZZ"; >+ int cursorLocation = str.indexOf("ZZ") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:ZZ>"; >+ String expectedParentNodeToString = "(titi & <CompleteOnName:ZZ>)"; >+ String completionIdentifier = "ZZ"; >+ String expectedReplacedSource = "ZZ"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public void foo() {\n" + >+ " (titi & <CompleteOnName:ZZ>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8508,7 +10071,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=92451 > */ >-public void test0151(){ >+public void test0151_Diet(){ > String str = > "public class X {\n" + > " public static void main(String[] args) {\n" + >@@ -8542,21 +10105,37 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = ""; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=92451 >+ */ >+public void test0151_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " public static void main(String[] args) {\n" + >- " java.util.List elements;\n" + >- " <CompleteOnName:>;\n" + >+ " java.util.List elements = null;\n" + >+ " new Test(Test.toStrings((Test[])elements.toArray(new Test[0])));\n" + >+ " //code assist fails on this line\n" + > " }\n" + > "}\n"; > >+ >+ String completeBehind = ""; >+ int cursorLocation = str.indexOf(" //code assis") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = ""; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public static void main(String[] args) {\n" + >+ " java.util.List elements;\n" + >+ " <CompleteOnName:>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8616,7 +10195,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 > */ >-public void test0153(){ >+public void test0153_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -8650,20 +10229,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "break <CompleteOnLabel:lab>;"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "lab"; >- expectedReplacedSource = "lab"; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 >+ */ >+public void test0153_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " break <CompleteOnLabel:lab>;\n" + >+ " label1 : for(;;) {\n" + >+ " break lab\n" + >+ " }\n" + > " }\n" + > "}\n"; > >+ >+ String completeBehind = "lab"; >+ int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "break <CompleteOnLabel:lab>;"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "lab"; >+ String expectedReplacedSource = "lab"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " break <CompleteOnLabel:lab>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8677,7 +10272,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 > */ >-public void test0154(){ >+public void test0154_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -8712,22 +10307,39 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "break <CompleteOnLabel:lab>;"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "lab"; >- expectedReplacedSource = "lab"; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 >+ */ >+public void test0154_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " {\n" + >- " break <CompleteOnLabel:lab>;\n" + >- " }\n" + >+ " #\n" + >+ " label1 : for(;;) {\n" + >+ " break lab\n" + >+ " }\n" + > " }\n" + > "}\n"; > >+ >+ String completeBehind = "lab"; >+ int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "break <CompleteOnLabel:lab>;"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "lab"; >+ String expectedReplacedSource = "lab"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " {\n" + >+ " break <CompleteOnLabel:lab>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8741,7 +10353,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 > */ >-public void test0155(){ >+public void test0155_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -8775,20 +10387,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "lab"; >- expectedReplacedSource = "lab"; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 >+ */ >+public void test0155_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " continue <CompleteOnLabel:lab>;\n" + >+ " label1 : for(;;) {\n" + >+ " continue lab\n" + >+ " }\n" + > " }\n" + > "}\n"; > >+ >+ String completeBehind = "lab"; >+ int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "lab"; >+ String expectedReplacedSource = "lab"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " continue <CompleteOnLabel:lab>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8802,7 +10430,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 > */ >-public void test0156(){ >+public void test0156_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -8837,22 +10465,39 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "lab"; >- expectedReplacedSource = "lab"; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 >+ */ >+public void test0156_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " {\n" + >- " continue <CompleteOnLabel:lab>;\n" + >- " }\n" + >+ " #\n" + >+ " label1 : for(;;) {\n" + >+ " continue lab\n" + >+ " }\n" + > " }\n" + > "}\n"; > >+ >+ String completeBehind = "lab"; >+ int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "lab"; >+ String expectedReplacedSource = "lab"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " {\n" + >+ " continue <CompleteOnLabel:lab>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8866,7 +10511,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 > */ >-public void test0157(){ >+public void test0157_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -8906,29 +10551,51 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "lab"; >- expectedReplacedSource = "lab"; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 >+ */ >+public void test0157_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " {\n" + >- " class X {\n" + >- " X() {\n" + >- " super();\n" + >- " }\n" + >- " void foo() {\n" + >- " }\n" + >- " }\n" + >- " continue <CompleteOnLabel:lab>;\n" + >- " }\n" + >+ " #\n" + >+ " label1 : for(;;) {\n" + >+ " class X {\n" + >+ " void foo() {\n" + >+ " label2 : for(;;) foo();\n" + >+ " }\n" + >+ " }\n" + >+ " continue lab\n" + >+ " }\n" + > " }\n" + > "}\n"; > >+ >+ String completeBehind = "lab"; >+ int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "lab"; >+ String expectedReplacedSource = "lab"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " {\n" + >+ " class X {\n" + >+ " X() {\n" + >+ " super();\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " }\n" + >+ " }\n" + >+ " continue <CompleteOnLabel:lab>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8942,7 +10609,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 > */ >-public void test0158(){ >+public void test0158_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -8983,30 +10650,53 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "lab"; >- expectedReplacedSource = "lab"; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072 >+ */ >+public void test0158_Method(){ >+ String str = > "public class X {\n" + >- " public X() {\n" + >- " }\n" + > " void foo() {\n" + >- " {\n" + >- " class X {\n" + >- " X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " {\n" + >- " continue <CompleteOnLabel:lab>;\n" + >- " }\n" + >- " }\n" + >- " }\n" + >- " }\n" + >+ " #\n" + >+ " label1 : for(;;) {\n" + >+ " class X {\n" + >+ " void foo() {\n" + >+ " label2 : for(;;) {\n" + >+ " continue lab\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + > " }\n" + > "}\n"; > >+ >+ String completeBehind = "lab"; >+ int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "lab"; >+ String expectedReplacedSource = "lab"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " {\n" + >+ " class X {\n" + >+ " X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " {\n" + >+ " continue <CompleteOnLabel:lab>;\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -9191,7 +10881,7 @@ > testName); > } > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=122755 >-public void test0165() { >+public void test0165_Diet() { > > String str = > "public class X {\n" + >@@ -9225,19 +10915,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = ""; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:>;\n" + >- " }\n" + >- "}\n"; >+} >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=122755 >+public void test0165_Method() { >+ >+ String str = >+ "public class X {\n" + >+ " void foo() {" + >+ " /**" + >+ " *" + >+ " */." + >+ " }" + >+ "}\n"; >+ >+ String completeBehind = "/."; >+ int cursorLocation = str.lastIndexOf("/.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = ""; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9250,7 +10954,7 @@ > "full ast"); > } > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=137623 >-public void test0166() { >+public void test0166_Diet() { > > String str = > "public class X {\n" + >@@ -9285,19 +10989,34 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnClassLiteralAccess:int.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "int."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " public boolean foo() {\n" + >- " <CompleteOnClassLiteralAccess:int.>;\n" + >- " }\n" + >- "}\n"; >+} >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=137623 >+public void test0166_Method() { >+ >+ String str = >+ "public class X {\n" + >+ " public boolean foo() {\n" + >+ " if(this.equals(null))\n" + >+ " {\n" + >+ " (zzz==int.\n" + >+ " }\n" + >+ " }" + >+ "}\n"; >+ >+ String completeBehind = "int."; >+ int cursorLocation = str.lastIndexOf("int.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnClassLiteralAccess:int.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "int."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public boolean foo() {\n" + >+ " <CompleteOnClassLiteralAccess:int.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9310,7 +11029,7 @@ > "full ast"); > } > //https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 >-public void test0167() { >+public void test0167_Diet() { > > String str = > "public class X {\n" + >@@ -9349,34 +11068,53 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; >- expectedParentNodeToString = >- "try \n" + >- " {\n" + >- " throwing();\n" + >- " }\n" + >- "catch (IllegalAccessException e) {\n" + >- " }\n" + >- "catch (<CompleteOnException:IZZ> ) {\n" + >- " }"; >- completionIdentifier = "IZZ"; >- expectedReplacedSource = "IZZ"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " public boolean foo() {\n" + >- " try \n" + >- " {\n" + >- " throwing();\n" + >- " }\n" + >- " catch (IllegalAccessException e) {\n" + >- " }\n" + >- " catch (<CompleteOnException:IZZ> ) {\n" + >- " }\n" + >- " }\n" + >- "}\n"; >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 >+public void test0167_Method() { >+ >+ String str = >+ "public class X {\n" + >+ " public boolean foo() {\n" + >+ " try {\n" + >+ " throwing();\n" + >+ " }\n" + >+ " catch (IllegalAccessException e) {\n" + >+ " bar();\n" + >+ " }\n" + >+ " catch (IZZ) {\n" + >+ " }\n" + >+ " }" + >+ "}\n"; >+ >+ String completeBehind = "IZZ"; >+ int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; >+ String expectedParentNodeToString = >+ "try \n" + >+ " {\n" + >+ " throwing();\n" + >+ " }\n" + >+ "catch (IllegalAccessException e) {\n" + >+ " }\n" + >+ "catch (<CompleteOnException:IZZ> ) {\n" + >+ " }"; >+ String completionIdentifier = "IZZ"; >+ String expectedReplacedSource = "IZZ"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public boolean foo() {\n" + >+ " try \n" + >+ " {\n" + >+ " throwing();\n" + >+ " }\n" + >+ " catch (IllegalAccessException e) {\n" + >+ " }\n" + >+ " catch (<CompleteOnException:IZZ> ) {\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9389,7 +11127,7 @@ > "full ast"); > } > //https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 >-public void test0168() { >+public void test0168_Diet() { > > String str = > "public class X {\n" + >@@ -9427,34 +11165,52 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; >- expectedParentNodeToString = >- "try \n" + >- " {\n" + >- " throwing();\n" + >- " }\n" + >- "catch (IllegalAccessException e) {\n" + >- " }\n" + >- "catch (<CompleteOnException:IZZ> ) {\n" + >- " }"; >- completionIdentifier = "IZZ"; >- expectedReplacedSource = "IZZ"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " public boolean foo() {\n" + >- " try \n" + >- " {\n" + >- " throwing();\n" + >- " }\n" + >- " catch (IllegalAccessException e) {\n" + >- " }\n" + >- " catch (<CompleteOnException:IZZ> ) {\n" + >- " }\n" + >- " }\n" + >- "}\n"; >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 >+public void test0168_Method() { >+ >+ String str = >+ "public class X {\n" + >+ " public boolean foo() {\n" + >+ " try {\n" + >+ " throwing();\n" + >+ " }\n" + >+ " catch (IllegalAccessException e) {\n" + >+ " bar();\n" + >+ " }\n" + >+ " catch (IZZ\n" + >+ " }" + >+ "}\n"; >+ >+ String completeBehind = "IZZ"; >+ int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; >+ String expectedParentNodeToString = >+ "try \n" + >+ " {\n" + >+ " throwing();\n" + >+ " }\n" + >+ "catch (IllegalAccessException e) {\n" + >+ " }\n" + >+ "catch (<CompleteOnException:IZZ> ) {\n" + >+ " }"; >+ String completionIdentifier = "IZZ"; >+ String expectedReplacedSource = "IZZ"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public boolean foo() {\n" + >+ " try \n" + >+ " {\n" + >+ " throwing();\n" + >+ " }\n" + >+ " catch (IllegalAccessException e) {\n" + >+ " }\n" + >+ " catch (<CompleteOnException:IZZ> ) {\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9467,7 +11223,7 @@ > "full ast"); > } > //https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 >-public void test0169() { >+public void test0169_Diet() { > > String str = > "public class X {\n" + >@@ -9506,19 +11262,38 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "IZZ"; >- expectedReplacedSource = "IZZ"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " public boolean foo() {\n" + >- " <CompleteOnException:IZZ>;\n" + >- " }\n" + >- "}\n"; >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 >+public void test0169_Method() { >+ >+ String str = >+ "public class X {\n" + >+ " public boolean foo() {\n" + >+ " try {\n" + >+ " throwing();\n" + >+ " }\n" + >+ " catch (IllegalAccessException e) {\n" + >+ " bar()\n" + >+ " }\n" + >+ " catch (IZZ) {\n" + >+ " }\n" + >+ " }" + >+ "}\n"; >+ >+ String completeBehind = "IZZ"; >+ int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "IZZ"; >+ String expectedReplacedSource = "IZZ"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public boolean foo() {\n" + >+ " <CompleteOnException:IZZ>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9531,7 +11306,7 @@ > "full ast"); > } > //https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 >-public void test0170() { >+public void test0170_Diet() { > > String str = > "public class X {\n" + >@@ -9571,19 +11346,39 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "IZZ"; >- expectedReplacedSource = "IZZ"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " public boolean foo() {\n" + >- " <CompleteOnException:IZZ>;\n" + >- " }\n" + >- "}\n"; >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 >+public void test0170_Method() { >+ >+ String str = >+ "public class X {\n" + >+ " public boolean foo() {\n" + >+ " #\n" + >+ " try {\n" + >+ " throwing();\n" + >+ " }\n" + >+ " catch (IllegalAccessException e) {\n" + >+ " bar();\n" + >+ " }\n" + >+ " catch (IZZ) {\n" + >+ " }\n" + >+ " }" + >+ "}\n"; >+ >+ String completeBehind = "IZZ"; >+ int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "IZZ"; >+ String expectedReplacedSource = "IZZ"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public boolean foo() {\n" + >+ " <CompleteOnException:IZZ>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -9596,7 +11391,7 @@ > "full ast"); > } > //https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 >-public void test0171() { >+public void test0171_Diet() { > > String str = > "public class X {\n" + >@@ -9632,31 +11427,47 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; >- expectedParentNodeToString = >- "try \n" + >- " {\n" + >- " throwing();\n" + >- " }\n" + >- "catch (<CompleteOnException:IZZ> ) {\n" + >- " }" >-; >- completionIdentifier = "IZZ"; >- expectedReplacedSource = "IZZ"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " public boolean foo() {\n" + >- " try \n" + >- " {\n" + >- " throwing();\n" + >- " }\n" + >- " catch (<CompleteOnException:IZZ> ) {\n" + >- " }\n" + >- " }\n" + >- "}\n"; >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 >+public void test0171_Method() { >+ >+ String str = >+ "public class X {\n" + >+ " public boolean foo() {\n" + >+ " try {\n" + >+ " throwing();\n" + >+ " }\n" + >+ " catch (IZZ) {\n" + >+ " }\n" + >+ " }" + >+ "}\n"; >+ >+ String completeBehind = "IZZ"; >+ int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnException:IZZ>"; >+ String expectedParentNodeToString = >+ "try \n" + >+ " {\n" + >+ " throwing();\n" + >+ " }\n" + >+ "catch (<CompleteOnException:IZZ> ) {\n" + >+ " }" >+ ; >+ String completionIdentifier = "IZZ"; >+ String expectedReplacedSource = "IZZ"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public boolean foo() {\n" + >+ " try \n" + >+ " {\n" + >+ " throwing();\n" + >+ " }\n" + >+ " catch (<CompleteOnException:IZZ> ) {\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >Index: src/org/eclipse/jdt/core/tests/compiler/parser/GenericsCompletionParserTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/GenericsCompletionParserTest.java,v >retrieving revision 1.28 >diff -u -r1.28 GenericsCompletionParserTest.java >--- src/org/eclipse/jdt/core/tests/compiler/parser/GenericsCompletionParserTest.java 6 Mar 2007 04:42:13 -0000 1.28 >+++ src/org/eclipse/jdt/core/tests/compiler/parser/GenericsCompletionParserTest.java 28 Mar 2007 08:17:44 -0000 >@@ -922,7 +922,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0030(){ >+public void test0030_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -954,19 +954,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0030_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " Y<Z>.\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -978,7 +989,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0031(){ >+public void test0031_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1010,19 +1021,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0031_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " Y<Z>. var\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1034,7 +1056,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0032(){ >+public void test0032_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1066,19 +1088,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.W>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "W"; >- expectedReplacedSource = "Y<Z>.W"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0032_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnType:Y<Z>.W>;\n" + >+ " Y<Z>.W\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>.W"; >+ int cursorLocation = str.indexOf("Y<Z>.W") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.W>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "W"; >+ String expectedReplacedSource = "Y<Z>.W"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnType:Y<Z>.W>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1090,7 +1123,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0033(){ >+public void test0033_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1122,19 +1155,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.W>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "W"; >- expectedReplacedSource = "Y<Z>.W"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0033_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnType:Y<Z>.W>;\n" + >+ " Y<Z>.W var\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>.W"; >+ int cursorLocation = str.indexOf("Y<Z>.W") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.W>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "W"; >+ String expectedReplacedSource = "Y<Z>.W"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnType:Y<Z>.W>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1146,7 +1190,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0034(){ >+public void test0034_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1178,19 +1222,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0034_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " this.<Y, Y<Z>.>bar();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1202,7 +1257,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0035(){ >+public void test0035_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1234,19 +1289,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0035_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " this.<Y, Y<Z>.>bar(\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1258,7 +1324,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0036(){ >+public void test0036_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1290,19 +1356,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0036_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " this.<Y, Y<Z>.>bar\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1314,7 +1391,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0037(){ >+public void test0037_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1346,19 +1423,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0037_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " this.<Y, Y<Z>.>\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1370,7 +1458,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0038(){ >+public void test0038_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1402,19 +1490,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0038_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " this.<Y, Y<Z>.\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1426,7 +1525,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0039(){ >+public void test0039_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1458,19 +1557,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0039_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " new <Y, Y<Z>.>X();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1482,7 +1592,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0040(){ >+public void test0040_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1514,19 +1624,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0040_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " aaa.new <Y, Y<Z>.>X();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1538,7 +1659,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0041(){ >+public void test0041_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1570,19 +1691,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0041_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " new V().new <Y, Y<Z>.>X();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1594,7 +1726,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0042(){ >+public void test0042_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1626,19 +1758,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0042_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " for(Y<Z>. var;;){}\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1650,7 +1793,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0043(){ >+public void test0043_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1682,19 +1825,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0043_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " for(Y<Z>.\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1706,7 +1860,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0044(){ >+public void test0044_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1740,28 +1894,41 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnException:Y<Z>.>"; >- expectedParentNodeToString = >- "try \n" + >- " {\n" + >- " }\n" + >- "catch (<CompleteOnException:Y<Z>.> ) {\n" + >- " }"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0044_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " try \n" + >- " {\n" + >- " }\n" + >- " catch (<CompleteOnException:Y<Z>.> ) {\n" + >- " }\n" + >+ " try {\n" + >+ " } catch(Y<Z>. e) {\n" + >+ " }\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnException:Y<Z>.>"; >+ String expectedParentNodeToString = >+ "try \n" + >+ " {\n" + >+ " }\n" + >+ "catch (<CompleteOnException:Y<Z>.> ) {\n" + >+ " }"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " try \n" + >+ " {\n" + >+ " }\n" + >+ " catch (<CompleteOnException:Y<Z>.> ) {\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1773,7 +1940,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0045(){ >+public void test0045_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1806,30 +1973,42 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnException:Y<Z>.>"; >- expectedParentNodeToString = >- "try \n" + >- " {\n" + >- " }\n" + >- "catch (<CompleteOnException:Y<Z>.> ) {\n" + >- " }"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0045_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " try \n" + >- " {\n" + >- " }\n" + >- " catch (<CompleteOnException:Y<Z>.> ) {\n" + >- " }\n" + >+ " try {\n" + >+ " } catch(Y<Z>. e\n" + > " }\n" + >- "}\n"; >+ "}"; > >- checkMethodParse( >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnException:Y<Z>.>"; >+ String expectedParentNodeToString = >+ "try \n" + >+ " {\n" + >+ " }\n" + >+ "catch (<CompleteOnException:Y<Z>.> ) {\n" + >+ " }"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " try \n" + >+ " {\n" + >+ " }\n" + >+ " catch (<CompleteOnException:Y<Z>.> ) {\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; >+ >+ checkMethodParse( > str.toCharArray(), > cursorLocation, > expectedCompletionNodeToString, >@@ -1839,7 +2018,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0046(){ >+public void test0046_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1871,19 +2050,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnException:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0046_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnException:Y<Z>.>;\n" + >+ " catch(Y<Z>. e\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnException:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnException:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1895,7 +2085,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0047(){ >+public void test0047_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1927,19 +2117,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0047_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Object a = <CompleteOnType:Y<Z>.>;\n" + >+ " Object a = (Y<Z>.) e;\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object a = <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1951,7 +2152,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0048(){ >+public void test0048_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -1983,19 +2184,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0048_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Object a = <CompleteOnType:Y<Z>.>;\n" + >+ " Object a = (Y<Z>.) e;\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object a = <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2007,7 +2219,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0049(){ >+public void test0049_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -2039,19 +2251,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0049_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " (Y<Z>.) e;\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2063,7 +2286,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0050(){ >+public void test0050_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -2095,18 +2318,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<NONE>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "<NONE>"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0050_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >+ " Object[] o = new Y<Z>.[0];\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<NONE>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "<NONE>"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2118,7 +2352,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0051(){ >+public void test0051_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -2150,18 +2384,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<NONE>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "<NONE>"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0051_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >+ " Object[] o = new Y<Z>.\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<NONE>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "<NONE>"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2173,7 +2418,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0052(){ >+public void test0052_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -2205,18 +2450,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<NONE>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "<NONE>"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0052_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >+ " new Y<Z>.\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<NONE>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "<NONE>"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2228,7 +2484,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0053(){ >+public void test0053_Diet(){ > String str = > "public class X {\n" + > " public X() {\n" + >@@ -2258,18 +2514,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >+} >+public void test0053_Method(){ >+ String str = >+ "public class X {\n" + > " public X() {\n" + >- " super();\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " <Y<Z>.>super();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " super();\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2281,7 +2548,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0054(){ >+public void test0054_Diet(){ > String str = > "public class X {\n" + > " public X() {\n" + >@@ -2311,18 +2578,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >+} >+public void test0054_Method(){ >+ String str = >+ "public class X {\n" + > " public X() {\n" + >- " super();\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " aaa.<Y<Z>.>super();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " super();\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2334,7 +2612,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0055(){ >+public void test0055_Diet(){ > String str = > "public class X {\n" + > " public X() {\n" + >@@ -2364,18 +2642,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "Y<Z>."; >- expectedUnitDisplayString = >- "public class X {\n" + >+} >+public void test0055_Method(){ >+ String str = >+ "public class X {\n" + > " public X() {\n" + >- " super();\n" + >- " <CompleteOnType:Y<Z>.>;\n" + >+ " A.this.<Y<Z>.>super();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z>."; >+ int cursorLocation = str.indexOf("Y<Z>.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Y<Z>.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "Y<Z>."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " super();\n" + >+ " <CompleteOnType:Y<Z>.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2388,7 +2677,7 @@ > "full ast"); > } > >-public void test0056(){ >+public void test0056_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -2420,19 +2709,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0056_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " Y<Z\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2444,7 +2744,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0057(){ >+public void test0057_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -2476,19 +2776,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<V, <CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0057_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<V, <CompleteOnType:Z>>;\n" + >+ " Y<V,Z\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<V,Z"; >+ int cursorLocation = str.indexOf("Y<V,Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<V, <CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<V, <CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2500,7 +2811,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0058(){ >+public void test0058_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -2532,19 +2843,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "W<U>.Y<V, <CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0058_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " W<U>.Y<V, <CompleteOnType:Z>>;\n" + >+ " W<U>.Y<V,Z\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<V,Z"; >+ int cursorLocation = str.indexOf("Y<V,Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "W<U>.Y<V, <CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " W<U>.Y<V, <CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3803,7 +4125,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0099(){ >+public void test0099_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -3835,19 +4157,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0099_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " this.<Y, Y<Z bar();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3859,7 +4192,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0100(){ >+public void test0100_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -3891,31 +4224,42 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >- " }\n" + >- "}\n"; >- >- checkMethodParse( >- str.toCharArray(), >- cursorLocation, >- expectedCompletionNodeToString, >- expectedParentNodeToString, >- expectedUnitDisplayString, >- completionIdentifier, >- expectedReplacedSource, >- "full ast"); > } >-public void test0101(){ >+public void test0100_Method(){ >+ String str = >+ "public class X {\n" + >+ " void foo() {\n" + >+ " this.<Y, Y<Z> bar();\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; >+ >+ checkMethodParse( >+ str.toCharArray(), >+ cursorLocation, >+ expectedCompletionNodeToString, >+ expectedParentNodeToString, >+ expectedUnitDisplayString, >+ completionIdentifier, >+ expectedReplacedSource, >+ "full ast"); >+} >+public void test0101_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -3947,19 +4291,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0101_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " this.<Y, Y<Z>> bar();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3971,7 +4326,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0102(){ >+public void test0102_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4003,19 +4358,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0102_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " this.<Y, Y<Z bar\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4027,7 +4393,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0103(){ >+public void test0103_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4059,19 +4425,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0103_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " this.<Y, Y<Z> bar\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4083,7 +4460,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0104(){ >+public void test0104_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4115,19 +4492,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0104_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " this.<Y, Y<Z>> bar\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4139,7 +4527,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0105(){ >+public void test0105_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4171,19 +4559,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0105_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " this.<Y, Y<Z\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4195,7 +4594,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0106(){ >+public void test0106_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4227,19 +4626,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0106_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " this.<Y, Y<Z>\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4251,7 +4661,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0107(){ >+public void test0107_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4283,19 +4693,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0107_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " this.<Y, Y<Z>>\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4307,7 +4728,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0108(){ >+public void test0108_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4339,19 +4760,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0108_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " new <Y, Y<Z X();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4363,7 +4795,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0109(){ >+public void test0109_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4395,19 +4827,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0109_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " new <Y, Y<Z> X();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4419,7 +4862,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0110(){ >+public void test0110_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4451,19 +4894,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0110_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " new <Y, Y<Z>> X();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4475,7 +4929,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0111(){ >+public void test0111_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4507,19 +4961,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0111_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " aaa.new <Y, Y<Z X();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4531,7 +4996,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0112(){ >+public void test0112_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4563,19 +5028,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0112_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " aaa.new <Y, Y<Z> X();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4587,7 +5063,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0113(){ >+public void test0113_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4619,19 +5095,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0113_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " aaa.new <Y, Y<Z>> X();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4643,7 +5130,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0114(){ >+public void test0114_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4675,19 +5162,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0114_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " new V().new <Y, Y<Z X();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4699,7 +5197,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0115(){ >+public void test0115_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4731,19 +5229,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0115_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " new V().new <Y, Y<Z> X();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4755,7 +5264,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0116(){ >+public void test0116_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4787,19 +5296,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0116_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " new V().new <Y, Y<Z>> X();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4811,7 +5331,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0117(){ >+public void test0117_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4843,19 +5363,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0117_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " for(Y<Z var;;){}\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4867,7 +5398,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0118(){ >+public void test0118_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4899,19 +5430,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0118_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " for(Y<Z> var;;){}\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4923,7 +5465,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0119(){ >+public void test0119_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -4955,19 +5497,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0119_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " for(Y<Z\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4979,7 +5532,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0120(){ >+public void test0120_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5011,19 +5564,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0120_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " for(Y<Z>\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5035,7 +5599,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0121(){ >+public void test0121_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5069,19 +5633,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0121_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " try {\n" + >+ " } catch(Y<Z e) {\n" + >+ " }\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5093,7 +5670,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0122(){ >+public void test0122_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5127,19 +5704,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0122_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " try {\n" + >+ " } catch(Y<Z> e) {\n" + >+ " }\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5151,7 +5741,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0123(){ >+public void test0123_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5184,19 +5774,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0123_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " try {\n" + >+ " } catch(Y<Z e\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5208,7 +5810,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0124(){ >+public void test0124_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5241,19 +5843,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0124_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " try {\n" + >+ " } catch(Y<Z> e\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5265,7 +5879,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0125(){ >+public void test0125_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5297,19 +5911,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0125_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " catch(Y<Z e\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5321,7 +5946,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0126(){ >+public void test0126_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5353,19 +5978,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0126_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " catch(Y<Z> e\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5377,7 +6013,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0127(){ >+public void test0127_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5409,19 +6045,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:Z>"; >- expectedParentNodeToString = "(Y < <CompleteOnName:Z>)"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0127_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Object a = (Y < <CompleteOnName:Z>);\n" + >+ " Object a = (Y<Z ) e;\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:Z>"; >+ String expectedParentNodeToString = "(Y < <CompleteOnName:Z>)"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object a = (Y < <CompleteOnName:Z>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5433,7 +6080,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0128(){ >+public void test0128_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5465,19 +6112,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:Z>"; >- expectedParentNodeToString = "(Y < <CompleteOnName:Z>)"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0128_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Object a = (Y < <CompleteOnName:Z>);\n" + >+ " Object a = (Y<Z> ) e;\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:Z>"; >+ String expectedParentNodeToString = "(Y < <CompleteOnName:Z>)"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object a = (Y < <CompleteOnName:Z>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5489,7 +6147,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0129(){ >+public void test0129_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5521,19 +6179,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:Z>"; >- expectedParentNodeToString = "(Y < <CompleteOnName:Z>)"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0129_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " (Y < <CompleteOnName:Z>);\n" + >+ " (Y<Z) e;\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:Z>"; >+ String expectedParentNodeToString = "(Y < <CompleteOnName:Z>)"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " (Y < <CompleteOnName:Z>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5545,7 +6214,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0130(){ >+public void test0130_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5577,19 +6246,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:Z>"; >- expectedParentNodeToString = "(Y < <CompleteOnName:Z>)"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0130_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " (Y < <CompleteOnName:Z>);\n" + >+ " (Y<Z>) e;\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:Z>"; >+ String expectedParentNodeToString = "(Y < <CompleteOnName:Z>)"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " (Y < <CompleteOnName:Z>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5601,7 +6281,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0131(){ >+public void test0131_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5633,19 +6313,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0131_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Object[] o = Y<<CompleteOnType:Z>>;\n" + >+ " Object[] o = new Y<Z[0];\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object[] o = Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5657,7 +6348,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0132(){ >+public void test0132_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5689,19 +6380,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0132_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Object[] o = Y<<CompleteOnType:Z>>;\n" + >+ " Object[] o = new Y<Z>[0];\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object[] o = Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5713,7 +6415,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0133(){ >+public void test0133_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5745,19 +6447,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0133_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Object[] o = Y<<CompleteOnType:Z>>;\n" + >+ " Object[] o = new Y<Z\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object[] o = Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5769,7 +6482,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0134(){ >+public void test0134_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5801,19 +6514,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0134_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Object[] o = Y<<CompleteOnType:Z>>;\n" + >+ " Object[] o = new Y<Z>\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object[] o = Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5825,7 +6549,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0135(){ >+public void test0135_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5857,19 +6581,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0135_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " new Y<Z\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5881,7 +6616,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0136(){ >+public void test0136_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -5913,19 +6648,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0136_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " new Y<Z>\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5937,7 +6683,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0137(){ >+public void test0137_Diet(){ > String str = > "public class X {\n" + > " public X() {\n" + >@@ -5967,18 +6713,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >+} >+public void test0137_Method(){ >+ String str = >+ "public class X {\n" + > " public X() {\n" + >- " super();\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " <Y<Z super(0);\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " super();\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -5990,7 +6747,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0138(){ >+public void test0138_Diet(){ > String str = > "public class X {\n" + > " public X() {\n" + >@@ -6020,18 +6777,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >+} >+public void test0138_Method(){ >+ String str = >+ "public class X {\n" + > " public X() {\n" + >- " super();\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " <Y<Z> super(0);\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " super();\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6043,7 +6811,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0139(){ >+public void test0139_Diet(){ > String str = > "public class X {\n" + > " public X() {\n" + >@@ -6073,18 +6841,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >+} >+public void test0139_Method(){ >+ String str = >+ "public class X {\n" + > " public X() {\n" + >- " super();\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " <Y<Z>> super(0);\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " super();\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6096,7 +6875,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0140(){ >+public void test0140_Diet(){ > String str = > "public class X {\n" + > " public X() {\n" + >@@ -6126,18 +6905,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >+} >+public void test0140_Method(){ >+ String str = >+ "public class X {\n" + > " public X() {\n" + >- " super();\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " aaa.<Y<Z super(0);\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " super();\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6149,7 +6939,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0141(){ >+public void test0141_Diet(){ > String str = > "public class X {\n" + > " public X() {\n" + >@@ -6179,18 +6969,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >+} >+public void test0141_Method(){ >+ String str = >+ "public class X {\n" + > " public X() {\n" + >- " super();\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " aaa.<Y<Z> super(0);\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " super();\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6202,7 +7003,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0142(){ >+public void test0142_Diet(){ > String str = > "public class X {\n" + > " public X() {\n" + >@@ -6232,18 +7033,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >+} >+public void test0142_Method(){ >+ String str = >+ "public class X {\n" + > " public X() {\n" + >- " super();\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " aaa.<Y<Z>> super(0);\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " super();\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6255,7 +7067,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0143(){ >+public void test0143_Diet(){ > String str = > "public class X {\n" + > " public X() {\n" + >@@ -6285,18 +7097,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >+} >+public void test0143_Method(){ >+ String str = >+ "public class X {\n" + > " public X() {\n" + >- " super();\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " A.this.<Y<Z super(0);\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " super();\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6308,7 +7131,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0144(){ >+public void test0144_Diet(){ > String str = > "public class X {\n" + > " public X() {\n" + >@@ -6338,18 +7161,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >+} >+public void test0144_Method(){ >+ String str = >+ "public class X {\n" + > " public X() {\n" + >- " super();\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " A.this.<Y<Z> super(0);\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " super();\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6361,7 +7195,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0145(){ >+public void test0145_Diet(){ > String str = > "public class X {\n" + > " public X() {\n" + >@@ -6391,18 +7225,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >+} >+public void test0145_Method(){ >+ String str = >+ "public class X {\n" + > " public X() {\n" + >- " super();\n" + >- " Y<<CompleteOnType:Z>>;\n" + >+ " A.this.<Y<Z>> super(0);\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " super();\n" + >+ " Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6804,7 +7649,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0159(){ >+public void test0159_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -6836,19 +7681,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0159_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Object a = Y<<CompleteOnType:Z>>;\n" + >+ " Object a = (W<Y<Z> ) e;\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object a = Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -6860,7 +7716,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0160(){ >+public void test0160_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -6892,19 +7748,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:Z>"; >- expectedParentNodeToString = "(Y < <CompleteOnName:Z>)"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0160_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " (Y < <CompleteOnName:Z>);\n" + >+ " ((Y<Z>) e).foo();\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:Z>"; >+ String expectedParentNodeToString = "(Y < <CompleteOnName:Z>)"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " (Y < <CompleteOnName:Z>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7031,7 +7898,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0165(){ >+public void test0165_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -7063,19 +7930,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:Z>"; >- expectedParentNodeToString = "(W.Y < <CompleteOnName:Z>)"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0165_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Object a = (W.Y < <CompleteOnName:Z>);\n" + >+ " Object a = (W.Y<Z>) e;\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:Z>"; >+ String expectedParentNodeToString = "(W.Y < <CompleteOnName:Z>)"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object a = (W.Y < <CompleteOnName:Z>);\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7087,7 +7965,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0166(){ >+public void test0166_Diet(){ > String str = > "public class X {\n" + > " void foo() {\n" + >@@ -7119,19 +7997,30 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Z>"; >- expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >- completionIdentifier = "Z"; >- expectedReplacedSource = "Z"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+public void test0166_Method(){ >+ String str = >+ "public class X {\n" + > " void foo() {\n" + >- " Object a = W<U>.Y<<CompleteOnType:Z>>;\n" + >+ " Object a = (W<U>.Y<Z>) e;\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "Y<Z"; >+ int cursorLocation = str.indexOf("Y<Z") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Z>"; >+ String expectedParentNodeToString = "Y<<CompleteOnType:Z>>"; >+ String completionIdentifier = "Z"; >+ String expectedReplacedSource = "Z"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " Object a = W<U>.Y<<CompleteOnType:Z>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7146,7 +8035,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=69598 > */ >-public void test0167(){ >+public void test0167_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7181,23 +8070,40 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:i.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "i."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " List<Integer> cont;\n" + >- " Integer i;\n" + >- " {\n" + >- " <CompleteOnName:i.>;\n" + >+} >+/* >+* https://bugs.eclipse.org/bugs/show_bug.cgi?id=69598 >+*/ >+public void test0167_Method(){ >+ String str = >+ "public class X {\n" + >+ " void foo(){\n" + >+ " List<Integer> cont=new ArrayList<Integer>();\n" + >+ " for (Integer i:cont){\n" + >+ " i.\n" + > " }\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "i."; >+ int cursorLocation = str.indexOf("i.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:i.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "i."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " List<Integer> cont;\n" + >+ " Integer i;\n" + >+ " {\n" + >+ " <CompleteOnName:i.>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7212,7 +8118,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=69598 > */ >-public void test0168(){ >+public void test0168_Diet(){ > String str = > "public class X {\n" + > " void foo(){\n" + >@@ -7247,20 +8153,37 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:i.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "i."; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " List<Integer> cont;\n" + >- " <CompleteOnName:i.>;\n" + >+} >+/* >+* https://bugs.eclipse.org/bugs/show_bug.cgi?id=69598 >+*/ >+public void test0168_Method(){ >+ String str = >+ "public class X {\n" + >+ " void foo(){\n" + >+ " List<Integer> cont=new ArrayList<Integer>();\n" + >+ " for (Integer i:cont){\n" + >+ " }\n" + >+ " i.\n" + > " }\n" + >- "}\n"; >+ "}"; >+ >+ >+ String completeBehind = "i."; >+ int cursorLocation = str.indexOf("i.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:i.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "i."; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " List<Integer> cont;\n" + >+ " <CompleteOnName:i.>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7380,7 +8303,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 > */ >-public void test0171(){ >+public void test0171_Diet(){ > String str = > "public class X{\n" + > " public void foo() {\n" + >@@ -7414,20 +8337,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:bar>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "bar"; >- expectedReplacedSource = "bar"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 >+ */ >+public void test0171_Method(){ >+ String str = >+ "public class X{\n" + > " public void foo() {\n" + >- " Object o;\n" + >- " <CompleteOnName:bar>;\n" + >+ " Object o =(A<B>) tmp;\n" + >+ " bar\n" + > " }\n" + >- "}\n"; >+ "}\n" + >+ "\n"; >+ >+ >+ String completeBehind = "bar"; >+ int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:bar>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "bar"; >+ String expectedReplacedSource = "bar"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:bar>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7442,7 +8381,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 > */ >-public void test0172(){ >+public void test0172_Diet(){ > String str = > "public class X{\n" + > " public void foo() {\n" + >@@ -7476,20 +8415,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:bar>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "bar"; >- expectedReplacedSource = "bar"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 >+ */ >+public void test0172_Method(){ >+ String str = >+ "public class X{\n" + > " public void foo() {\n" + >- " Object o;\n" + >- " <CompleteOnName:bar>;\n" + >+ " Object o =(A<B>[]) tmp;\n" + >+ " bar\n" + > " }\n" + >- "}\n"; >+ "}\n" + >+ "\n"; >+ >+ >+ String completeBehind = "bar"; >+ int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:bar>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "bar"; >+ String expectedReplacedSource = "bar"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:bar>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7504,7 +8459,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 > */ >-public void test0173(){ >+public void test0173_Diet(){ > String str = > "public class X{\n" + > " public void foo() {\n" + >@@ -7538,20 +8493,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:bar>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "bar"; >- expectedReplacedSource = "bar"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 >+ */ >+public void test0173_Method(){ >+ String str = >+ "public class X{\n" + > " public void foo() {\n" + >- " Object o;\n" + >- " <CompleteOnName:bar>;\n" + >+ " Object o =(A<B>.C) tmp;\n" + >+ " bar\n" + > " }\n" + >- "}\n"; >+ "}\n" + >+ "\n"; >+ >+ >+ String completeBehind = "bar"; >+ int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:bar>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "bar"; >+ String expectedReplacedSource = "bar"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:bar>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7566,7 +8537,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 > */ >-public void test0174(){ >+public void test0174_Diet(){ > String str = > "public class X{\n" + > " public void foo() {\n" + >@@ -7600,20 +8571,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:bar>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "bar"; >- expectedReplacedSource = "bar"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 >+ */ >+public void test0174_Method(){ >+ String str = >+ "public class X{\n" + > " public void foo() {\n" + >- " Object o;\n" + >- " <CompleteOnName:bar>;\n" + >+ " Object o =(A<B>.C[]) tmp;\n" + >+ " bar\n" + > " }\n" + >- "}\n"; >+ "}\n" + >+ "\n"; >+ >+ >+ String completeBehind = "bar"; >+ int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:bar>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "bar"; >+ String expectedReplacedSource = "bar"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:bar>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7628,7 +8615,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 > */ >-public void test0175(){ >+public void test0175_Diet(){ > String str = > "public class X{\n" + > " public void foo() {\n" + >@@ -7662,20 +8649,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:bar>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "bar"; >- expectedReplacedSource = "bar"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 >+ */ >+public void test0175_Method(){ >+ String str = >+ "public class X{\n" + > " public void foo() {\n" + >- " Object o;\n" + >- " <CompleteOnName:bar>;\n" + >+ " Object o =(A<B>.C<D>) tmp;\n" + >+ " bar\n" + > " }\n" + >- "}\n"; >+ "}\n" + >+ "\n"; >+ >+ >+ String completeBehind = "bar"; >+ int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:bar>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "bar"; >+ String expectedReplacedSource = "bar"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:bar>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7690,7 +8693,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 > */ >-public void test0176(){ >+public void test0176_Diet(){ > String str = > "public class X{\n" + > " public void foo() {\n" + >@@ -7724,20 +8727,36 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:bar>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "bar"; >- expectedReplacedSource = "bar"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702 >+ */ >+public void test0176_Method(){ >+ String str = >+ "public class X{\n" + > " public void foo() {\n" + >- " Object o;\n" + >- " <CompleteOnName:bar>;\n" + >+ " Object o =(A<B>.C<D>[]) tmp;\n" + >+ " bar\n" + > " }\n" + >- "}\n"; >+ "}\n" + >+ "\n"; >+ >+ >+ String completeBehind = "bar"; >+ int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:bar>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "bar"; >+ String expectedReplacedSource = "bar"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public void foo() {\n" + >+ " Object o;\n" + >+ " <CompleteOnName:bar>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -7990,7 +9009,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=75649 > */ >-public void test0184(){ >+public void test0184_Diet(){ > String str = > "public class X <T>{\n" + > " void foo() {\n" + >@@ -8022,19 +9041,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Strin>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "Strin"; >- expectedReplacedSource = "String"; >- expectedUnitDisplayString = >- "public class X<T> {\n" + >- " public X() {\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=75649 >+ */ >+public void test0184_Method(){ >+ String str = >+ "public class X <T>{\n" + > " void foo() {\n" + >- " X<? extends <CompleteOnType:Strin>>;\n" + >+ " X<? extends String> s;\n" + > " }\n" + >- "}\n"; >+ "}\n" + >+ "\n"; >+ >+ String completeBehind = "Strin"; >+ int cursorLocation = str.indexOf("Strin") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Strin>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "Strin"; >+ String expectedReplacedSource = "String"; >+ String expectedUnitDisplayString = >+ "public class X<T> {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " X<? extends <CompleteOnType:Strin>>;\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -8121,7 +9154,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=93119 > */ >-public void test0187(){ >+public void test0187_Diet(){ > String str = > "public class Test {\n" + > " void foo() {\n" + >@@ -8152,20 +9185,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnKeyword:ext>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "ext"; >- expectedReplacedSource = "ext"; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=93119 >+ */ >+public void test0187_Method(){ >+ String str = > "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + > " void foo() {\n" + >- " List<? extends <CompleteOnKeyword:ext>>;\n" + >+ " List<? ext\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "ext"; >+ int cursorLocation = str.indexOf("ext") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnKeyword:ext>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "ext"; >+ String expectedReplacedSource = "ext"; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " List<? extends <CompleteOnKeyword:ext>>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8179,7 +9225,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=80432 > */ >-public void test0188(){ >+public void test0188_Diet(){ > String str = > "public class Test {\n" + > " void foo() {\n" + >@@ -8212,22 +9258,37 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:toto.>"; >- expectedParentNodeToString = "bar(<CompleteOnName:toto.>)"; >- completionIdentifier = ""; >- expectedReplacedSource = "toto."; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=80432 >+ */ >+public void test0188_Method(){ >+ String str = > "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + > " void foo() {\n" + >- " {\n" + >- " bar(<CompleteOnName:toto.>);\n" + >+ " for(;;) {\n" + >+ " bar(toto.\n" + > " }\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "toto."; >+ int cursorLocation = str.indexOf("toto.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:toto.>"; >+ String expectedParentNodeToString = "bar(<CompleteOnName:toto.>)"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "toto."; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " {\n" + >+ " bar(<CompleteOnName:toto.>);\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8241,7 +9302,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82560 > */ >-public void test0189(){ >+public void test0189_Diet(){ > String str = > "public class Test {\n" + > " void bar() {\n" + >@@ -8272,20 +9333,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnType:Runtime>"; >- expectedParentNodeToString = "zzz.foo(new <CompleteOnType:Runtime>())"; >- completionIdentifier = "Runtime"; >- expectedReplacedSource = "Runtime"; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82560 >+ */ >+public void test0189_Method(){ >+ String str = > "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + > " void bar() {\n" + >- " zzz.foo(new <CompleteOnType:Runtime>());\n" + >+ " zzz.<String>foo(new Runtime());\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "Runtime"; >+ int cursorLocation = str.indexOf("Runtime") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnType:Runtime>"; >+ String expectedParentNodeToString = "zzz.foo(new <CompleteOnType:Runtime>())"; >+ String completionIdentifier = "Runtime"; >+ String expectedReplacedSource = "Runtime"; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " zzz.foo(new <CompleteOnType:Runtime>());\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8299,7 +9373,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82560 > */ >-public void test0190(){ >+public void test0190_Diet(){ > String str = > "public class Test {\n" + > " void bar() {\n" + >@@ -8330,20 +9404,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:var>"; >- expectedParentNodeToString = "zzz.foo(<CompleteOnName:var>)"; >- completionIdentifier = "var"; >- expectedReplacedSource = "var"; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82560 >+ */ >+public void test0190_Method(){ >+ String str = > "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + > " void bar() {\n" + >- " zzz.foo(<CompleteOnName:var>);\n" + >+ " zzz.<String>foo(var);\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "var"; >+ int cursorLocation = str.indexOf("var") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:var>"; >+ String expectedParentNodeToString = "zzz.foo(<CompleteOnName:var>)"; >+ String completionIdentifier = "var"; >+ String expectedReplacedSource = "var"; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " zzz.foo(<CompleteOnName:var>);\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8357,7 +9444,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82560 > */ >-public void test0191(){ >+public void test0191_Diet(){ > String str = > "public class Test {\n" + > " void bar() {\n" + >@@ -8388,20 +9475,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnMessageSend:zzz.foo()>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "foo("; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82560 >+ */ >+public void test0191_Method(){ >+ String str = > "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + > " void bar() {\n" + >- " <CompleteOnMessageSend:zzz.foo()>;\n" + >+ " zzz.<String>foo();\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "foo("; >+ int cursorLocation = str.indexOf("foo(") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnMessageSend:zzz.foo()>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "foo("; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " <CompleteOnMessageSend:zzz.foo()>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8415,7 +9515,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82560 > */ >-public void test0192(){ >+public void test0192_Diet(){ > String str = > "public class Test {\n" + > " void bar() {\n" + >@@ -8446,20 +9546,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnMessageSendName:zzz.<String>fo()>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "fo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82560 >+ */ >+public void test0192_Method(){ >+ String str = > "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + > " void bar() {\n" + >- " <CompleteOnMessageSendName:zzz.<String>fo()>;\n" + >+ " zzz.<String>foo();\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "fo"; >+ int cursorLocation = str.indexOf("fo") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnMessageSendName:zzz.<String>fo()>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "fo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " <CompleteOnMessageSendName:zzz.<String>fo()>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8473,7 +9586,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=94641 > */ >-public void test0193(){ >+public void test0193_Diet(){ > String str = > "public class Test {\n" + > " void bar() {\n" + >@@ -8504,20 +9617,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAllocationExpression:new Foo<X>()>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = ""; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=94641 >+ */ >+public void test0193_Method(){ >+ String str = > "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + > " void bar() {\n" + >- " <CompleteOnAllocationExpression:new Foo<X>()>;\n" + >+ " new Foo<X>();\n" + > " }\n" + > "}\n"; > >+ String completeBehind = ">("; >+ int cursorLocation = str.indexOf(">(") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAllocationExpression:new Foo<X>()>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = ""; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " <CompleteOnAllocationExpression:new Foo<X>()>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8531,7 +9657,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=94641 > */ >-public void test0194(){ >+public void test0194_Diet(){ > String str = > "public class Test {\n" + > " void bar() {\n" + >@@ -8562,20 +9688,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAllocationExpression:new Foo<X<X>>()>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = ""; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=94641 >+ */ >+public void test0194_Method(){ >+ String str = > "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + > " void bar() {\n" + >- " <CompleteOnAllocationExpression:new Foo<X<X>>()>;\n" + >+ " new Foo<X<X>>();\n" + > " }\n" + > "}\n"; > >+ String completeBehind = ">("; >+ int cursorLocation = str.indexOf(">(") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAllocationExpression:new Foo<X<X>>()>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = ""; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " <CompleteOnAllocationExpression:new Foo<X<X>>()>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8589,7 +9728,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=94641 > */ >-public void test0195(){ >+public void test0195_Diet(){ > String str = > "public class Test {\n" + > " void bar() {\n" + >@@ -8620,20 +9759,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAllocationExpression:new Foo<X<X<X>>>()>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = ""; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=94641 >+ */ >+public void test0195_Method(){ >+ String str = > "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + > " void bar() {\n" + >- " <CompleteOnAllocationExpression:new Foo<X<X<X>>>()>;\n" + >+ " new Foo<X<X<X>>>();\n" + > " }\n" + > "}\n"; > >+ String completeBehind = ">("; >+ int cursorLocation = str.indexOf(">(") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAllocationExpression:new Foo<X<X<X>>>()>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = ""; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " <CompleteOnAllocationExpression:new Foo<X<X<X>>>()>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8863,7 +10015,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=100302 > */ >-public void test0202(){ >+public void test0202_Diet(){ > String str = > "public class Test {\n" + > " void bar() {\n" + >@@ -8896,23 +10048,38 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:entry.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "entry."; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=100302 >+ */ >+public void test0202_Method(){ >+ String str = > "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + > " void bar() {\n" + >- " Entry entry;\n" + >- " {\n" + >- " <CompleteOnName:entry.>;\n" + >+ " for (Entry entry : (Set<Entry>) var) {\n" + >+ " entry.\n" + > " }\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "entry."; >+ int cursorLocation = str.indexOf("entry.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:entry.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "entry."; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " Entry entry;\n" + >+ " {\n" + >+ " <CompleteOnName:entry.>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8926,7 +10093,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=100302 > */ >-public void test0203(){ >+public void test0203_Diet(){ > String str = > "public class Test {\n" + > " void bar() {\n" + >@@ -8959,23 +10126,38 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:entry.>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = ""; >- expectedReplacedSource = "entry."; >- expectedUnitDisplayString = >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=100302 >+ */ >+public void test0203_Method(){ >+ String str = > "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + > " void bar() {\n" + >- " Entry entry;\n" + >- " {\n" + >- " <CompleteOnName:entry.>;\n" + >+ " for (Entry entry : (ZZZ<YYY>.Set<Entry>) var) {\n" + >+ " entry.\n" + > " }\n" + > " }\n" + > "}\n"; > >+ String completeBehind = "entry."; >+ int cursorLocation = str.indexOf("entry.") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:entry.>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = ""; >+ String expectedReplacedSource = "entry."; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " Entry entry;\n" + >+ " {\n" + >+ " <CompleteOnName:entry.>;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -8989,7 +10171,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=103148 > */ >-public void test0204(){ >+public void test0204_Diet(){ > String str = > "public class Test {\n"+ > " public enum MyEnum { A };\n"+ >@@ -9029,27 +10211,42 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "public class Test {\n" + >- " public enum MyEnum {\n" + >- " A(),\n" + >- " <clinit>() {\n" + >- " }\n" + >- " public MyEnum() {\n" + >- " }\n" + >- " }\n" + >- " public Test() {\n" + >- " }\n" + >- " public static void foo() {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=103148 >+ */ >+public void test0204_Method(){ >+ String str = >+ "public class Test {\n"+ >+ " public enum MyEnum { A };\n"+ >+ " public static void foo() {\n"+ >+ " EnumSet.<MyEnum>of(MyEnum.A);\n"+ >+ " zzz\n"+ >+ " }\n"+ > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public enum MyEnum {\n" + >+ " A(),\n" + >+ " <clinit>() {\n" + >+ " }\n" + >+ " public MyEnum() {\n" + >+ " }\n" + >+ " }\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " public static void foo() {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -9094,7 +10291,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=106450 > */ >-public void test0206(){ >+public void test0206_Diet(){ > String str = > "public class Test {\n"+ > " void foo() {\n"+ >@@ -9125,20 +10322,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnMessageSendName:Collections.<B>zzz()>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnMessageSendName:Collections.<B>zzz()>;\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=106450 >+ */ >+public void test0206_Method(){ >+ String str = >+ "public class Test {\n"+ >+ " void foo() {\n"+ >+ " Collections.<B>zzz\n"+ >+ " }\n"+ > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnMessageSendName:Collections.<B>zzz()>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnMessageSendName:Collections.<B>zzz()>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -9152,7 +10362,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=106450 > */ >-public void test0207(){ >+public void test0207_Diet(){ > String str = > "public class Test {\n"+ > " void foo() {\n"+ >@@ -9183,20 +10393,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnMessageSendName:bar().<B>zzz()>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnMessageSendName:bar().<B>zzz()>;\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=106450 >+ */ >+public void test0207_Method(){ >+ String str = >+ "public class Test {\n"+ >+ " void foo() {\n"+ >+ " bar().<B>zzz\n"+ >+ " }\n"+ > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnMessageSendName:bar().<B>zzz()>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnMessageSendName:bar().<B>zzz()>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -9210,7 +10433,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=106450 > */ >-public void test0208(){ >+public void test0208_Diet(){ > String str = > "public class Test {\n"+ > " void foo() {\n"+ >@@ -9241,20 +10464,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnName:zzz>;\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=106450 >+ */ >+public void test0208_Method(){ >+ String str = >+ "public class Test {\n"+ >+ " void foo() {\n"+ >+ " int.<B>zzz\n"+ >+ " }\n"+ > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:zzz>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnName:zzz>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -9268,7 +10504,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=106450 > */ >-public void test0209(){ >+public void test0209_Diet(){ > String str = > "public class Test {\n"+ > " void foo() {\n"+ >@@ -9299,20 +10535,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnMessageSendName:this.<B>zzz()>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnMessageSendName:this.<B>zzz()>;\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=106450 >+ */ >+public void test0209_Method(){ >+ String str = >+ "public class Test {\n"+ >+ " void foo() {\n"+ >+ " this.<B>zzz\n"+ >+ " }\n"+ > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnMessageSendName:this.<B>zzz()>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnMessageSendName:this.<B>zzz()>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -9326,7 +10575,7 @@ > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=106450 > */ >-public void test0210(){ >+public void test0210_Diet(){ > String str = > "public class Test {\n"+ > " void foo() {\n"+ >@@ -9357,20 +10606,33 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnMessageSendName:super.<B>zzz()>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "zzz"; >- expectedReplacedSource = "zzz"; >- expectedUnitDisplayString = >- "public class Test {\n" + >- " public Test() {\n" + >- " }\n" + >- " void foo() {\n" + >- " <CompleteOnMessageSendName:super.<B>zzz()>;\n" + >- " }\n" + >+} >+/* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=106450 >+ */ >+public void test0210_Method(){ >+ String str = >+ "public class Test {\n"+ >+ " void foo() {\n"+ >+ " super.<B>zzz\n"+ >+ " }\n"+ > "}\n"; > >+ String completeBehind = "zzz"; >+ int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnMessageSendName:super.<B>zzz()>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "zzz"; >+ String expectedReplacedSource = "zzz"; >+ String expectedUnitDisplayString = >+ "public class Test {\n" + >+ " public Test() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " <CompleteOnMessageSendName:super.<B>zzz()>;\n" + >+ " }\n" + >+ "}\n"; >+ > checkMethodParse( > str.toCharArray(), > cursorLocation, >@@ -9441,7 +10703,7 @@ > "diet ast"); > } > //https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 >-public void test0213() { >+public void test0213_Diet() { > > String str = > "public class X {\n" + >@@ -9480,34 +10742,53 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnException:Top<Object>.IZZ>"; >- expectedParentNodeToString = >- "try \n" + >- " {\n" + >- " throwing();\n" + >- " }\n" + >- "catch (IllegalAccessException e) {\n" + >- " }\n" + >- "catch (<CompleteOnException:Top<Object>.IZZ> ) {\n" + >- " }"; >- completionIdentifier = "IZZ"; >- expectedReplacedSource = "Top<Object>.IZZ"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " public boolean foo() {\n" + >- " try \n" + >- " {\n" + >- " throwing();\n" + >- " }\n" + >- " catch (IllegalAccessException e) {\n" + >- " }\n" + >- " catch (<CompleteOnException:Top<Object>.IZZ> ) {\n" + >- " }\n" + >- " }\n" + >- "}\n"; >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584 >+public void test0213_Method() { >+ >+ String str = >+ "public class X {\n" + >+ " public boolean foo() {\n" + >+ " try {\n" + >+ " throwing();\n" + >+ " }\n" + >+ " catch (IllegalAccessException e) {\n" + >+ " bar();\n" + >+ " }\n" + >+ " catch (Top<Object>.IZZ) {\n" + >+ " }\n" + >+ " }" + >+ "}\n"; >+ >+ String completeBehind = "IZZ"; >+ int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnException:Top<Object>.IZZ>"; >+ String expectedParentNodeToString = >+ "try \n" + >+ " {\n" + >+ " throwing();\n" + >+ " }\n" + >+ "catch (IllegalAccessException e) {\n" + >+ " }\n" + >+ "catch (<CompleteOnException:Top<Object>.IZZ> ) {\n" + >+ " }"; >+ String completionIdentifier = "IZZ"; >+ String expectedReplacedSource = "Top<Object>.IZZ"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public boolean foo() {\n" + >+ " try \n" + >+ " {\n" + >+ " throwing();\n" + >+ " }\n" + >+ " catch (IllegalAccessException e) {\n" + >+ " }\n" + >+ " catch (<CompleteOnException:Top<Object>.IZZ> ) {\n" + >+ " }\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >Index: src/org/eclipse/jdt/core/tests/compiler/parser/AbstractCompletionTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/AbstractCompletionTest.java,v >retrieving revision 1.19 >diff -u -r1.19 AbstractCompletionTest.java >--- src/org/eclipse/jdt/core/tests/compiler/parser/AbstractCompletionTest.java 10 May 2006 18:07:26 -0000 1.19 >+++ src/org/eclipse/jdt/core/tests/compiler/parser/AbstractCompletionTest.java 28 Mar 2007 08:17:37 -0000 >@@ -34,6 +34,7 @@ > public abstract class AbstractCompletionTest extends AbstractCompilerTest { > > public final static String NONE = "<NONE>"; >+ public final static String NULL = "null"; > public AbstractCompletionTest(String testName){ > super(testName); > } >@@ -84,76 +85,15 @@ > > CompilationUnitDeclaration unit = parser.dietParse(sourceUnit, compilationResult, cursorLocation); > >- String computedCompletion = parser.assistNode == null >- ? NONE >- : parser.assistNode.toString(); >- String computedParentCompletion = parser.assistNodeParent == null >- ? NONE >- : parser.assistNodeParent.toString(); >- String computedUnitToString = unit.toString(); >- //System.out.println(computedUnitToString); >- //System.out.println(Util.displayString(computedUnitToString)); >- //System.out.println(expectedUnitToString); >- >- if (!expectedCompletion.equals(computedCompletion)) { >- System.out.println(Util.displayString(computedCompletion)); >- } >- assertEquals( >- "invalid completion node-" + testName, >- expectedCompletion, >- computedCompletion); >- >- if(expectedParentCompletion != null) { >- if (!expectedParentCompletion.equals(computedParentCompletion)) { >- System.out.println(Util.displayString(computedParentCompletion)); >- } >- assertEquals( >- "invalid completion parent node-" + testName, >- expectedParentCompletion, >- computedParentCompletion); >- } >- >- if (!expectedUnitToString.equals(computedUnitToString)) { >- System.out.println(Util.displayString(computedUnitToString)); >- } >- assertEquals( >- "invalid completion tree-" + testName, >- expectedUnitToString, >- computedUnitToString); >- >- if (expectedCompletionIdentifier != null){ >- char[] chars = ((CompletionScanner)parser.scanner).completionIdentifier; >- String computedCompletionIdentifier = chars == null ? NONE : new String(chars); >- assertEquals( >- "invalid completion identifier-" + testName, >+ checkParse( >+ expectedCompletion, >+ expectedParentCompletion, >+ expectedUnitToString, > expectedCompletionIdentifier, >- computedCompletionIdentifier); >- } >- >- if (expectedReplacedSource != null){ >- char[] chars = null; >- if (parser.assistNode != null){ >- chars = CharOperation.subarray( >- parser.scanner.source, >- parser.assistNode.sourceStart, >- parser.assistNode.sourceEnd + 1); >- } else { >- if (parser.assistIdentifier() != null){ >- if (((CompletionScanner)parser.scanner).completedIdentifierEnd >- >= ((CompletionScanner)parser.scanner).completedIdentifierStart){ >- chars = CharOperation.subarray( >- parser.scanner.source, >- ((CompletionScanner)parser.scanner).completedIdentifierStart, >- ((CompletionScanner)parser.scanner).completedIdentifierEnd + 1); >- } >- } >- } >- String computedReplacedSource = chars == null ? NONE : new String(chars); >- assertEquals( >- "invalid replaced source-" + testName, > expectedReplacedSource, >- computedReplacedSource); >- } >+ testName, >+ parser, >+ unit); > } > /* > * Parse a method with completionNode check >@@ -193,111 +133,36 @@ > } > } > } >- assertTrue("no method found at cursor location", foundMethod != null); >- if (foundMethod instanceof AbstractMethodDeclaration) { >- parser.parseBlockStatements((AbstractMethodDeclaration)foundMethod, unit); >- } else { >- TypeDeclaration type = (TypeDeclaration)foundMethod; >- if (type.fields != null) { >- for (int i = 0; i < type.fields.length; i++) { >- FieldDeclaration field = type.fields[i]; >- if (field.declarationSourceStart <= cursorLocation && (cursorLocation <= field.declarationSourceEnd || field.declarationSourceEnd == 0)) { >- if (field instanceof Initializer) { >- parser.parseBlockStatements((Initializer)field, type, unit); >- break; >+ >+ if (foundMethod != null) { >+ if (foundMethod instanceof AbstractMethodDeclaration) { >+ parser.parseBlockStatements((AbstractMethodDeclaration)foundMethod, unit); >+ } else { >+ TypeDeclaration type = (TypeDeclaration)foundMethod; >+ if (type.fields != null) { >+ done : for (int i = 0; i < type.fields.length; i++) { >+ FieldDeclaration field = type.fields[i]; >+ if (field.declarationSourceStart <= cursorLocation && (cursorLocation <= field.declarationSourceEnd || field.declarationSourceEnd == 0)) { >+ if (field instanceof Initializer) { >+ parser.parseBlockStatements((Initializer)field, type, unit); >+ break; >+ } >+ break done; // field initializer > } >- assertTrue("TBD", false); // field initializer > } > } > } > } > >- String computedCompletion = parser.assistNode == null >- ? NONE >- : parser.assistNode.toString(); >- String computedParentCompletion = parser.assistNodeParent == null >- ? NONE >- : parser.assistNodeParent.toString(); >- String computedUnitToString = unit.toString(); >- >- if (!expectedCompletion.equals(computedCompletion)) { >- System.out.println(Util.displayString(computedCompletion)); >- } >- assertEquals( >- "invalid completion node-" + testName, >- expectedCompletion, >- computedCompletion); >- >- if(expectedParentCompletion != null) { >- if (!expectedParentCompletion.equals(computedParentCompletion)) { >- System.out.println(Util.displayString(computedParentCompletion)); >- } >- assertEquals( >- "invalid completion parent node-" + testName, >- expectedParentCompletion, >- computedParentCompletion); >- } >- >- if (!expectedUnitToString.equals(computedUnitToString)) { >- System.out.println(Util.displayString(computedUnitToString)); >- } >- assertEquals( >- "invalid completion location-"+testName, >- expectedUnitToString, >- computedUnitToString); >- >- if (expectedCompletionIdentifier != null){ >- char[] chars = ((CompletionScanner)parser.scanner).completionIdentifier; >- String computedCompletionIdentifier = chars == null ? NONE : new String(chars); >- if (!expectedCompletionIdentifier.equals(computedCompletionIdentifier)) { >- System.out.println(Util.displayString(computedCompletionIdentifier)); >- } >- assertEquals( >- "invalid completion identifier-" + testName, >+ checkParse( >+ expectedCompletion, >+ expectedParentCompletion, >+ expectedUnitToString, > expectedCompletionIdentifier, >- computedCompletionIdentifier); >- } >- if (expectedReplacedSource != null){ >- char[] chars = null; >- if (parser.assistNode != null){ >- chars = CharOperation.subarray( >- parser.scanner.source, >- parser.assistNode.sourceStart, >- parser.assistNode.sourceEnd + 1); >- } else { >- if (parser.assistIdentifier() != null){ >- if (((CompletionScanner)parser.scanner).completedIdentifierEnd >- >= ((CompletionScanner)parser.scanner).completedIdentifierStart){ >- chars = CharOperation.subarray( >- parser.scanner.source, >- ((CompletionScanner)parser.scanner).completedIdentifierStart, >- ((CompletionScanner)parser.scanner).completedIdentifierEnd + 1); >- } >- } >- } >- String computedReplacedSource = chars == null ? NONE : new String(chars); >- if (!expectedReplacedSource.equals(computedReplacedSource)) { >- System.out.println(Util.displayString(computedReplacedSource)); >- } >- assertEquals( >- "invalid replaced source-" + testName, > expectedReplacedSource, >- computedReplacedSource); >- if (expectedReplacedSource.length() == 0) { >- assertEquals( >- "invalid insertion point-" + testName, >- cursorLocation + 1, >- parser.assistNode.sourceStart); >- } >- } >- if (expectedLabels != null) { >-// int length = (parser.labels == null) ? 0 : parser.labels.length; >-// assertEquals("invalid number of labels-" + testName, expectedLabels.length, length); >-// for (int i = 0; i < length; i++) { >-// String label = new String(parser.labels[i]); >-// assertEquals("invalid label-" + testName, expectedLabels[i], label); >-// } >- } >+ testName, >+ parser, >+ unit); > } > /* > * Parse a method with completionNode check >@@ -370,6 +235,105 @@ > expectedLabels, > testName); > } >+private void checkParse( >+ String expectedCompletion, >+ String expectedParentCompletion, >+ String expectedUnitToString, >+ String expectedCompletionIdentifier, >+ String expectedReplacedSource, >+ String testName, >+ CompletionParser parser, >+ CompilationUnitDeclaration unit) { >+ String computedCompletion = parser.assistNode == null >+ ? NONE >+ : parser.assistNode.toString(); >+ >+ String computedParentCompletion = NULL; >+ if (expectedParentCompletion != null) { >+ computedParentCompletion = parser.assistNodeParent == null >+ ? NONE >+ : parser.assistNodeParent.toString(); >+ } >+ >+ String computedUnitToString = unit.toString(); >+ //System.out.println(computedUnitToString); >+ //System.out.println(Util.displayString(computedUnitToString)); >+ //System.out.println(expectedUnitToString); >+ >+ if (!expectedCompletion.equals(computedCompletion)) { >+ System.out.println(Util.displayString(computedCompletion)); >+ } >+ >+ if(expectedParentCompletion != null) { >+ if (!expectedParentCompletion.equals(computedParentCompletion)) { >+ System.out.println(Util.displayString(computedParentCompletion)); >+ } >+ } >+ >+ if (!expectedUnitToString.equals(computedUnitToString)) { >+ System.out.println(Util.displayString(computedUnitToString)); >+ } >+ >+ String computedCompletionIdentifier = NULL; >+ if (expectedCompletionIdentifier != null){ >+ char[] chars = ((CompletionScanner)parser.scanner).completionIdentifier; >+ computedCompletionIdentifier = chars == null ? NONE : new String(chars); >+ } >+ >+ String computedReplacedSource = NULL; >+ if (expectedReplacedSource != null){ >+ char[] chars = null; >+ if (parser.assistNode != null){ >+ chars = CharOperation.subarray( >+ parser.scanner.source, >+ parser.assistNode.sourceStart, >+ parser.assistNode.sourceEnd + 1); >+ } else { >+ if (parser.assistIdentifier() != null){ >+ if (((CompletionScanner)parser.scanner).completedIdentifierEnd >+ >= ((CompletionScanner)parser.scanner).completedIdentifierStart){ >+ chars = CharOperation.subarray( >+ parser.scanner.source, >+ ((CompletionScanner)parser.scanner).completedIdentifierStart, >+ ((CompletionScanner)parser.scanner).completedIdentifierEnd + 1); >+ } >+ } >+ } >+ computedReplacedSource = chars == null ? NONE : new String(chars); >+ } >+ assertEquals( >+ testName, >+ concatResults( >+ expectedCompletion, >+ expectedParentCompletion, >+ expectedUnitToString, >+ expectedCompletionIdentifier, >+ expectedReplacedSource), >+ concatResults(computedCompletion, >+ computedParentCompletion, >+ computedUnitToString, >+ computedCompletionIdentifier, >+ computedReplacedSource)); >+} >+private String concatResults( >+ String completionNode, >+ String parentCompletionNode, >+ String unitToString, >+ String completionIdentifier, >+ String replacedSource) { >+ StringBuffer buffer = new StringBuffer(); >+ buffer.append("### Completion node ###\n"); >+ buffer.append(completionNode); >+ buffer.append("\n### Parent completion node ###\n"); >+ buffer.append(parentCompletionNode); >+ buffer.append("\n### Completed identifier ###\n"); >+ buffer.append(completionIdentifier); >+ buffer.append("\n### Replaced source ###\n"); >+ buffer.append(replacedSource); >+ buffer.append("\n### Completed unit ###\n"); >+ buffer.append(unitToString); >+ return buffer.toString(); >+} > /* > * Returns the method, the constructor or the type declaring the initializer > * at the cursor location in the given type. >Index: src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationCompletionParserTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationCompletionParserTest.java,v >retrieving revision 1.15 >diff -u -r1.15 AnnotationCompletionParserTest.java >--- src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationCompletionParserTest.java 16 Mar 2007 18:31:23 -0000 1.15 >+++ src/org/eclipse/jdt/core/tests/compiler/parser/AnnotationCompletionParserTest.java 28 Mar 2007 08:17:38 -0000 >@@ -387,7 +387,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0013(){ >+public void test0013_Diet(){ > String str = > "public class X {\n" + > " public void foo() {\n" + >@@ -420,19 +420,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "@<CompleteOnType:MyAnn>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "MyAnn"; >- expectedReplacedSource = "MyAnn"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " public void foo() {\n" + >- " @<CompleteOnType:MyAnn>\n" + >- " }\n" + >- "}\n"; >+} >+public void test0013_Method(){ >+ String str = >+ "public class X {\n" + >+ " public void foo() {\n" + >+ " @MyAnn class Y {\n" + >+ " }\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "MyAnn"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "@<CompleteOnType:MyAnn>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "MyAnn"; >+ String expectedReplacedSource = "MyAnn"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public void foo() {\n" + >+ " @<CompleteOnType:MyAnn>\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -729,7 +741,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0024(){ >+public void test0024_Diet(){ > String str = > "public class X {\n" + > " void foo() {@MyAnn int i}\n" + >@@ -759,19 +771,28 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "@<CompleteOnType:MyAnn>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "MyAnn"; >- expectedReplacedSource = "MyAnn"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void foo() {\n" + >- " @<CompleteOnType:MyAnn>\n" + >- " }\n" + >- "}\n"; >+} >+public void test0024_Method(){ >+ String str = >+ "public class X {\n" + >+ " void foo() {@MyAnn int i}\n" + >+ "}"; >+ >+ >+ String completeBehind = "MyAnn"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "@<CompleteOnType:MyAnn>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "MyAnn"; >+ String expectedReplacedSource = "MyAnn"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void foo() {\n" + >+ " @<CompleteOnType:MyAnn>\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -879,7 +900,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0028(){ >+public void test0028_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -912,19 +933,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0028_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(foo)\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -936,7 +969,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0029(){ >+public void test0029_Diet(){ > String str = > "public class X {\n" + > " void bar(int var1, @Annot(foo) int var2) {\n" + >@@ -967,19 +1000,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar(int var1) {\n" + >- " @Annot(<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0029_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar(int var1, @Annot(foo) int var2) {\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar(int var1) {\n" + >+ " @Annot(<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1119,7 +1162,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0034(){ >+public void test0034_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -1152,19 +1195,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0034_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(foo\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1176,7 +1231,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0035(){ >+public void test0035_Diet(){ > String str = > "public class X {\n" + > " void bar(int var1, @Annot(foo int var2) {\n" + >@@ -1207,19 +1262,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar(int var1) {\n" + >- " @Annot(<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0035_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar(int var1, @Annot(foo int var2) {\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar(int var1) {\n" + >+ " @Annot(<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1359,7 +1424,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0040(){ >+public void test0040_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -1392,19 +1457,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0040_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(foo=zzz)\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1416,7 +1493,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0041(){ >+public void test0041_Diet(){ > String str = > "public class X {\n" + > " void bar(int var1, @Annot(foo=zzz) int var2) {\n" + >@@ -1447,19 +1524,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar(int var1) {\n" + >- " @Annot(<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0041_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar(int var1, @Annot(foo=zzz) int var2) {\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar(int var1) {\n" + >+ " @Annot(<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1599,7 +1686,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0046(){ >+public void test0046_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -1632,19 +1719,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0046_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(foo=zzz\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1656,7 +1755,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0047(){ >+public void test0047_Diet(){ > String str = > "public class X {\n" + > " void bar(int var1, @Annot(foo=zzz int var2) {\n" + >@@ -1687,19 +1786,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar(int var1) {\n" + >- " @Annot(<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0047_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar(int var1, @Annot(foo=zzz int var2) {\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar(int var1) {\n" + >+ " @Annot(<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1841,7 +1950,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0052(){ >+public void test0052_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -1874,19 +1983,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0052_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(yyy=zzz,foo)\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -1898,7 +2019,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0053(){ >+public void test0053_Diet(){ > String str = > "public class X {\n" + > " void bar(int var1, @Annot(yyy=zzz,foo) int var2) {\n" + >@@ -1929,22 +2050,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar(int var1) {\n" + >- " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0053_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar(int var1, @Annot(yyy=zzz,foo) int var2) {\n" + >+ " }\n" + >+ "}"; > >- checkMethodParse( >- str.toCharArray(), >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar(int var1) {\n" + >+ " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; >+ >+ checkMethodParse( >+ str.toCharArray(), > cursorLocation, > expectedCompletionNodeToString, > expectedParentNodeToString, >@@ -2081,7 +2212,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0058(){ >+public void test0058_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -2114,19 +2245,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0058_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(yyy=zzz,foo\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2138,7 +2281,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0059(){ >+public void test0059_Diet(){ > String str = > "public class X {\n" + > " void bar(int var1, @Annot(yyy=zzz,foo int var2) {\n" + >@@ -2169,19 +2312,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar(int var1) {\n" + >- " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0059_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar(int var1, @Annot(yyy=zzz,foo int var2) {\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar(int var1) {\n" + >+ " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2321,7 +2474,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0064(){ >+public void test0064_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -2354,19 +2507,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0064_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(yyy=zzz,foo=zzz)\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2378,7 +2543,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0065(){ >+public void test0065_Diet(){ > String str = > "public class X {\n" + > " void bar(int var1, @Annot(yyy=zzz,foo=zzz) int var2) {\n" + >@@ -2409,19 +2574,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar(int var1) {\n" + >- " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0065_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar(int var1, @Annot(yyy=zzz,foo=zzz) int var2) {\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar(int var1) {\n" + >+ " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2561,7 +2736,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0070(){ >+public void test0070_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -2594,19 +2769,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0070_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(yyy=zzz,foo=zzz\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -2618,7 +2805,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0071(){ >+public void test0071_Diet(){ > String str = > "public class X {\n" + > " void bar(int var1, @Annot(yyy=zzz,foo=zzz int var2) {\n" + >@@ -2649,19 +2836,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >- expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar(int var1) {\n" + >- " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0071_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar(int var1, @Annot(yyy=zzz,foo=zzz int var2) {\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnAttributeName:foo>"; >+ String expectedParentNodeToString = "@Annot(yyy = zzz,<CompleteOnAttributeName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar(int var1) {\n" + >+ " @Annot(yyy = zzz,<CompleteOnAttributeName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3682,7 +3879,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0105(){ >+public void test0105_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -3715,19 +3912,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:foo>"; >- expectedParentNodeToString = "zzz = <CompleteOnName:foo>"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(zzz = <CompleteOnName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0105_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(zzz=foo)\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:foo>"; >+ String expectedParentNodeToString = "zzz = <CompleteOnName:foo>"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(zzz = <CompleteOnName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3739,7 +3948,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0106(){ >+public void test0106_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -3772,19 +3981,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:foo>"; >- expectedParentNodeToString = "(a && <CompleteOnName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(zzz = (a && <CompleteOnName:foo>))\n" + >- " }\n" + >- "}\n"; >+} >+public void test0106_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(zzz= a && foo)\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:foo>"; >+ String expectedParentNodeToString = "(a && <CompleteOnName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(zzz = (a && <CompleteOnName:foo>))\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3796,7 +4017,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0107(){ >+public void test0107_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -3829,19 +4050,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:foo>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(zzz = <CompleteOnName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0107_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(zzz= {foo})\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:foo>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(zzz = <CompleteOnName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3853,7 +4086,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0108(){ >+public void test0108_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -3886,19 +4119,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:foo>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(zzz = <CompleteOnName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0108_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(zzz= {yyy, foo})\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:foo>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(zzz = <CompleteOnName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3910,7 +4155,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0109(){ >+public void test0109_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -3943,19 +4188,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:foo>"; >- expectedParentNodeToString = "zzz = <CompleteOnName:foo>"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(zzz = <CompleteOnName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0109_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(zzz=foo\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:foo>"; >+ String expectedParentNodeToString = "zzz = <CompleteOnName:foo>"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(zzz = <CompleteOnName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -3967,7 +4224,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0110(){ >+public void test0110_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -4000,20 +4257,32 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:foo>"; >- expectedParentNodeToString = "(a && <CompleteOnName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " int var;\n" + >- " @Annot(zzz = (a && <CompleteOnName:foo>))\n" + >- " }\n" + >- "}\n"; >+} >+public void test0110_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " int var;\n" + >+ " @Annot(zzz= a && foo\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:foo>"; >+ String expectedParentNodeToString = "(a && <CompleteOnName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " int var;\n" + >+ " @Annot(zzz = (a && <CompleteOnName:foo>))\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4025,7 +4294,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0111(){ >+public void test0111_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -4058,19 +4327,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:foo>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(zzz = <CompleteOnName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0111_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(zzz= {yyy, foo}\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:foo>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(zzz = <CompleteOnName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4082,7 +4363,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0112(){ >+public void test0112_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -4115,19 +4396,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:foo>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(zzz = <CompleteOnName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0112_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(zzz= {yyy, foo\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:foo>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(zzz = <CompleteOnName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4139,7 +4432,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0113(){ >+public void test0113_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -4172,19 +4465,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:foo>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(zzz = <CompleteOnName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0113_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(zzz= a && (b || (foo && c)))\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:foo>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(zzz = <CompleteOnName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4196,7 +4501,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0114(){ >+public void test0114_Diet(){ > String str = > "public class X {\n" + > " void bar() {\n" + >@@ -4229,19 +4534,31 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:foo>"; >- expectedParentNodeToString = "<NONE>"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(zzz = <CompleteOnName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0114_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar() {\n" + >+ " @Annot(zzz= a && (b || (foo\n" + >+ " int var;\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:foo>"; >+ String expectedParentNodeToString = "<NONE>"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(zzz = <CompleteOnName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4381,7 +4698,7 @@ > expectedReplacedSource, > "diet ast"); > } >-public void test0119(){ >+public void test0119_Diet(){ > String str = > "public class X {\n" + > " void bar(@Annot(zzz=foo int var) {\n" + >@@ -4412,19 +4729,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:foo>"; >- expectedParentNodeToString = "zzz = <CompleteOnName:foo>"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(zzz = <CompleteOnName:foo>)\n" + >- " }\n" + >- "}\n"; >+} >+public void test0119_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar(@Annot(zzz=foo int var) {\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:foo>"; >+ String expectedParentNodeToString = "zzz = <CompleteOnName:foo>"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(zzz = <CompleteOnName:foo>)\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(), >@@ -4436,7 +4763,7 @@ > expectedReplacedSource, > "full ast"); > } >-public void test0120(){ >+public void test0120_Diet(){ > String str = > "public class X {\n" + > " void bar(@Annot(zzz= a && foo int var) {\n" + >@@ -4467,19 +4794,29 @@ > completionIdentifier, > expectedReplacedSource, > "diet ast"); >- >- expectedCompletionNodeToString = "<CompleteOnName:foo>"; >- expectedParentNodeToString = "(a && <CompleteOnName:foo>)"; >- completionIdentifier = "foo"; >- expectedReplacedSource = "foo"; >- expectedUnitDisplayString = >- "public class X {\n" + >- " public X() {\n" + >- " }\n" + >- " void bar() {\n" + >- " @Annot(zzz = (a && <CompleteOnName:foo>))\n" + >- " }\n" + >- "}\n"; >+} >+public void test0120_Method(){ >+ String str = >+ "public class X {\n" + >+ " void bar(@Annot(zzz= a && foo int var) {\n" + >+ " }\n" + >+ "}"; >+ >+ >+ String completeBehind = "foo"; >+ int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1; >+ String expectedCompletionNodeToString = "<CompleteOnName:foo>"; >+ String expectedParentNodeToString = "(a && <CompleteOnName:foo>)"; >+ String completionIdentifier = "foo"; >+ String expectedReplacedSource = "foo"; >+ String expectedUnitDisplayString = >+ "public class X {\n" + >+ " public X() {\n" + >+ " }\n" + >+ " void bar() {\n" + >+ " @Annot(zzz = (a && <CompleteOnName:foo>))\n" + >+ " }\n" + >+ "}\n"; > > checkMethodParse( > str.toCharArray(),
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 179672
: 62191