KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > java > editor > completion > JavaCompletionProviderBasicTest


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.java.editor.completion;
21
22 /**
23  *
24  * @author Dusan Balek
25  */

26 public class JavaCompletionProviderBasicTest extends CompletionTestBase {
27
28     public JavaCompletionProviderBasicTest(String JavaDoc testName) {
29         super(testName);
30     }
31
32     // file beginning tests ----------------------------------------------------
33

34     public void testEmptyFile() throws Exception JavaDoc {
35         performTest("Empty", 0, null, "topLevelKeywords.pass");
36     }
37
38     public void testFileBeginning() throws Exception JavaDoc {
39         performTest("Simple", 0, null, "topLevelKeywords.pass");
40     }
41     
42     // package declaration tests -----------------------------------------------
43

44     public void testEmptyFileTypingPackageKeyword() throws Exception JavaDoc {
45         performTest("Empty", 0, "p", "topLevelKeywordsStartingWithP.pass");
46     }
47     
48     public void testTypingPackageKeyword() throws Exception JavaDoc {
49         performTest("SimpleNoPackage", 0, "p", "topLevelKeywordsStartingWithP.pass");
50     }
51     
52     public void testOnPackageKeyword() throws Exception JavaDoc {
53         performTest("Simple", 1, null, "topLevelKeywordsStartingWithP.pass");
54     }
55     
56     public void testEmptyFileAfterTypingPackageKeyword() throws Exception JavaDoc {
57         performTest("Empty", 0, "package", "packageKeyword.pass");
58     }
59     
60     public void testAfterTypingPackageKeyword() throws Exception JavaDoc {
61         performTest("SimpleNoPackage", 0, "package", "packageKeyword.pass");
62     }
63     
64     public void testAfterPackageKeyword() throws Exception JavaDoc {
65         performTest("Simple", 7, null, "packageKeyword.pass");
66     }
67     
68     public void testEmptyFileBeforeTypingPackageId() throws Exception JavaDoc {
69         performTest("Empty", 0, "package ", "allPackages.pass");
70     }
71     
72     public void testBeforeTypingPackageId() throws Exception JavaDoc {
73         performTest("SimpleNoPackage", 0, "package ", "allPackages.pass");
74     }
75     
76     public void testBeforePackageId() throws Exception JavaDoc {
77         performTest("Simple", 8, null, "allPackages.pass");
78     }
79     
80     public void testEmptyFileTypingPackageId() throws Exception JavaDoc {
81         performTest("Empty", 0, "package t", "empty.pass");
82     }
83     
84     public void testTypingPackageId() throws Exception JavaDoc {
85         performTest("SimpleNoPackage", 0, "package t", "empty.pass");
86     }
87     
88     public void testOnPackageId() throws Exception JavaDoc {
89         performTest("Simple", 9, null, "empty.pass");
90     }
91     
92     public void testEmptyFileAfterTypingPackageId() throws Exception JavaDoc {
93         performTest("Empty", 0, "package test", "empty.pass");
94     }
95     
96     public void testAfterTypingPackageId() throws Exception JavaDoc {
97         performTest("SimpleNoPackage", 0, "package test", "empty.pass");
98     }
99     
100     public void testAfterPackageId() throws Exception JavaDoc {
101         performTest("Simple", 12, null, "empty.pass");
102     }
103     
104     public void testEmptyFileAfterTypingPackageIdAndSpace() throws Exception JavaDoc {
105         performTest("Empty", 0, "package test ", "empty.pass");
106     }
107     
108     public void testAfterTypingPackageIdAndSpace() throws Exception JavaDoc {
109         performTest("SimpleNoPackage", 0, "package test ", "empty.pass");
110     }
111     
112     public void testAfterPackageIdAndSpace() throws Exception JavaDoc {
113         performTest("Simple", 12, " ", "empty.pass");
114     }
115     
116     public void testEmptyFileAfterTypingPackageDecl() throws Exception JavaDoc {
117         performTest("Empty", 0, "package test;", "topLevelKeywordsWithoutPackage.pass");
118     }
119     
120     public void testAfterTypingPackageDecl() throws Exception JavaDoc {
121         performTest("SimpleNoPackage", 0, "package test;", "topLevelKeywordsWithoutPackage.pass");
122     }
123     
124     public void testAfterPackageDecl() throws Exception JavaDoc {
125         performTest("Simple", 13, null, "topLevelKeywordsWithoutPackage.pass");
126     }
127     
128     // import declaration tests ------------------------------------------------
129

130     public void testEmptyFileAfterTypingImportKeyword() throws Exception JavaDoc {
131         performTest("Empty", 0, "import", "importKeyword.pass");
132     }
133     
134     public void testAfterTypingImportKeyword() throws Exception JavaDoc {
135         performTest("Simple", 14, "import", "importKeyword.pass");
136     }
137     
138     public void testAfterImportKeyword() throws Exception JavaDoc {
139         performTest("Import", 21, null, "importKeyword.pass");
140     }
141     
142     public void testEmptyFileBeforeTypingImportedPackage() throws Exception JavaDoc {
143         performTest("Empty", 0, "import ", "staticKeywordAndAllPackages.pass");
144     }
145     
146     public void testBeforeTypingImportedPackage() throws Exception JavaDoc {
147         performTest("Simple", 14, "import ", "staticKeywordAndAllPackages.pass");
148     }
149     
150     public void testBeforeImportedPackage() throws Exception JavaDoc {
151         performTest("Import", 22, null, "staticKeywordAndAllPackages.pass");
152     }
153     
154     public void testEmptyFileTypingImportedPackage() throws Exception JavaDoc {
155         performTest("Empty", 0, "import j", "packagesStartingWithJ.pass");
156     }
157     
158     public void testTypingImportedPackage() throws Exception JavaDoc {
159         performTest("Simple", 14, "import j", "packagesStartingWithJ.pass");
160     }
161     
162     public void testOnImportedPackage() throws Exception JavaDoc {
163         performTest("Import", 23, null, "packagesStartingWithJ.pass");
164     }
165     
166     public void testEmptyFileTypingImportedPackageBeforeStar() throws Exception JavaDoc {
167         performTest("Empty", 0, "import java.util.", "javaUtilContent.pass");
168     }
169     
170     public void testTypingImportedPackageBeforeStar() throws Exception JavaDoc {
171         performTest("Simple", 14, "import java.util.", "javaUtilContent.pass");
172     }
173     
174     public void testOnImportedPackageBeforeStar() throws Exception JavaDoc {
175         performTest("Import", 54, null, "javaUtilContent.pass");
176     }
177     
178     public void testEmptyFileAfterTypingImportedPackage() throws Exception JavaDoc {
179         performTest("Empty", 0, "import java.util.*", "empty.pass");
180     }
181     
182     public void testAfterTypingImportedPackage() throws Exception JavaDoc {
183         performTest("Simple", 14, "import java.util.*", "empty.pass");
184     }
185     
186     public void testAfterImportedPackage() throws Exception JavaDoc {
187         performTest("Import", 55, null, "empty.pass");
188     }
189     
190     public void testEmptyFileAfterTypingImportedClass() throws Exception JavaDoc {
191         performTest("Empty", 0, "import java.awt.List", "list.pass");
192     }
193     
194     public void testAfterTypingImportedClass() throws Exception JavaDoc {
195         performTest("Simple", 14, "import java.awt.List", "list.pass");
196     }
197     
198     public void testAfterImportedClass() throws Exception JavaDoc {
199         performTest("Import", 35, null, "list.pass");
200     }
201     
202     public void testEmptyFileAfterTypingImportedClassAndSpace() throws Exception JavaDoc {
203         performTest("Empty", 0, "import java.awt.List ", "empty.pass");
204     }
205     
206     public void testAfterTypingImportedClassAndSpace() throws Exception JavaDoc {
207         performTest("Simple", 14, "import java.awt.List ", "empty.pass");
208     }
209     
210     public void testAfterImportedClassAndSpace() throws Exception JavaDoc {
211         performTest("Import", 35, " ", "empty.pass");
212     }
213     
214     public void testEmptyFileAfterTypingImportStatement() throws Exception JavaDoc {
215         performTest("Empty", 0, "import java.awt.List;", "topLevelKeywordsWithoutPackage.pass");
216     }
217     
218     public void testAfterTypingImportStatement() throws Exception JavaDoc {
219         performTest("Simple", 14, "import java.awt.List;", "topLevelKeywordsWithoutPackage.pass");
220     }
221     
222     public void testAfterImportStatement() throws Exception JavaDoc {
223         performTest("Import", 36, null, "topLevelKeywordsWithoutPackage.pass");
224     }
225     
226     public void testEmptyFileTypingStaticImportKeyword() throws Exception JavaDoc {
227         performTest("Empty", 0, "import st", "staticKeyword.pass");
228     }
229     
230     public void testTypingStaticImportKeyword() throws Exception JavaDoc {
231         performTest("Simple", 14, "import st", "staticKeyword.pass");
232     }
233     
234     public void testOnStaticImportKeyword() throws Exception JavaDoc {
235         performTest("Import", 66, null, "staticKeyword.pass");
236     }
237     
238     public void testEmptyFileAfterTypingStaticImportKeyword() throws Exception JavaDoc {
239         performTest("Empty", 0, "import static", "staticKeyword.pass");
240     }
241     
242     public void testAfterTypingStaticImportKeyword() throws Exception JavaDoc {
243         performTest("Simple", 14, "import static", "staticKeyword.pass");
244     }
245     
246     public void testAfterStaticImportKeyword() throws Exception JavaDoc {
247         performTest("Import", 70, null, "staticKeyword.pass");
248     }
249     
250     public void testEmptyFileBeforeTypingStaticallyImportedClass() throws Exception JavaDoc {
251         performTest("Empty", 0, "import static ", "allPackages.pass");
252     }
253     
254     public void testBeforeTypingStaticallyImportedClass() throws Exception JavaDoc {
255         performTest("Simple", 14, "import static ", "allPackages.pass");
256     }
257     
258     public void testBeforeStaticallyImportedClass() throws Exception JavaDoc {
259         performTest("Import", 71, null, "allPackages.pass");
260     }
261     
262     public void testEmptyFileTypingImportedPackageAfterErrorInPackageDeclaration() throws Exception JavaDoc {
263         performTest("Empty", 0, "package \nimport j", "packagesStartingWithJ.pass");
264     }
265     
266     public void testTypingStaticImportAfterErrorInPackageDeclaration() throws Exception JavaDoc {
267         performTest("SimpleNoPackage", 0, "package \nimport ", "staticKeywordAndAllPackages.pass");
268     }
269
270     public void testTypingStaticImportAfterErrorInPreviousImportDeclaration() throws Exception JavaDoc {
271         performTest("Simple", 14, "im\nimport ", "staticKeywordAndAllPackages.pass");
272     }
273     
274     // class declaration tests -------------------------------------------------
275

276     public void testEmptyFileAfterTypingPublicKeyword() throws Exception JavaDoc {
277         performTest("Empty", 0, "package test;\npublic", "publicKeyword.pass");
278     }
279     
280     public void testAfterPublicKeyword() throws Exception JavaDoc {
281         performTest("Simple", 21, null, "publicKeyword.pass");
282     }
283     
284     public void testTypingFinalClass() throws Exception JavaDoc {
285         performTest("Simple", 21, " f", "finalKeyword.pass");
286     }
287     
288     public void testAfterTypingFinalClass() throws Exception JavaDoc {
289         performTest("Simple", 21, " final", "finalKeyword.pass");
290     }
291     
292     public void testEmptyFileBeforeTypingClassKeyword() throws Exception JavaDoc {
293         performTest("Empty", 0, "package test;\npublic ", "classModifiersWithoutPublic.pass");
294     }
295     
296     public void testBeforeClassKeyword() throws Exception JavaDoc {
297         performTest("Simple", 22, null, "classModifiersWithoutPublic.pass");
298     }
299     
300     public void testEmptyFileTypingClassKeyword() throws Exception JavaDoc {
301         performTest("Empty", 0, "package test;\npublic c", "classKeyword.pass");
302     }
303     
304     public void testOnClassKeyword() throws Exception JavaDoc {
305         performTest("Simple", 23, null, "classKeyword.pass");
306     }
307     
308     public void testEmptyFileAfterTypingClassKeyword() throws Exception JavaDoc {
309         performTest("Empty", 0, "package test;\npublic class", "classKeyword.pass");
310     }
311     
312     public void testAfterClassKeyword() throws Exception JavaDoc {
313         performTest("Simple", 27, null, "classKeyword.pass");
314     }
315     
316     public void testEmptyFileBeforeTypingClassName() throws Exception JavaDoc {
317         performTest("Empty", 0, "package test;\npublic class ", "empty.pass");
318     }
319     
320     public void testBeforeClassName() throws Exception JavaDoc {
321         performTest("Simple", 28, null, "empty.pass");
322     }
323     
324     public void testEmptyFileTypingClassName() throws Exception JavaDoc {
325         performTest("Empty", 0, "package test;\npublic class T", "empty.pass");
326     }
327     
328     public void testOnClassName() throws Exception JavaDoc {
329         performTest("Simple", 29, null, "empty.pass");
330     }
331     
332     public void testEmptyAfterFileTypingClassName() throws Exception JavaDoc {
333         performTest("Empty", 0, "package test;\npublic class Test", "empty.pass");
334     }
335     
336     public void testAfterClassName() throws Exception JavaDoc {
337         performTest("Simple", 32, null, "empty.pass");
338     }
339     
340     public void testEmptyFileBeforeTypingExtendsKeyword() throws Exception JavaDoc {
341         performTest("Empty", 0, "package test;\npublic class Test ", "extendsAndImplementsKeywords.pass");
342     }
343     
344     public void testBeforeTypingExtendsKeyword() throws Exception JavaDoc {
345         performTest("SimpleNoExtendsAndImplements", 33, null, "extendsAndImplementsKeywords.pass");
346     }
347     
348     public void testBeforeExtendsKeyword() throws Exception JavaDoc {
349         performTest("Simple", 33, null, "extendsAndImplementsKeywords.pass");
350     }
351     
352     public void testEmptyFileTypingExtendsKeyword() throws Exception JavaDoc {
353         performTest("Empty", 0, "package test;\npublic class Test e", "extendsKeyword.pass");
354     }
355     
356     public void testTypingExtendsKeyword() throws Exception JavaDoc {
357         performTest("SimpleNoExtendsAndImplements", 33, "e", "extendsKeyword.pass");
358     }
359     
360     public void testOnExtendsKeyword() throws Exception JavaDoc {
361         performTest("Simple", 34, null, "extendsKeyword.pass");
362     }
363     
364     public void testEmptyFileAfterTypingExtendsKeyword() throws Exception JavaDoc {
365         performTest("Empty", 0, "package test;\npublic class Test extends", "extendsKeyword.pass");
366     }
367     
368     public void testAfterTypingExtendsKeyword() throws Exception JavaDoc {
369         performTest("SimpleNoExtendsAndImplements", 33, "extends", "extendsKeyword.pass");
370     }
371     
372     public void testAfterExtendsKeyword() throws Exception JavaDoc {
373         performTest("Simple", 40, null, "extendsKeyword.pass");
374     }
375     
376     public void testEmptyFileBeforeTypingExtendedObject() throws Exception JavaDoc {
377         performTest("Empty", 0, "package test;\npublic class Test extends ", "javaLangClasses.pass");
378     }
379     
380     public void testBeforeTypingExtendedObject() throws Exception JavaDoc {
381         performTest("SimpleNoExtendsAndImplements", 33, "extends ", "javaLangClasses.pass");
382     }
383     
384     public void testBeforeExtendedObject() throws Exception JavaDoc {
385         performTest("Simple", 41, null, "javaLangClasses.pass");
386     }
387     
388     public void testEmptyFileTypingExtendedObject() throws Exception JavaDoc {
389         performTest("Empty", 0, "package test;\npublic class Test extends O", "javaLangClassesStartingWithO.pass");
390     }
391     
392     public void testTypingExtendedObject() throws Exception JavaDoc {
393         performTest("SimpleNoExtendsAndImplements", 33, "extends O", "javaLangClassesStartingWithO.pass");
394     }
395     
396     public void testOnExtendedObject() throws Exception JavaDoc {
397         performTest("Simple", 42, null, "javaLangClassesStartingWithO.pass");
398     }
399     
400     public void testEmptyFileAfterTypingExtendedObject() throws Exception JavaDoc {
401         performTest("Empty", 0, "package test;\npublic class Test extends Object", "object.pass");
402     }
403     
404     public void testAfterTypingExtendedObject() throws Exception JavaDoc {
405         performTest("SimpleNoExtendsAndImplements", 33, "extends Object", "object.pass");
406     }
407     
408     public void testAfterExtendedObject() throws Exception JavaDoc {
409         performTest("Simple", 47, null, "object.pass");
410     }
411     
412     public void testEmptyFileBeforeTypingImplementsKeyword() throws Exception JavaDoc {
413         performTest("Empty", 0, "package test;\npublic class Test extends Object ", "implementsKeyword.pass");
414     }
415     
416     public void testBeforeTypingImplementsKeyword() throws Exception JavaDoc {
417         performTest("SimpleNoExtendsAndImplements", 33, "extends Object ", "implementsKeyword.pass");
418     }
419     
420     public void testBeforeImplementsKeyword() throws Exception JavaDoc {
421         performTest("Simple", 48, null, "implementsKeyword.pass");
422     }
423     
424     public void testEmptyFileTypingImplementsKeyword() throws Exception JavaDoc {
425         performTest("Empty", 0, "package test;\npublic class Test extends Object i", "implementsKeyword.pass");
426     }
427     
428     public void testTypingImplementsKeyword() throws Exception JavaDoc {
429         performTest("SimpleNoExtendsAndImplements", 33, "i", "implementsKeyword.pass");
430     }
431     
432     public void testOnImplementsKeyword() throws Exception JavaDoc {
433         performTest("Simple", 49, null, "implementsKeyword.pass");
434     }
435     
436     public void testEmptyFileAfteTypingImplementsKeyword() throws Exception JavaDoc {
437         performTest("Empty", 0, "package test;\npublic class Test extends Object implements", "implementsKeyword.pass");
438     }
439     
440     public void testAfterTypingImplementsKeyword() throws Exception JavaDoc {
441         performTest("SimpleNoExtendsAndImplements", 33, "implements", "implementsKeyword.pass");
442     }
443     
444     public void testAfterImplementsKeyword() throws Exception JavaDoc {
445         performTest("Simple", 58, null, "implementsKeyword.pass");
446     }
447     
448     public void testEmptyFileBeforeTypingImplementedInterface() throws Exception JavaDoc {
449         performTest("Empty", 0, "package test;\npublic class Test extends Object implements ", "javaLangInterfaces.pass");
450     }
451     
452     public void testBeforeTypingImplementedInterface() throws Exception JavaDoc {
453         performTest("SimpleNoExtendsAndImplements", 33, "implements ", "javaLangInterfaces.pass");
454     }
455     
456     public void testBeforeImplementedInterface() throws Exception JavaDoc {
457         performTest("Simple", 59, null, "javaLangInterfaces.pass");
458     }
459     
460     public void testEmptyFileAfterTypingImplementedInterface() throws Exception JavaDoc {
461         performTest("Empty", 0, "package test;\npublic class Test extends Object implements Cloneable", "cloneable.pass");
462     }
463     
464     public void testAfterTypingImplementedInterface() throws Exception JavaDoc {
465         performTest("SimpleNoExtendsAndImplements", 33, "implements Cloneable", "cloneable.pass");
466     }
467     
468     public void testAfterImplementedInterface() throws Exception JavaDoc {
469         performTest("Simple", 68, null, "cloneable.pass");
470     }
471     
472     public void testEmptyFileAfterTypingImplementedInterfaceAndSpace() throws Exception JavaDoc {
473         performTest("Empty", 0, "package test;\npublic class Test extends Object implements Cloneable ", "empty.pass");
474     }
475     
476     public void testAfterTypingImplementedInterfaceAndSpace() throws Exception JavaDoc {
477         performTest("SimpleNoExtendsAndImplements", 33, "implements Cloneable ", "empty.pass");
478     }
479     
480     public void testAfterImplementedInterfaceAndSpace() throws Exception JavaDoc {
481         performTest("Simple", 68, " ", "empty.pass");
482     }
483     
484     public void testEmptyFileAfterTypingFirstImplementedInterface() throws Exception JavaDoc {
485         performTest("Empty", 0, "package test;\npublic class Test extends Object implements Cloneable, ", "javaLangInterfaces.pass");
486     }
487     
488     public void testAfterTypingFirstImplementedInterface() throws Exception JavaDoc {
489         performTest("SimpleNoExtendsAndImplements", 33, "implements Cloneable, ", "javaLangInterfaces.pass");
490     }
491     
492     public void testAfterFirstImplementedInterface() throws Exception JavaDoc {
493         performTest("Simple", 70, null, "javaLangInterfaces.pass");
494     }
495     
496     public void testEmptyFileTypingSecondImplementedInterface() throws Exception JavaDoc {
497         performTest("Empty", 0, "package test;\npublic class Test extends Object implements Cloneable, R", "javaLangInterfacesStartingWithR.pass");
498     }
499     
500     public void testTypingSecondImplementedInterface() throws Exception JavaDoc {
501         performTest("SimpleNoExtendsAndImplements", 33, "implements Cloneable, R", "javaLangInterfacesStartingWithR.pass");
502     }
503     
504     public void testOnSecondImplementedInterface() throws Exception JavaDoc {
505         performTest("Simple", 71, null, "javaLangInterfacesStartingWithR.pass");
506     }
507     
508     public void testEmptyFileTypingClassBody() throws Exception JavaDoc {
509         performTest("Empty", 0, "package test;\npublic class Test {", "memberModifiersTypesAndGenElements.pass");
510     }
511     
512     public void testInClassBody() throws Exception JavaDoc {
513         performTest("Simple", 80, null, "memberModifiersTypesAndGenElements2.pass");
514     }
515
516     public void testEmptyFileAfterTypingClassBody() throws Exception JavaDoc {
517         performTest("Empty", 0, "package test;\npublic class Test {\n}", "classModifiersWithoutPublic.pass");
518     }
519     
520     public void testAfterClassBody() throws Exception JavaDoc {
521         performTest("Simple", 82, null, "classModifiersWithoutPublic.pass");
522     }
523     
524     public void testEmptyFileAfterTypingIncompleteClassBodyAndSecondClassKeyword() throws Exception JavaDoc {
525         performTest("Empty", 0, "package test;\npublic class Test {\nclass", "classKeyword.pass");
526     }
527     
528     // interface declaration tests ---------------------------------------------
529

530     public void testEmptyFileAfterTypingIntefaceName() throws Exception JavaDoc {
531         performTest("Empty", 0, "package test;\ninterface Test ", "extendsKeyword.pass");
532     }
533     
534     public void testAfterTypingIntefaceName() throws Exception JavaDoc {
535         performTest("SimpleInterfaceNoExtends", 30, null, "extendsKeyword.pass");
536     }
537     
538     public void testAfterIntefaceName() throws Exception JavaDoc {
539         performTest("SimpleInterface", 30, null, "extendsKeyword.pass");
540     }
541     
542     public void testEmptyFileAfterTypingExtendsInInteface() throws Exception JavaDoc {
543         performTest("Empty", 0, "package test;\ninterface Test extends ", "javaLangInterfaces.pass");
544     }
545     
546     public void testAfterTypingExtendsInInterface() throws Exception JavaDoc {
547         performTest("SimpleInterfaceNoExtends", 30, "extends ", "javaLangInterfaces.pass");
548     }
549     
550     public void testAfterExtendsInInteface() throws Exception JavaDoc {
551         performTest("SimpleInterface", 38, null, "javaLangInterfaces.pass");
552     }
553     
554     // enum declaration tests --------------------------------------------------
555

556     public void testEmptyFileAfterTypingEnumName() throws Exception JavaDoc {
557         performTest("Empty", 0, "package test;\npublic enum Test ", "implementsKeyword.pass");
558     }
559     
560     public void testAfterTypingEnumName() throws Exception JavaDoc {
561         performTest("SimpleEnumNoImplements", 32, null, "implementsKeyword.pass");
562     }
563     
564     public void testAfterEnumName() throws Exception JavaDoc {
565         performTest("SimpleEnum", 32, null, "implementsKeyword.pass");
566     }
567     
568     public void testEmptyFileAfterTypingImplementsInEnum() throws Exception JavaDoc {
569         performTest("Empty", 0, "package test;\npublic enum Test implements ", "javaLangInterfaces.pass");
570     }
571     
572     public void testAfterTypingImplementsInEnum() throws Exception JavaDoc {
573         performTest("SimpleEnumNoImplements", 43, null, "javaLangInterfaces.pass");
574     }
575     
576     public void testAfterImplementsInEnum() throws Exception JavaDoc {
577         performTest("SimpleEnum", 43, null, "javaLangInterfaces.pass");
578     }
579     
580     // method declaration tests -------------------------------------------------
581

582     public void testEmptyFileTypingPublicKeywordInMethodDecl() throws Exception JavaDoc {
583         performTest("MethodStart", 40, "p", "memberModifiersStartingWithP.pass");
584     }
585     
586     public void testOnPublicKeywordInMethodDecl() throws Exception JavaDoc {
587         performTest("Method", 41, null, "memberModifiersStartingWithP.pass");
588     }
589     
590     public void testEmptyFileAfterTypingPublicKeywordInMethodDecl() throws Exception JavaDoc {
591         performTest("MethodStart", 40, "public", "publicKeyword.pass");
592     }
593     
594     public void testAfterPublicKeywordInMethodDecl() throws Exception JavaDoc {
595         performTest("Method", 46, null, "publicKeyword.pass");
596     }
597     
598     public void testTypingStaticMethodDecl() throws Exception JavaDoc {
599         performTest("Method", 46, " sta", "staticKeyword.pass");
600     }
601     
602     public void testAfterTypingStaticMethodDecl() throws Exception JavaDoc {
603         performTest("Method", 46, " static", "staticKeyword.pass");
604     }
605     
606     public void testEmptyFileBeforeTypingReturnValue() throws Exception JavaDoc {
607         performTest("MethodStart", 40, "public ", "memberModifiersAndTypesWithoutPublic.pass");
608     }
609     
610     public void testBeforeReturnValue() throws Exception JavaDoc {
611         performTest("Method", 47, null, "memberModifiersAndTypesWithoutPublic.pass");
612     }
613     
614     public void testEmptyFileTypingReturnValue() throws Exception JavaDoc {
615         performTest("MethodStart", 40, "public voi", "voidKeyword.pass");
616     }
617     
618     public void testOnReturnValue() throws Exception JavaDoc {
619         performTest("Method", 50, null, "voidKeyword.pass");
620     }
621     
622     public void testEmptyFileAfterTypingReturnValue() throws Exception JavaDoc {
623         performTest("MethodStart", 40, "public void", "voidKeyword.pass");
624     }
625     
626     public void testAfterReturnValue() throws Exception JavaDoc {
627         performTest("Method", 51, null, "voidKeyword.pass");
628     }
629     
630     public void testEmptyFileBeforeTypingMethodName() throws Exception JavaDoc {
631         performTest("MethodStart", 40, "public void ", "empty.pass");
632     }
633     
634     public void testBeforeMethodName() throws Exception JavaDoc {
635         performTest("Method", 52, null, "empty.pass");
636     }
637     
638     public void testEmptyFileTypingMethodName() throws Exception JavaDoc {
639         performTest("MethodStart", 40, "public void o", "empty.pass");
640     }
641     
642     public void testOnMethodName() throws Exception JavaDoc {
643         performTest("Method", 53, null, "empty.pass");
644     }
645     
646     public void testEmptyFileAfterTypingMethodName() throws Exception JavaDoc {
647         performTest("MethodStart", 40, "public void op", "empty.pass");
648     }
649     
650     public void testAfterMethodName() throws Exception JavaDoc {
651         performTest("Method", 54, null, "empty.pass");
652     }
653     
654     public void testEmptyFileBeforeTypingFirstParameter() throws Exception JavaDoc {
655         performTest("MethodStart", 40, "public void op(", "parameterTypes.pass");
656     }
657     
658     public void testBeforeTypingFirstParameter() throws Exception JavaDoc {
659         performTest("MethodNoParamsAndThrows", 55, null, "parameterTypes.pass");
660     }
661
662     public void testBeforeFirstParameter() throws Exception JavaDoc {
663         performTest("Method", 55, null, "parameterTypes.pass");
664     }
665     
666     public void testEmptyFileTypingFirstParameterType() throws Exception JavaDoc {
667         performTest("MethodStart", 40, "public void op(i", "intKeyword.pass");
668     }
669     
670     public void testTypingFirstParameterType() throws Exception JavaDoc {
671         performTest("MethodNoParamsAndThrows", 55, "i", "intKeyword.pass");
672     }
673
674     public void testOnFirstParameterType() throws Exception JavaDoc {
675         performTest("Method", 56, null, "intKeyword.pass");
676     }
677     
678     public void testEmptyFileAfterTypingFirstParameterType() throws Exception JavaDoc {
679         performTest("MethodStart", 40, "public void op(int", "intKeyword.pass");
680     }
681     
682     public void testAfterTypingFirstParameterType() throws Exception JavaDoc {
683         performTest("MethodNoParamsAndThrows", 55, "int", "intKeyword.pass");
684     }
685
686     public void testAfterFirstParameterType() throws Exception JavaDoc {
687         performTest("Method", 58, null, "intKeyword.pass");
688     }
689     
690     public void testEmptyFileBeforeTypingFirstParameterName() throws Exception JavaDoc {
691         performTest("MethodStart", 40, "public void op(int ", "intVarName.pass");
692     }
693     
694     public void testBeforeTypingFirstParameterName() throws Exception JavaDoc {
695         performTest("MethodNoParamsAndThrows", 55, "int ", "intVarName.pass");
696     }
697
698     public void testBeforeFirstParameterName() throws Exception JavaDoc {
699         performTest("Method", 59, null, "intVarName.pass");
700     }
701     
702     public void testEmptyFileTypingFirstParameterName() throws Exception JavaDoc {
703         performTest("MethodStart", 40, "public void op(int a", "aI.pass");
704     }
705     
706     public void testTypingFirstParameterName() throws Exception JavaDoc {
707         performTest("MethodNoParamsAndThrows", 55, "int a", "aI.pass");
708     }
709
710     public void testOnFirstParameterName() throws Exception JavaDoc {
711         performTest("Method", 60, null, "aI.pass");
712     }
713     
714     public void testEmptyFileAfterTypingFirstParameterNameAndSpace() throws Exception JavaDoc {
715         performTest("MethodStart", 40, "public void op(int a ", "empty.pass");
716     }
717     
718     public void testAfterTypingFirstParameterNameAndSpace() throws Exception JavaDoc {
719         performTest("MethodNoParamsAndThrows", 55, "int a ", "empty.pass");
720     }
721
722     public void testAfterFirstParameterNameAndSpace() throws Exception JavaDoc {
723         performTest("Method", 60, " ", "empty.pass");
724     }
725     
726     public void testEmptyFileBeforeTypingSecondParameter() throws Exception JavaDoc {
727         performTest("MethodStart", 40, "public void op(int a,", "parameterTypes.pass");
728     }
729     
730     public void testBeforeTypingSecondParameter() throws Exception JavaDoc {
731         performTest("MethodNoParamsAndThrows", 55, "int a,", "parameterTypes.pass");
732     }
733
734     public void testBeforeSecondParameter() throws Exception JavaDoc {
735         performTest("Method", 61, null, "parameterTypes.pass");
736     }
737     
738     public void testEmptyFileTypingSecondParameterType() throws Exception JavaDoc {
739         performTest("MethodStart", 40, "public void op(int a, bo", "booleanKeyword.pass");
740     }
741     
742     public void testTypingSecondParameterType() throws Exception JavaDoc {
743         performTest("MethodNoParamsAndThrows", 55, "int a, bo", "booleanKeyword.pass");
744     }
745
746     public void testOnSecondParameterType() throws Exception JavaDoc {
747         performTest("Method", 64, null, "booleanKeyword.pass");
748     }
749     
750     public void testEmptyFileAfterTypingSecondParameterType() throws Exception JavaDoc {
751         performTest("MethodStart", 40, "public void op(int a, boolean", "booleanKeyword.pass");
752     }
753     
754     public void testAfterTypingSecondParameterType() throws Exception JavaDoc {
755         performTest("MethodNoParamsAndThrows", 55, "int a, boolean", "booleanKeyword.pass");
756     }
757
758     public void testAfterSecondParameterType() throws Exception JavaDoc {
759         performTest("Method", 69, null, "booleanKeyword.pass");
760     }
761     
762     public void testEmptyFileBeforeTypingSecondParameterName() throws Exception JavaDoc {
763         performTest("MethodStart", 40, "public void op(int a, boolean ", "booleanVarName.pass");
764     }
765     
766     public void testBeforeTypingSecondParameterName() throws Exception JavaDoc {
767         performTest("MethodNoParamsAndThrows", 55, "int a, boolean ", "booleanVarName.pass");
768     }
769
770     public void testBeforeSecondParameterName() throws Exception JavaDoc {
771         performTest("Method", 70, null, "booleanVarName.pass");
772     }
773     
774     public void testEmptyFileTypingSecondParameterName() throws Exception JavaDoc {
775         performTest("MethodStart", 40, "public void op(int a, boolean b", "booleanVarName.pass");
776     }
777     
778     public void testTypingSecondParameterName() throws Exception JavaDoc {
779         performTest("MethodNoParamsAndThrows", 55, "int a, boolean b", "booleanVarName.pass");
780     }
781
782     public void testOnSecondParameterName() throws Exception JavaDoc {
783         performTest("Method", 71, null, "booleanVarName.pass");
784     }
785
786     public void testEmptyFileBeforeTypingThrowsKeyword() throws Exception JavaDoc {
787         performTest("MethodStart", 40, "public void op() ", "throwsKeyword.pass");
788     }
789     
790     public void testBeforeTypingThrowsKeyword() throws Exception JavaDoc {
791         performTest("MethodNoParamsAndThrows", 56, " ", "throwsKeyword.pass");
792     }
793
794     public void testBeforeThrowsKeyword() throws Exception JavaDoc {
795         performTest("Method", 73, null, "throwsKeyword.pass");
796     }
797     
798     public void testEmptyFileTypingThrowsKeyword() throws Exception JavaDoc {
799         performTest("MethodStart", 40, "public void op() t", "throwsKeyword.pass");
800     }
801     
802     public void testTypingThrowsKeyword() throws Exception JavaDoc {
803         performTest("MethodNoParamsAndThrows", 56, " t", "throwsKeyword.pass");
804     }
805
806     public void testOnThrowsKeyword() throws Exception JavaDoc {
807         performTest("Method", 74, null, "throwsKeyword.pass");
808     }
809     
810     public void testEmptyAfterFileTypingThrowsKeyword() throws Exception JavaDoc {
811         performTest("MethodStart", 40, "public void op() throws", "throwsKeyword.pass");
812     }
813     
814     public void testAfterTypingThrowsKeyword() throws Exception JavaDoc {
815         performTest("MethodNoParamsAndThrows", 56, " throws", "throwsKeyword.pass");
816     }
817
818     public void testAfterThrowsKeyword() throws Exception JavaDoc {
819         performTest("Method", 79, null, "throwsKeyword.pass");
820     }
821         
822     public void testEmptyFileBeforeTypingThrownException() throws Exception JavaDoc {
823         performTest("MethodStart", 40, "public void op() throws ", "javaLangThrowables.pass");
824     }
825     
826     public void testBeforeTypingThrownException() throws Exception JavaDoc {
827         performTest("MethodNoParamsAndThrows", 56, "throws ", "javaLangThrowables.pass");
828     }
829     
830     public void testBeforeThrownException() throws Exception JavaDoc {
831         performTest("Method", 80, null, "javaLangThrowables.pass");
832     }
833     
834     public void testEmptyFileTypingThrownException() throws Exception JavaDoc {
835         performTest("MethodStart", 40, "public void op() throws N", "javaLangThrowablesStartingWithN.pass");
836     }
837     
838     public void testTypingThrownException() throws Exception JavaDoc {
839         performTest("MethodNoParamsAndThrows", 56, "throws N", "javaLangThrowablesStartingWithN.pass");
840     }
841     
842     public void testOnThrownException() throws Exception JavaDoc {
843         performTest("Method", 81, null, "javaLangThrowablesStartingWithN.pass");
844     }
845     
846     public void testEmptyFileAfterTypingThrownException() throws Exception JavaDoc {
847         performTest("MethodStart", 40, "public void op() throws NullPointerException", "nullPointerException.pass");
848     }
849     
850     public void testAfterTypingThrownException() throws Exception JavaDoc {
851         performTest("MethodNoParamsAndThrows", 56, "throws NullPointerException", "nullPointerException.pass");
852     }
853     
854     public void testAfterThrownException() throws Exception JavaDoc {
855         performTest("Method", 100, null, "nullPointerException.pass");
856     }
857     
858     public void testEmptyFileAfterTypingThrownExceptionAndSpace() throws Exception JavaDoc {
859         performTest("MethodStart", 40, "public void op() throws NullPointerException ", "empty.pass");
860     }
861     
862     public void testAfterTypingThrownExceptionAndSpace() throws Exception JavaDoc {
863         performTest("MethodNoParamsAndThrows", 56, "throws NullPointerException ", "empty.pass");
864     }
865     
866     public void testAfterThrownExceptionAndSpace() throws Exception JavaDoc {
867         performTest("Method", 100, " ", "empty.pass");
868     }
869     
870     public void testEmptyFileBeforeTypingSecondThrownException() throws Exception JavaDoc {
871         performTest("MethodStart", 40, "public void op() throws NullPointerException, ", "javaLangThrowables.pass");
872     }
873     
874     public void testBeforeTypingSecondThrownException() throws Exception JavaDoc {
875         performTest("MethodNoParamsAndThrows", 56, "throws NullPointerException, ", "javaLangThrowables.pass");
876     }
877     
878     public void testBeforeSecondThrownExceptionAndSpace() throws Exception JavaDoc {
879         performTest("Method", 102, null, "javaLangThrowables.pass");
880     }
881     
882     public void testEmptyFileTypingSecondThrownException() throws Exception JavaDoc {
883         performTest("MethodStart", 40, "public void op() throws NullPointerException, I", "javaLangThrowablesStartingWithI.pass");
884     }
885     
886     public void testTypingSecondThrownException() throws Exception JavaDoc {
887         performTest("MethodNoParamsAndThrows", 56, "throws NullPointerException, I", "javaLangThrowablesStartingWithI.pass");
888     }
889     
890     public void testOnSecondThrownException() throws Exception JavaDoc {
891         performTest("Method", 103, null, "javaLangThrowablesStartingWithI.pass");
892     }
893     
894     public void testEmptyFileAfterTypingMethodBody() throws Exception JavaDoc {
895         performTest("MethodStart", 40, "public void op() {\n}", "memberModifiersTypesAndGenElements.pass");
896     }
897     
898     public void testAfterMethodBody() throws Exception JavaDoc {
899         performTest("Method", 131, null, "memberModifiersTypesAndGenElements.pass");
900     }
901     
902     public void testEmptyFileAfterTypingIncompleteMethodBodyAndPublicKeyword() throws Exception JavaDoc {
903         performTest("MethodStart", 40, "public void op() {\npublic", "empty.pass");
904     }
905
906     public void testEmptyFileAfterTypingIncompleteMethodBodyAndPublicKeywordAndSpace() throws Exception JavaDoc {
907         performTest("MethodStart", 40, "public void op() {\npublic ", "memberModifiersAndTypesWithoutPublic.pass");
908     }
909
910     // field declaration tests -------------------------------------------------
911

912     public void testEmptyFileAfterTypingFieldNameAndSpace() throws Exception JavaDoc {
913         performTest("MethodStart", 40, "public int field ", "empty.pass");
914     }
915     
916     public void testAfterTypingFieldNameAndSpace() throws Exception JavaDoc {
917         performTest("FieldNoInit", 56, " ", "empty.pass");
918     }
919     
920     public void testAfterFieldNameAndSpace() throws Exception JavaDoc {
921         performTest("Field", 57, null, "empty.pass");
922     }
923     
924     public void testEmptyFileAfterTypingAssignmentInField() throws Exception JavaDoc {
925         performTest("MethodStart", 40, "public static int staticField = 10;\npublic int field =", "typesLocalMembersAndSmartInt.pass");
926     }
927     
928     public void testAfterTypingAssignmentInField() throws Exception JavaDoc {
929         performTest("FieldNoInit", 56, " =", "typesLocalMembersAndSmartInt.pass");
930     }
931     
932     public void testAfterAssignmentInField() throws Exception JavaDoc {
933         performTest("Field", 58, null, "typesLocalMembersAndSmartInt.pass");
934     }
935     
936     public void testEmptyFileBeforeTypingInitOfField() throws Exception JavaDoc {
937         performTest("MethodStart", 40, "public static int staticField = 10;\npublic int field = ", "typesLocalMembersAndSmartInt.pass");
938     }
939     
940     public void testBeforeTypingInitOfField() throws Exception JavaDoc {
941         performTest("FieldNoInit", 56, " = ", "typesLocalMembersAndSmartInt.pass");
942     }
943     
944     public void testBeforeInitOfField() throws Exception JavaDoc {
945         performTest("Field", 59, null, "typesLocalMembersAndSmartInt.pass");
946     }
947     
948     public void testEmptyFileBeforeTypingInitOfStaticField() throws Exception JavaDoc {
949         performTest("MethodStart", 40, "public static int staticField = ", "typesAndStaticLocalMembers.pass");
950     }
951     
952     public void testBeforeTypingInitOfStaticField() throws Exception JavaDoc {
953         performTest("FieldNoInit", 91, " = ", "typesAndStaticLocalMembers.pass");
954     }
955     
956     public void testBeforeInitOfStaticField() throws Exception JavaDoc {
957         performTest("Field", 112, null, "typesAndStaticLocalMembers.pass");
958     }
959     
960     public void testEmptyFileTypingInitOfField() throws Exception JavaDoc {
961         performTest("MethodStart", 40, "public int field = ha", "hashCode.pass");
962     }
963     
964     public void testTypingInitOfField() throws Exception JavaDoc {
965         performTest("FieldNoInit", 56, " = ha", "hashCode.pass");
966     }
967     
968     public void testOnInitOfField() throws Exception JavaDoc {
969         performTest("Field", 61, null, "hashCode.pass");
970     }
971     
972     public void testEmptyFileTypingMethodInvocationWithinInitOfField() throws Exception JavaDoc {
973         performTest("MethodStart", 40, "public static int staticField = 10;\npublic int field = hashCode(", "typesAndLocalMembers.pass");
974     }
975     
976     public void testTypingMethodInvocationWithinInitOfField() throws Exception JavaDoc {
977         performTest("FieldNoInit", 56, " = hashCode(", "typesAndLocalMembers.pass");
978     }
979     
980     public void testOnMethodInvocationWithinInitOfField() throws Exception JavaDoc {
981         performTest("Field", 68, null, "typesAndLocalMembers.pass");
982     }
983     
984     public void testEmptyFileAfterTypingMethodInvocationWithinInitOfField() throws Exception JavaDoc {
985         performTest("MethodStart", 40, "public int field = hashCode()", "empty.pass");
986     }
987     
988     public void testAfterTypingMethodInvocationWithinInitOfField() throws Exception JavaDoc {
989         performTest("FieldNoInit", 56, " = hashCode()", "empty.pass");
990     }
991     
992     public void testAfterMethodInvocationWithinInitOfField() throws Exception JavaDoc {
993         performTest("Field", 69, null, "empty.pass");
994     }
995     
996     public void testEmptyFileAfterTypingOperatorWithinInitOfField() throws Exception JavaDoc {
997         performTest("MethodStart", 40, "public static int staticField = 10;\npublic int field = hashCode() /", "typesLocalMembersAndSmartPrimitives.pass");
998     }
999     
1000    public void testAfterTypingOperatorWithinInitOfField() throws Exception JavaDoc {
1001        performTest("FieldNoInit", 56, " = hashCode() /", "typesLocalMembersAndSmartPrimitives.pass");
1002    }
1003    
1004    public void testAfterOperatorWithinInitOfField() throws Exception JavaDoc {
1005        performTest("Field", 71, null, "typesLocalMembersAndSmartPrimitives.pass");
1006    }
1007    
1008    public void testEmptyFileAfterTypingConstantWithinInitOfField() throws Exception JavaDoc {
1009        performTest("MethodStart", 40, "public int field = hashCode() / 10", "empty.pass");
1010    }
1011    
1012    public void testAfterTypingConstantWithinInitOfField() throws Exception JavaDoc {
1013        performTest("FieldNoInit", 56, " = hashCode() / 10", "empty.pass");
1014    }
1015    
1016    public void testAfterConstantWithinInitOfField() throws Exception JavaDoc {
1017        performTest("Field", 74, null, "empty.pass");
1018    }
1019    
1020    public void testEmptyFileAfterTypingFieldDeclaration() throws Exception JavaDoc {
1021        performTest("MethodStart", 40, "public int field = hashCode() / 10;", "memberModifiersTypesAndGenElements.pass");
1022    }
1023    
1024    public void testAfterFieldDeclaration() throws Exception JavaDoc {
1025        performTest("Field", 75, null, "memberModifiersTypesAndGenElements.pass");
1026    }
1027    
1028    public void testTypingStaticFieldAfterErrorInPreviousFieldDeclaration() throws Exception JavaDoc {
1029        performTest("MethodStart", 40, "public int \npublic sta", "staticKeyword.pass");
1030    }
1031
1032    public void testTypingStaticFieldAfterErrorInPreviousFieldInitialization() throws Exception JavaDoc {
1033        performTest("MethodStart", 40, "public int field = has\npublic sta", "staticKeyword.pass");
1034    }
1035    
1036    // basic method body tests -------------------------------------------------
1037

1038    public void testEmptyFileTypingMethodBody() throws Exception JavaDoc {
1039        performTest("SimpleMethodBodyStart", 89, null, "methodBodyContent.pass");
1040    }
1041    
1042    public void testTypingMethodBody() throws Exception JavaDoc {
1043        performTest("SimpleEmptyMethodBody", 89, null, "methodBodyContent.pass");
1044    }
1045    
1046    public void testInMethodBody() throws Exception JavaDoc {
1047        performTest("SimpleMethodBody", 89, null, "methodBodyContent.pass");
1048    }
1049    
1050    public void testEmptyFileTypingLocalVariableTypeInMethodBody() throws Exception JavaDoc {
1051        performTest("SimpleMethodBodyStart", 98, "bo", "booleanKeyword.pass");
1052    }
1053    
1054    public void testTypingLocalVariableTypeInMethodBody() throws Exception JavaDoc {
1055        performTest("SimpleEmptyMethodBody", 98, "bo", "booleanKeyword.pass");
1056    }
1057    
1058    public void testLocalVariableTypeInMethodBody() throws Exception JavaDoc {
1059        performTest("SimpleMethodBody", 100, null, "booleanKeyword.pass");
1060    }
1061    
1062    public void testEmptyFileAfterTypingLocalVariableTypeInMethodBody() throws Exception JavaDoc {
1063        performTest("SimpleMethodBodyStart", 98, "boolean", "booleanKeyword.pass");
1064    }
1065    
1066    public void testAfterTypingLocalVariableTypeInMethodBody() throws Exception JavaDoc {
1067        performTest("SimpleEmptyMethodBody", 98, "boolean", "booleanKeyword.pass");
1068    }
1069    
1070    public void testAfterLocalVariableTypeInMethodBody() throws Exception JavaDoc {
1071        performTest("SimpleMethodBody", 105, null, "booleanKeyword.pass");
1072    }
1073    
1074    public void testEmptyFileBeforeTypingLocalVariableNameInMethodBody() throws Exception JavaDoc {
1075        performTest("SimpleMethodBodyStart", 98, "boolean ", "booleanVarName.pass");
1076    }
1077    
1078    public void testBeforeTypingLocalVariableNameInMethodBody() throws Exception JavaDoc {
1079        performTest("SimpleEmptyMethodBody", 98, "boolean ", "booleanVarName.pass");
1080    }
1081    
1082    public void testBeforeLocalVariableNameInMethodBody() throws Exception JavaDoc {
1083        performTest("SimpleMethodBody", 106, null, "booleanVarName.pass");
1084    }
1085    
1086    public void testEmptyFileTypingLocalVariableNameInMethodBody() throws Exception JavaDoc {
1087        performTest("SimpleMethodBodyStart", 98, "boolean b", "booleanVarName.pass");
1088    }
1089    
1090    public void testTypingLocalVariableNameInMethodBody() throws Exception JavaDoc {
1091        performTest("SimpleEmptyMethodBody", 98, "boolean b", "booleanVarName.pass");
1092    }
1093    
1094    public void testOnLocalVariableNameInMethodBody() throws Exception JavaDoc {
1095        performTest("SimpleMethodBody", 107, null, "booleanVarName.pass");
1096    }
1097    
1098    public void testEmptyFileAfterTypingLocalVariableNameAndSpaceInMethodBody() throws Exception JavaDoc {
1099        performTest("SimpleMethodBodyStart", 98, "boolean b ", "empty.pass");
1100    }
1101    
1102    public void testAfterTypingLocalVariableNameAndSpaceInMethodBody() throws Exception JavaDoc {
1103        performTest("SimpleEmptyMethodBody", 98, "boolean b ", "empty.pass");
1104    }
1105    
1106    public void testAfterLocalVariableNameAndSpaceInMethodBody() throws Exception JavaDoc {
1107        performTest("SimpleMethodBody", 107, " ", "empty.pass");
1108    }
1109    
1110    public void testEmptyFileAfterTypingLocalVariableInMethodBody() throws Exception JavaDoc {
1111        performTest("SimpleMethodBodyStart", 98, "boolean b;", "methodBodyContentAndLocalVar.pass");
1112    }
1113    
1114    public void testAfterTypingLocalVariableInMethodBody() throws Exception JavaDoc {
1115        performTest("SimpleEmptyMethodBody", 98, "boolean b;", "methodBodyContentAndLocalVar.pass");
1116    }
1117    
1118    public void testAfterLocalVariableInMethodBody() throws Exception JavaDoc {
1119        performTest("SimpleMethodBody", 108, null, "methodBodyContentAndLocalVar.pass");
1120    }
1121 
1122    public void testEmptyFileTypingTypeInMethodBody() throws Exception JavaDoc {
1123        performTest("SimpleMethodBodyStart", 98, "Sy", "system.pass");
1124    }
1125    
1126    public void testTypingTypeInMethodBody() throws Exception JavaDoc {
1127        performTest("SimpleEmptyMethodBody", 98, "Sy", "system.pass");
1128    }
1129    
1130    public void testTypeInMethodBody() throws Exception JavaDoc {
1131        performTest("SimpleMethodBody", 112, null, "system.pass");
1132    }
1133    
1134    public void testEmptyFileAfterTypingTypeInMethodBody() throws Exception JavaDoc {
1135        performTest("SimpleMethodBodyStart", 98, "System", "system.pass");
1136    }
1137    
1138    public void testAfterTypingTypeInMethodBody() throws Exception JavaDoc {
1139        performTest("SimpleEmptyMethodBody", 98, "System", "system.pass");
1140    }
1141    
1142    public void testAfterTypeInMethodBody() throws Exception JavaDoc {
1143        performTest("SimpleMethodBody", 116, null, "system.pass");
1144    }
1145    
1146    public void testEmptyFileAfterTypingTypeAndDotInMethodBody() throws Exception JavaDoc {
1147        performTest("SimpleMethodBodyStart", 98, "System.", "systemContent.pass");
1148    }
1149    
1150    public void testAfterTypingTypeAndDotInMethodBody() throws Exception JavaDoc {
1151        performTest("SimpleEmptyMethodBody", 98, "System.", "systemContent.pass");
1152    }
1153    
1154    public void testAfterTypeAndDotInMethodBody() throws Exception JavaDoc {
1155        performTest("SimpleMethodBody", 117, null, "systemContent.pass");
1156    }
1157
1158    public void testEmptyFileTypingFieldAccessInMethodBody() throws Exception JavaDoc {
1159        performTest("SimpleMethodBodyStart", 98, "System.o", "systemOut.pass");
1160    }
1161    
1162    public void testTypingFieldAccessInMethodBody() throws Exception JavaDoc {
1163        performTest("SimpleEmptyMethodBody", 98, "System.o", "systemOut.pass");
1164    }
1165    
1166    public void testFieldAccessInMethodBody() throws Exception JavaDoc {
1167        performTest("SimpleMethodBody", 118, null, "systemOut.pass");
1168    }
1169   
1170    public void testEmptyFileAfterTypingFieldAccessInMethodBody() throws Exception JavaDoc {
1171        performTest("SimpleMethodBodyStart", 98, "System.out", "systemOut.pass");
1172    }
1173    
1174    public void testAfterTypingFieldAccessInMethodBody() throws Exception JavaDoc {
1175        performTest("SimpleEmptyMethodBody", 98, "System.out", "systemOut.pass");
1176    }
1177    
1178    public void testAfterFieldAccessInMethodBody() throws Exception JavaDoc {
1179        performTest("SimpleMethodBody", 120, null, "systemOut.pass");
1180    }
1181    
1182    public void testEmptyFileAfterTypingFieldAccessAndSpaceInMethodBody() throws Exception JavaDoc {
1183        performTest("SimpleMethodBodyStart", 98, "System.out ", "instanceOf.pass");
1184    }
1185    
1186    public void testAfterTypingFieldAccessAndSpaceInMethodBody() throws Exception JavaDoc {
1187        performTest("SimpleEmptyMethodBody", 98, "System.out ", "instanceOf.pass");
1188    }
1189    
1190    public void testAfterFieldAccessAndSpaceInMethodBody() throws Exception JavaDoc {
1191        performTest("SimpleMethodBody", 120, " ", "instanceOf.pass");
1192    }
1193    
1194    public void testEmptyFileAfterTypingFieldAccessAndDotInMethodBody() throws Exception JavaDoc {
1195        performTest("SimpleMethodBodyStart", 98, "System.out.", "systemOutContent.pass");
1196    }
1197    
1198    public void testAfterTypingFieldAccessAndDotInMethodBody() throws Exception JavaDoc {
1199        performTest("SimpleEmptyMethodBody", 98, "System.out.", "systemOutContent.pass");
1200    }
1201    
1202    public void testAfterFieldAccessAndDotInMethodBody() throws Exception JavaDoc {
1203        performTest("SimpleMethodBody", 121, null, "systemOutContent.pass");
1204    }
1205
1206    public void testEmptyFileTypingMethodInvocationInMethodBody() throws Exception JavaDoc {
1207        performTest("SimpleMethodBodyStart", 98, "boolean b;\nSystem.out.println(", "typesLocalMembersVarsAndSmarts.pass");
1208    }
1209    
1210    public void testTypingMethodInvocationInMethodBody() throws Exception JavaDoc {
1211        performTest("SimpleEmptyMethodBody", 98, "boolean b;\nSystem.out.println(", "typesLocalMembersVarsAndSmarts.pass");
1212    }
1213    
1214    public void testMethodInvocationInMethodBody() throws Exception JavaDoc {
1215        performTest("SimpleMethodBody", 129, null, "typesLocalMembersVarsAndSmarts.pass");
1216    }
1217    
1218    public void testEmptyFileTypingMethodInvocationParameterInMethodBody() throws Exception JavaDoc {
1219        performTest("SimpleMethodBodyStart", 98, "boolean b;\nSystem.out.println(b", "typesLocalMembersVarsAndSmartsStartingWithB.pass");
1220    }
1221    
1222    public void testTypingMethodInvocationParameterInMethodBody() throws Exception JavaDoc {
1223        performTest("SimpleEmptyMethodBody", 98, "boolean b;\nSystem.out.println(b", "typesLocalMembersVarsAndSmartsStartingWithB.pass");
1224    }
1225    
1226    public void testOnMethodInvocationParameterInMethodBody() throws Exception JavaDoc {
1227        performTest("SimpleMethodBody", 130, null, "typesLocalMembersVarsAndSmartsStartingWithB.pass");
1228    }
1229    
1230    public void testEmptyFileTypingMethodInvocationParameterAndSpaceInMethodBody() throws Exception JavaDoc {
1231        performTest("SimpleMethodBodyStart", 98, "System.out.println(b ", "empty.pass");
1232    }
1233    
1234    public void testTypingMethodInvocationParameterAndSpaceInMethodBody() throws Exception JavaDoc {
1235        performTest("SimpleEmptyMethodBody", 98, "System.out.println(b ", "empty.pass");
1236    }
1237    
1238    public void testAfterMethodInvocationParameterAndSpaceInMethodBody() throws Exception JavaDoc {
1239        performTest("SimpleMethodBody", 130, " ", "empty.pass");
1240    }
1241    
1242    public void testEmptyFileBeforeTypingSecondMethodInvocationParameterInMethodBody() throws Exception JavaDoc {
1243        performTest("SimpleMethodBodyStart", 98, "boolean b;\nSystem.out.println(b, ", "typesLocalMembersAndVars.pass");
1244    }
1245    
1246    public void testBeforeTypingSecondMethodInvocationParameterInMethodBody() throws Exception JavaDoc {
1247        performTest("SimpleEmptyMethodBody", 98, "boolean b;\nSystem.out.println(b, ", "typesLocalMembersAndVars.pass");
1248    }
1249    
1250    public void testBeforeSecondMethodInvocationParameterInMethodBody() throws Exception JavaDoc {
1251        performTest("SimpleMethodBody", 130, ", ", "typesLocalMembersAndVars.pass");
1252    }
1253    
1254    public void testEmptyFileTypingSecondMethodInvocationParameterInMethodBody() throws Exception JavaDoc {
1255        performTest("SimpleMethodBodyStart", 98, "boolean b;\nSystem.out.println(b, b", "typesLocalMembersAndVarsStartingWithB.pass");
1256    }
1257    
1258    public void testTypingSecondMethodInvocationParameterInMethodBody() throws Exception JavaDoc {
1259        performTest("SimpleEmptyMethodBody", 98, "boolean b;\nSystem.out.println(b, b", "typesLocalMembersAndVarsStartingWithB.pass");
1260    }
1261    
1262    public void testOnSecondMethodInvocationParameterInMethodBody() throws Exception JavaDoc {
1263        performTest("SimpleMethodBody", 130, ", b", "typesLocalMembersAndVarsStartingWithB.pass");
1264    }
1265    
1266    public void testEmptyFileAfterTypingMethodInvocationParametersInMethodBody() throws Exception JavaDoc {
1267        performTest("SimpleMethodBodyStart", 98, "boolean b;\nSystem.out.println(b)", "empty.pass");
1268    }
1269    
1270    public void testAfterTypingMethodInvocationParametersInMethodBody() throws Exception JavaDoc {
1271        performTest("SimpleEmptyMethodBody", 98, "boolean b;\nSystem.out.println(b)", "empty.pass");
1272    }
1273    
1274    public void testAfteMethodInvocationParametersInMethodBody() throws Exception JavaDoc {
1275        performTest("SimpleMethodBody", 131, null, "empty.pass");
1276    }
1277    
1278    public void testEmptyFileAfterTypingMethodInvocationParametersAndSpaceInMethodBody() throws Exception JavaDoc {
1279        performTest("SimpleMethodBodyStart", 98, "boolean b;\nSystem.out.println(b) ", "empty.pass");
1280    }
1281    
1282    public void testAfterTypingMethodInvocationParametersAndSpaceInMethodBody() throws Exception JavaDoc {
1283        performTest("SimpleEmptyMethodBody", 98, "boolean b;\nSystem.out.println(b) ", "empty.pass");
1284    }
1285    
1286    public void testAfteMethodInvocationParametersAndSpaceInMethodBody() throws Exception JavaDoc {
1287        performTest("SimpleMethodBody", 131, " ", "empty.pass");
1288    }
1289    
1290    public void testEmptyFileAfterTypingMethodInvocationInMethodBody() throws Exception JavaDoc {
1291        performTest("SimpleMethodBodyStart", 98, "boolean b;\nSystem.out.println(b);", "methodBodyContentAndLocalVar.pass");
1292    }
1293    
1294    public void testAfterTypingMethodInvocationInMethodBody() throws Exception JavaDoc {
1295        performTest("SimpleEmptyMethodBody", 98, "boolean b;\nSystem.out.println(b);", "methodBodyContentAndLocalVar.pass");
1296    }
1297    
1298    public void testAfteMethodInvocationInMethodBody() throws Exception JavaDoc {
1299        performTest("SimpleMethodBody", 132, null, "methodBodyContentAndLocalVar.pass");
1300    }
1301}
1302
Popular Tags