1 19 20 package org.netbeans.modules.java.editor.completion; 21 22 26 public class JavaCompletionProviderBasicTest extends CompletionTestBase { 27 28 public JavaCompletionProviderBasicTest(String testName) { 29 super(testName); 30 } 31 32 34 public void testEmptyFile() throws Exception { 35 performTest("Empty", 0, null, "topLevelKeywords.pass"); 36 } 37 38 public void testFileBeginning() throws Exception { 39 performTest("Simple", 0, null, "topLevelKeywords.pass"); 40 } 41 42 44 public void testEmptyFileTypingPackageKeyword() throws Exception { 45 performTest("Empty", 0, "p", "topLevelKeywordsStartingWithP.pass"); 46 } 47 48 public void testTypingPackageKeyword() throws Exception { 49 performTest("SimpleNoPackage", 0, "p", "topLevelKeywordsStartingWithP.pass"); 50 } 51 52 public void testOnPackageKeyword() throws Exception { 53 performTest("Simple", 1, null, "topLevelKeywordsStartingWithP.pass"); 54 } 55 56 public void testEmptyFileAfterTypingPackageKeyword() throws Exception { 57 performTest("Empty", 0, "package", "packageKeyword.pass"); 58 } 59 60 public void testAfterTypingPackageKeyword() throws Exception { 61 performTest("SimpleNoPackage", 0, "package", "packageKeyword.pass"); 62 } 63 64 public void testAfterPackageKeyword() throws Exception { 65 performTest("Simple", 7, null, "packageKeyword.pass"); 66 } 67 68 public void testEmptyFileBeforeTypingPackageId() throws Exception { 69 performTest("Empty", 0, "package ", "allPackages.pass"); 70 } 71 72 public void testBeforeTypingPackageId() throws Exception { 73 performTest("SimpleNoPackage", 0, "package ", "allPackages.pass"); 74 } 75 76 public void testBeforePackageId() throws Exception { 77 performTest("Simple", 8, null, "allPackages.pass"); 78 } 79 80 public void testEmptyFileTypingPackageId() throws Exception { 81 performTest("Empty", 0, "package t", "empty.pass"); 82 } 83 84 public void testTypingPackageId() throws Exception { 85 performTest("SimpleNoPackage", 0, "package t", "empty.pass"); 86 } 87 88 public void testOnPackageId() throws Exception { 89 performTest("Simple", 9, null, "empty.pass"); 90 } 91 92 public void testEmptyFileAfterTypingPackageId() throws Exception { 93 performTest("Empty", 0, "package test", "empty.pass"); 94 } 95 96 public void testAfterTypingPackageId() throws Exception { 97 performTest("SimpleNoPackage", 0, "package test", "empty.pass"); 98 } 99 100 public void testAfterPackageId() throws Exception { 101 performTest("Simple", 12, null, "empty.pass"); 102 } 103 104 public void testEmptyFileAfterTypingPackageIdAndSpace() throws Exception { 105 performTest("Empty", 0, "package test ", "empty.pass"); 106 } 107 108 public void testAfterTypingPackageIdAndSpace() throws Exception { 109 performTest("SimpleNoPackage", 0, "package test ", "empty.pass"); 110 } 111 112 public void testAfterPackageIdAndSpace() throws Exception { 113 performTest("Simple", 12, " ", "empty.pass"); 114 } 115 116 public void testEmptyFileAfterTypingPackageDecl() throws Exception { 117 performTest("Empty", 0, "package test;", "topLevelKeywordsWithoutPackage.pass"); 118 } 119 120 public void testAfterTypingPackageDecl() throws Exception { 121 performTest("SimpleNoPackage", 0, "package test;", "topLevelKeywordsWithoutPackage.pass"); 122 } 123 124 public void testAfterPackageDecl() throws Exception { 125 performTest("Simple", 13, null, "topLevelKeywordsWithoutPackage.pass"); 126 } 127 128 130 public void testEmptyFileAfterTypingImportKeyword() throws Exception { 131 performTest("Empty", 0, "import", "importKeyword.pass"); 132 } 133 134 public void testAfterTypingImportKeyword() throws Exception { 135 performTest("Simple", 14, "import", "importKeyword.pass"); 136 } 137 138 public void testAfterImportKeyword() throws Exception { 139 performTest("Import", 21, null, "importKeyword.pass"); 140 } 141 142 public void testEmptyFileBeforeTypingImportedPackage() throws Exception { 143 performTest("Empty", 0, "import ", "staticKeywordAndAllPackages.pass"); 144 } 145 146 public void testBeforeTypingImportedPackage() throws Exception { 147 performTest("Simple", 14, "import ", "staticKeywordAndAllPackages.pass"); 148 } 149 150 public void testBeforeImportedPackage() throws Exception { 151 performTest("Import", 22, null, "staticKeywordAndAllPackages.pass"); 152 } 153 154 public void testEmptyFileTypingImportedPackage() throws Exception { 155 performTest("Empty", 0, "import j", "packagesStartingWithJ.pass"); 156 } 157 158 public void testTypingImportedPackage() throws Exception { 159 performTest("Simple", 14, "import j", "packagesStartingWithJ.pass"); 160 } 161 162 public void testOnImportedPackage() throws Exception { 163 performTest("Import", 23, null, "packagesStartingWithJ.pass"); 164 } 165 166 public void testEmptyFileTypingImportedPackageBeforeStar() throws Exception { 167 performTest("Empty", 0, "import java.util.", "javaUtilContent.pass"); 168 } 169 170 public void testTypingImportedPackageBeforeStar() throws Exception { 171 performTest("Simple", 14, "import java.util.", "javaUtilContent.pass"); 172 } 173 174 public void testOnImportedPackageBeforeStar() throws Exception { 175 performTest("Import", 54, null, "javaUtilContent.pass"); 176 } 177 178 public void testEmptyFileAfterTypingImportedPackage() throws Exception { 179 performTest("Empty", 0, "import java.util.*", "empty.pass"); 180 } 181 182 public void testAfterTypingImportedPackage() throws Exception { 183 performTest("Simple", 14, "import java.util.*", "empty.pass"); 184 } 185 186 public void testAfterImportedPackage() throws Exception { 187 performTest("Import", 55, null, "empty.pass"); 188 } 189 190 public void testEmptyFileAfterTypingImportedClass() throws Exception { 191 performTest("Empty", 0, "import java.awt.List", "list.pass"); 192 } 193 194 public void testAfterTypingImportedClass() throws Exception { 195 performTest("Simple", 14, "import java.awt.List", "list.pass"); 196 } 197 198 public void testAfterImportedClass() throws Exception { 199 performTest("Import", 35, null, "list.pass"); 200 } 201 202 public void testEmptyFileAfterTypingImportedClassAndSpace() throws Exception { 203 performTest("Empty", 0, "import java.awt.List ", "empty.pass"); 204 } 205 206 public void testAfterTypingImportedClassAndSpace() throws Exception { 207 performTest("Simple", 14, "import java.awt.List ", "empty.pass"); 208 } 209 210 public void testAfterImportedClassAndSpace() throws Exception { 211 performTest("Import", 35, " ", "empty.pass"); 212 } 213 214 public void testEmptyFileAfterTypingImportStatement() throws Exception { 215 performTest("Empty", 0, "import java.awt.List;", "topLevelKeywordsWithoutPackage.pass"); 216 } 217 218 public void testAfterTypingImportStatement() throws Exception { 219 performTest("Simple", 14, "import java.awt.List;", "topLevelKeywordsWithoutPackage.pass"); 220 } 221 222 public void testAfterImportStatement() throws Exception { 223 performTest("Import", 36, null, "topLevelKeywordsWithoutPackage.pass"); 224 } 225 226 public void testEmptyFileTypingStaticImportKeyword() throws Exception { 227 performTest("Empty", 0, "import st", "staticKeyword.pass"); 228 } 229 230 public void testTypingStaticImportKeyword() throws Exception { 231 performTest("Simple", 14, "import st", "staticKeyword.pass"); 232 } 233 234 public void testOnStaticImportKeyword() throws Exception { 235 performTest("Import", 66, null, "staticKeyword.pass"); 236 } 237 238 public void testEmptyFileAfterTypingStaticImportKeyword() throws Exception { 239 performTest("Empty", 0, "import static", "staticKeyword.pass"); 240 } 241 242 public void testAfterTypingStaticImportKeyword() throws Exception { 243 performTest("Simple", 14, "import static", "staticKeyword.pass"); 244 } 245 246 public void testAfterStaticImportKeyword() throws Exception { 247 performTest("Import", 70, null, "staticKeyword.pass"); 248 } 249 250 public void testEmptyFileBeforeTypingStaticallyImportedClass() throws Exception { 251 performTest("Empty", 0, "import static ", "allPackages.pass"); 252 } 253 254 public void testBeforeTypingStaticallyImportedClass() throws Exception { 255 performTest("Simple", 14, "import static ", "allPackages.pass"); 256 } 257 258 public void testBeforeStaticallyImportedClass() throws Exception { 259 performTest("Import", 71, null, "allPackages.pass"); 260 } 261 262 public void testEmptyFileTypingImportedPackageAfterErrorInPackageDeclaration() throws Exception { 263 performTest("Empty", 0, "package \nimport j", "packagesStartingWithJ.pass"); 264 } 265 266 public void testTypingStaticImportAfterErrorInPackageDeclaration() throws Exception { 267 performTest("SimpleNoPackage", 0, "package \nimport ", "staticKeywordAndAllPackages.pass"); 268 } 269 270 public void testTypingStaticImportAfterErrorInPreviousImportDeclaration() throws Exception { 271 performTest("Simple", 14, "im\nimport ", "staticKeywordAndAllPackages.pass"); 272 } 273 274 276 public void testEmptyFileAfterTypingPublicKeyword() throws Exception { 277 performTest("Empty", 0, "package test;\npublic", "publicKeyword.pass"); 278 } 279 280 public void testAfterPublicKeyword() throws Exception { 281 performTest("Simple", 21, null, "publicKeyword.pass"); 282 } 283 284 public void testTypingFinalClass() throws Exception { 285 performTest("Simple", 21, " f", "finalKeyword.pass"); 286 } 287 288 public void testAfterTypingFinalClass() throws Exception { 289 performTest("Simple", 21, " final", "finalKeyword.pass"); 290 } 291 292 public void testEmptyFileBeforeTypingClassKeyword() throws Exception { 293 performTest("Empty", 0, "package test;\npublic ", "classModifiersWithoutPublic.pass"); 294 } 295 296 public void testBeforeClassKeyword() throws Exception { 297 performTest("Simple", 22, null, "classModifiersWithoutPublic.pass"); 298 } 299 300 public void testEmptyFileTypingClassKeyword() throws Exception { 301 performTest("Empty", 0, "package test;\npublic c", "classKeyword.pass"); 302 } 303 304 public void testOnClassKeyword() throws Exception { 305 performTest("Simple", 23, null, "classKeyword.pass"); 306 } 307 308 public void testEmptyFileAfterTypingClassKeyword() throws Exception { 309 performTest("Empty", 0, "package test;\npublic class", "classKeyword.pass"); 310 } 311 312 public void testAfterClassKeyword() throws Exception { 313 performTest("Simple", 27, null, "classKeyword.pass"); 314 } 315 316 public void testEmptyFileBeforeTypingClassName() throws Exception { 317 performTest("Empty", 0, "package test;\npublic class ", "empty.pass"); 318 } 319 320 public void testBeforeClassName() throws Exception { 321 performTest("Simple", 28, null, "empty.pass"); 322 } 323 324 public void testEmptyFileTypingClassName() throws Exception { 325 performTest("Empty", 0, "package test;\npublic class T", "empty.pass"); 326 } 327 328 public void testOnClassName() throws Exception { 329 performTest("Simple", 29, null, "empty.pass"); 330 } 331 332 public void testEmptyAfterFileTypingClassName() throws Exception { 333 performTest("Empty", 0, "package test;\npublic class Test", "empty.pass"); 334 } 335 336 public void testAfterClassName() throws Exception { 337 performTest("Simple", 32, null, "empty.pass"); 338 } 339 340 public void testEmptyFileBeforeTypingExtendsKeyword() throws Exception { 341 performTest("Empty", 0, "package test;\npublic class Test ", "extendsAndImplementsKeywords.pass"); 342 } 343 344 public void testBeforeTypingExtendsKeyword() throws Exception { 345 performTest("SimpleNoExtendsAndImplements", 33, null, "extendsAndImplementsKeywords.pass"); 346 } 347 348 public void testBeforeExtendsKeyword() throws Exception { 349 performTest("Simple", 33, null, "extendsAndImplementsKeywords.pass"); 350 } 351 352 public void testEmptyFileTypingExtendsKeyword() throws Exception { 353 performTest("Empty", 0, "package test;\npublic class Test e", "extendsKeyword.pass"); 354 } 355 356 public void testTypingExtendsKeyword() throws Exception { 357 performTest("SimpleNoExtendsAndImplements", 33, "e", "extendsKeyword.pass"); 358 } 359 360 public void testOnExtendsKeyword() throws Exception { 361 performTest("Simple", 34, null, "extendsKeyword.pass"); 362 } 363 364 public void testEmptyFileAfterTypingExtendsKeyword() throws Exception { 365 performTest("Empty", 0, "package test;\npublic class Test extends", "extendsKeyword.pass"); 366 } 367 368 public void testAfterTypingExtendsKeyword() throws Exception { 369 performTest("SimpleNoExtendsAndImplements", 33, "extends", "extendsKeyword.pass"); 370 } 371 372 public void testAfterExtendsKeyword() throws Exception { 373 performTest("Simple", 40, null, "extendsKeyword.pass"); 374 } 375 376 public void testEmptyFileBeforeTypingExtendedObject() throws Exception { 377 performTest("Empty", 0, "package test;\npublic class Test extends ", "javaLangClasses.pass"); 378 } 379 380 public void testBeforeTypingExtendedObject() throws Exception { 381 performTest("SimpleNoExtendsAndImplements", 33, "extends ", "javaLangClasses.pass"); 382 } 383 384 public void testBeforeExtendedObject() throws Exception { 385 performTest("Simple", 41, null, "javaLangClasses.pass"); 386 } 387 388 public void testEmptyFileTypingExtendedObject() throws Exception { 389 performTest("Empty", 0, "package test;\npublic class Test extends O", "javaLangClassesStartingWithO.pass"); 390 } 391 392 public void testTypingExtendedObject() throws Exception { 393 performTest("SimpleNoExtendsAndImplements", 33, "extends O", "javaLangClassesStartingWithO.pass"); 394 } 395 396 public void testOnExtendedObject() throws Exception { 397 performTest("Simple", 42, null, "javaLangClassesStartingWithO.pass"); 398 } 399 400 public void testEmptyFileAfterTypingExtendedObject() throws Exception { 401 performTest("Empty", 0, "package test;\npublic class Test extends Object", "object.pass"); 402 } 403 404 public void testAfterTypingExtendedObject() throws Exception { 405 performTest("SimpleNoExtendsAndImplements", 33, "extends Object", "object.pass"); 406 } 407 408 public void testAfterExtendedObject() throws Exception { 409 performTest("Simple", 47, null, "object.pass"); 410 } 411 412 public void testEmptyFileBeforeTypingImplementsKeyword() throws Exception { 413 performTest("Empty", 0, "package test;\npublic class Test extends Object ", "implementsKeyword.pass"); 414 } 415 416 public void testBeforeTypingImplementsKeyword() throws Exception { 417 performTest("SimpleNoExtendsAndImplements", 33, "extends Object ", "implementsKeyword.pass"); 418 } 419 420 public void testBeforeImplementsKeyword() throws Exception { 421 performTest("Simple", 48, null, "implementsKeyword.pass"); 422 } 423 424 public void testEmptyFileTypingImplementsKeyword() throws Exception { 425 performTest("Empty", 0, "package test;\npublic class Test extends Object i", "implementsKeyword.pass"); 426 } 427 428 public void testTypingImplementsKeyword() throws Exception { 429 performTest("SimpleNoExtendsAndImplements", 33, "i", "implementsKeyword.pass"); 430 } 431 432 public void testOnImplementsKeyword() throws Exception { 433 performTest("Simple", 49, null, "implementsKeyword.pass"); 434 } 435 436 public void testEmptyFileAfteTypingImplementsKeyword() throws Exception { 437 performTest("Empty", 0, "package test;\npublic class Test extends Object implements", "implementsKeyword.pass"); 438 } 439 440 public void testAfterTypingImplementsKeyword() throws Exception { 441 performTest("SimpleNoExtendsAndImplements", 33, "implements", "implementsKeyword.pass"); 442 } 443 444 public void testAfterImplementsKeyword() throws Exception { 445 performTest("Simple", 58, null, "implementsKeyword.pass"); 446 } 447 448 public void testEmptyFileBeforeTypingImplementedInterface() throws Exception { 449 performTest("Empty", 0, "package test;\npublic class Test extends Object implements ", "javaLangInterfaces.pass"); 450 } 451 452 public void testBeforeTypingImplementedInterface() throws Exception { 453 performTest("SimpleNoExtendsAndImplements", 33, "implements ", "javaLangInterfaces.pass"); 454 } 455 456 public void testBeforeImplementedInterface() throws Exception { 457 performTest("Simple", 59, null, "javaLangInterfaces.pass"); 458 } 459 460 public void testEmptyFileAfterTypingImplementedInterface() throws Exception { 461 performTest("Empty", 0, "package test;\npublic class Test extends Object implements Cloneable", "cloneable.pass"); 462 } 463 464 public void testAfterTypingImplementedInterface() throws Exception { 465 performTest("SimpleNoExtendsAndImplements", 33, "implements Cloneable", "cloneable.pass"); 466 } 467 468 public void testAfterImplementedInterface() throws Exception { 469 performTest("Simple", 68, null, "cloneable.pass"); 470 } 471 472 public void testEmptyFileAfterTypingImplementedInterfaceAndSpace() throws Exception { 473 performTest("Empty", 0, "package test;\npublic class Test extends Object implements Cloneable ", "empty.pass"); 474 } 475 476 public void testAfterTypingImplementedInterfaceAndSpace() throws Exception { 477 performTest("SimpleNoExtendsAndImplements", 33, "implements Cloneable ", "empty.pass"); 478 } 479 480 public void testAfterImplementedInterfaceAndSpace() throws Exception { 481 performTest("Simple", 68, " ", "empty.pass"); 482 } 483 484 public void testEmptyFileAfterTypingFirstImplementedInterface() throws Exception { 485 performTest("Empty", 0, "package test;\npublic class Test extends Object implements Cloneable, ", "javaLangInterfaces.pass"); 486 } 487 488 public void testAfterTypingFirstImplementedInterface() throws Exception { 489 performTest("SimpleNoExtendsAndImplements", 33, "implements Cloneable, ", "javaLangInterfaces.pass"); 490 } 491 492 public void testAfterFirstImplementedInterface() throws Exception { 493 performTest("Simple", 70, null, "javaLangInterfaces.pass"); 494 } 495 496 public void testEmptyFileTypingSecondImplementedInterface() throws Exception { 497 performTest("Empty", 0, "package test;\npublic class Test extends Object implements Cloneable, R", "javaLangInterfacesStartingWithR.pass"); 498 } 499 500 public void testTypingSecondImplementedInterface() throws Exception { 501 performTest("SimpleNoExtendsAndImplements", 33, "implements Cloneable, R", "javaLangInterfacesStartingWithR.pass"); 502 } 503 504 public void testOnSecondImplementedInterface() throws Exception { 505 performTest("Simple", 71, null, "javaLangInterfacesStartingWithR.pass"); 506 } 507 508 public void testEmptyFileTypingClassBody() throws Exception { 509 performTest("Empty", 0, "package test;\npublic class Test {", "memberModifiersTypesAndGenElements.pass"); 510 } 511 512 public void testInClassBody() throws Exception { 513 performTest("Simple", 80, null, "memberModifiersTypesAndGenElements2.pass"); 514 } 515 516 public void testEmptyFileAfterTypingClassBody() throws Exception { 517 performTest("Empty", 0, "package test;\npublic class Test {\n}", "classModifiersWithoutPublic.pass"); 518 } 519 520 public void testAfterClassBody() throws Exception { 521 performTest("Simple", 82, null, "classModifiersWithoutPublic.pass"); 522 } 523 524 public void testEmptyFileAfterTypingIncompleteClassBodyAndSecondClassKeyword() throws Exception { 525 performTest("Empty", 0, "package test;\npublic class Test {\nclass", "classKeyword.pass"); 526 } 527 528 530 public void testEmptyFileAfterTypingIntefaceName() throws Exception { 531 performTest("Empty", 0, "package test;\ninterface Test ", "extendsKeyword.pass"); 532 } 533 534 public void testAfterTypingIntefaceName() throws Exception { 535 performTest("SimpleInterfaceNoExtends", 30, null, "extendsKeyword.pass"); 536 } 537 538 public void testAfterIntefaceName() throws Exception { 539 performTest("SimpleInterface", 30, null, "extendsKeyword.pass"); 540 } 541 542 public void testEmptyFileAfterTypingExtendsInInteface() throws Exception { 543 performTest("Empty", 0, "package test;\ninterface Test extends ", "javaLangInterfaces.pass"); 544 } 545 546 public void testAfterTypingExtendsInInterface() throws Exception { 547 performTest("SimpleInterfaceNoExtends", 30, "extends ", "javaLangInterfaces.pass"); 548 } 549 550 public void testAfterExtendsInInteface() throws Exception { 551 performTest("SimpleInterface", 38, null, "javaLangInterfaces.pass"); 552 } 553 554 556 public void testEmptyFileAfterTypingEnumName() throws Exception { 557 performTest("Empty", 0, "package test;\npublic enum Test ", "implementsKeyword.pass"); 558 } 559 560 public void testAfterTypingEnumName() throws Exception { 561 performTest("SimpleEnumNoImplements", 32, null, "implementsKeyword.pass"); 562 } 563 564 public void testAfterEnumName() throws Exception { 565 performTest("SimpleEnum", 32, null, "implementsKeyword.pass"); 566 } 567 568 public void testEmptyFileAfterTypingImplementsInEnum() throws Exception { 569 performTest("Empty", 0, "package test;\npublic enum Test implements ", "javaLangInterfaces.pass"); 570 } 571 572 public void testAfterTypingImplementsInEnum() throws Exception { 573 performTest("SimpleEnumNoImplements", 43, null, "javaLangInterfaces.pass"); 574 } 575 576 public void testAfterImplementsInEnum() throws Exception { 577 performTest("SimpleEnum", 43, null, "javaLangInterfaces.pass"); 578 } 579 580 582 public void testEmptyFileTypingPublicKeywordInMethodDecl() throws Exception { 583 performTest("MethodStart", 40, "p", "memberModifiersStartingWithP.pass"); 584 } 585 586 public void testOnPublicKeywordInMethodDecl() throws Exception { 587 performTest("Method", 41, null, "memberModifiersStartingWithP.pass"); 588 } 589 590 public void testEmptyFileAfterTypingPublicKeywordInMethodDecl() throws Exception { 591 performTest("MethodStart", 40, "public", "publicKeyword.pass"); 592 } 593 594 public void testAfterPublicKeywordInMethodDecl() throws Exception { 595 performTest("Method", 46, null, "publicKeyword.pass"); 596 } 597 598 public void testTypingStaticMethodDecl() throws Exception { 599 performTest("Method", 46, " sta", "staticKeyword.pass"); 600 } 601 602 public void testAfterTypingStaticMethodDecl() throws Exception { 603 performTest("Method", 46, " static", "staticKeyword.pass"); 604 } 605 606 public void testEmptyFileBeforeTypingReturnValue() throws Exception { 607 performTest("MethodStart", 40, "public ", "memberModifiersAndTypesWithoutPublic.pass"); 608 } 609 610 public void testBeforeReturnValue() throws Exception { 611 performTest("Method", 47, null, "memberModifiersAndTypesWithoutPublic.pass"); 612 } 613 614 public void testEmptyFileTypingReturnValue() throws Exception { 615 performTest("MethodStart", 40, "public voi", "voidKeyword.pass"); 616 } 617 618 public void testOnReturnValue() throws Exception { 619 performTest("Method", 50, null, "voidKeyword.pass"); 620 } 621 622 public void testEmptyFileAfterTypingReturnValue() throws Exception { 623 performTest("MethodStart", 40, "public void", "voidKeyword.pass"); 624 } 625 626 public void testAfterReturnValue() throws Exception { 627 performTest("Method", 51, null, "voidKeyword.pass"); 628 } 629 630 public void testEmptyFileBeforeTypingMethodName() throws Exception { 631 performTest("MethodStart", 40, "public void ", "empty.pass"); 632 } 633 634 public void testBeforeMethodName() throws Exception { 635 performTest("Method", 52, null, "empty.pass"); 636 } 637 638 public void testEmptyFileTypingMethodName() throws Exception { 639 performTest("MethodStart", 40, "public void o", "empty.pass"); 640 } 641 642 public void testOnMethodName() throws Exception { 643 performTest("Method", 53, null, "empty.pass"); 644 } 645 646 public void testEmptyFileAfterTypingMethodName() throws Exception { 647 performTest("MethodStart", 40, "public void op", "empty.pass"); 648 } 649 650 public void testAfterMethodName() throws Exception { 651 performTest("Method", 54, null, "empty.pass"); 652 } 653 654 public void testEmptyFileBeforeTypingFirstParameter() throws Exception { 655 performTest("MethodStart", 40, "public void op(", "parameterTypes.pass"); 656 } 657 658 public void testBeforeTypingFirstParameter() throws Exception { 659 performTest("MethodNoParamsAndThrows", 55, null, "parameterTypes.pass"); 660 } 661 662 public void testBeforeFirstParameter() throws Exception { 663 performTest("Method", 55, null, "parameterTypes.pass"); 664 } 665 666 public void testEmptyFileTypingFirstParameterType() throws Exception { 667 performTest("MethodStart", 40, "public void op(i", "intKeyword.pass"); 668 } 669 670 public void testTypingFirstParameterType() throws Exception { 671 performTest("MethodNoParamsAndThrows", 55, "i", "intKeyword.pass"); 672 } 673 674 public void testOnFirstParameterType() throws Exception { 675 performTest("Method", 56, null, "intKeyword.pass"); 676 } 677 678 public void testEmptyFileAfterTypingFirstParameterType() throws Exception { 679 performTest("MethodStart", 40, "public void op(int", "intKeyword.pass"); 680 } 681 682 public void testAfterTypingFirstParameterType() throws Exception { 683 performTest("MethodNoParamsAndThrows", 55, "int", "intKeyword.pass"); 684 } 685 686 public void testAfterFirstParameterType() throws Exception { 687 performTest("Method", 58, null, "intKeyword.pass"); 688 } 689 690 public void testEmptyFileBeforeTypingFirstParameterName() throws Exception { 691 performTest("MethodStart", 40, "public void op(int ", "intVarName.pass"); 692 } 693 694 public void testBeforeTypingFirstParameterName() throws Exception { 695 performTest("MethodNoParamsAndThrows", 55, "int ", "intVarName.pass"); 696 } 697 698 public void testBeforeFirstParameterName() throws Exception { 699 performTest("Method", 59, null, "intVarName.pass"); 700 } 701 702 public void testEmptyFileTypingFirstParameterName() throws Exception { 703 performTest("MethodStart", 40, "public void op(int a", "aI.pass"); 704 } 705 706 public void testTypingFirstParameterName() throws Exception { 707 performTest("MethodNoParamsAndThrows", 55, "int a", "aI.pass"); 708 } 709 710 public void testOnFirstParameterName() throws Exception { 711 performTest("Method", 60, null, "aI.pass"); 712 } 713 714 public void testEmptyFileAfterTypingFirstParameterNameAndSpace() throws Exception { 715 performTest("MethodStart", 40, "public void op(int a ", "empty.pass"); 716 } 717 718 public void testAfterTypingFirstParameterNameAndSpace() throws Exception { 719 performTest("MethodNoParamsAndThrows", 55, "int a ", "empty.pass"); 720 } 721 722 public void testAfterFirstParameterNameAndSpace() throws Exception { 723 performTest("Method", 60, " ", "empty.pass"); 724 } 725 726 public void testEmptyFileBeforeTypingSecondParameter() throws Exception { 727 performTest("MethodStart", 40, "public void op(int a,", "parameterTypes.pass"); 728 } 729 730 public void testBeforeTypingSecondParameter() throws Exception { 731 performTest("MethodNoParamsAndThrows", 55, "int a,", "parameterTypes.pass"); 732 } 733 734 public void testBeforeSecondParameter() throws Exception { 735 performTest("Method", 61, null, "parameterTypes.pass"); 736 } 737 738 public void testEmptyFileTypingSecondParameterType() throws Exception { 739 performTest("MethodStart", 40, "public void op(int a, bo", "booleanKeyword.pass"); 740 } 741 742 public void testTypingSecondParameterType() throws Exception { 743 performTest("MethodNoParamsAndThrows", 55, "int a, bo", "booleanKeyword.pass"); 744 } 745 746 public void testOnSecondParameterType() throws Exception { 747 performTest("Method", 64, null, "booleanKeyword.pass"); 748 } 749 750 public void testEmptyFileAfterTypingSecondParameterType() throws Exception { 751 performTest("MethodStart", 40, "public void op(int a, boolean", "booleanKeyword.pass"); 752 } 753 754 public void testAfterTypingSecondParameterType() throws Exception { 755 performTest("MethodNoParamsAndThrows", 55, "int a, boolean", "booleanKeyword.pass"); 756 } 757 758 public void testAfterSecondParameterType() throws Exception { 759 performTest("Method", 69, null, "booleanKeyword.pass"); 760 } 761 762 public void testEmptyFileBeforeTypingSecondParameterName() throws Exception { 763 performTest("MethodStart", 40, "public void op(int a, boolean ", "booleanVarName.pass"); 764 } 765 766 public void testBeforeTypingSecondParameterName() throws Exception { 767 performTest("MethodNoParamsAndThrows", 55, "int a, boolean ", "booleanVarName.pass"); 768 } 769 770 public void testBeforeSecondParameterName() throws Exception { 771 performTest("Method", 70, null, "booleanVarName.pass"); 772 } 773 774 public void testEmptyFileTypingSecondParameterName() throws Exception { 775 performTest("MethodStart", 40, "public void op(int a, boolean b", "booleanVarName.pass"); 776 } 777 778 public void testTypingSecondParameterName() throws Exception { 779 performTest("MethodNoParamsAndThrows", 55, "int a, boolean b", "booleanVarName.pass"); 780 } 781 782 public void testOnSecondParameterName() throws Exception { 783 performTest("Method", 71, null, "booleanVarName.pass"); 784 } 785 786 public void testEmptyFileBeforeTypingThrowsKeyword() throws Exception { 787 performTest("MethodStart", 40, "public void op() ", "throwsKeyword.pass"); 788 } 789 790 public void testBeforeTypingThrowsKeyword() throws Exception { 791 performTest("MethodNoParamsAndThrows", 56, " ", "throwsKeyword.pass"); 792 } 793 794 public void testBeforeThrowsKeyword() throws Exception { 795 performTest("Method", 73, null, "throwsKeyword.pass"); 796 } 797 798 public void testEmptyFileTypingThrowsKeyword() throws Exception { 799 performTest("MethodStart", 40, "public void op() t", "throwsKeyword.pass"); 800 } 801 802 public void testTypingThrowsKeyword() throws Exception { 803 performTest("MethodNoParamsAndThrows", 56, " t", "throwsKeyword.pass"); 804 } 805 806 public void testOnThrowsKeyword() throws Exception { 807 performTest("Method", 74, null, "throwsKeyword.pass"); 808 } 809 810 public void testEmptyAfterFileTypingThrowsKeyword() throws Exception { 811 performTest("MethodStart", 40, "public void op() throws", "throwsKeyword.pass"); 812 } 813 814 public void testAfterTypingThrowsKeyword() throws Exception { 815 performTest("MethodNoParamsAndThrows", 56, " throws", "throwsKeyword.pass"); 816 } 817 818 public void testAfterThrowsKeyword() throws Exception { 819 performTest("Method", 79, null, "throwsKeyword.pass"); 820 } 821 822 public void testEmptyFileBeforeTypingThrownException() throws Exception { 823 performTest("MethodStart", 40, "public void op() throws ", "javaLangThrowables.pass"); 824 } 825 826 public void testBeforeTypingThrownException() throws Exception { 827 performTest("MethodNoParamsAndThrows", 56, "throws ", "javaLangThrowables.pass"); 828 } 829 830 public void testBeforeThrownException() throws Exception { 831 performTest("Method", 80, null, "javaLangThrowables.pass"); 832 } 833 834 public void testEmptyFileTypingThrownException() throws Exception { 835 performTest("MethodStart", 40, "public void op() throws N", "javaLangThrowablesStartingWithN.pass"); 836 } 837 838 public void testTypingThrownException() throws Exception { 839 performTest("MethodNoParamsAndThrows", 56, "throws N", "javaLangThrowablesStartingWithN.pass"); 840 } 841 842 public void testOnThrownException() throws Exception { 843 performTest("Method", 81, null, "javaLangThrowablesStartingWithN.pass"); 844 } 845 846 public void testEmptyFileAfterTypingThrownException() throws Exception { 847 performTest("MethodStart", 40, "public void op() throws NullPointerException", "nullPointerException.pass"); 848 } 849 850 public void testAfterTypingThrownException() throws Exception { 851 performTest("MethodNoParamsAndThrows", 56, "throws NullPointerException", "nullPointerException.pass"); 852 } 853 854 public void testAfterThrownException() throws Exception { 855 performTest("Method", 100, null, "nullPointerException.pass"); 856 } 857 858 public void testEmptyFileAfterTypingThrownExceptionAndSpace() throws Exception { 859 performTest("MethodStart", 40, "public void op() throws NullPointerException ", "empty.pass"); 860 } 861 862 public void testAfterTypingThrownExceptionAndSpace() throws Exception { 863 performTest("MethodNoParamsAndThrows", 56, "throws NullPointerException ", "empty.pass"); 864 } 865 866 public void testAfterThrownExceptionAndSpace() throws Exception { 867 performTest("Method", 100, " ", "empty.pass"); 868 } 869 870 public void testEmptyFileBeforeTypingSecondThrownException() throws Exception { 871 performTest("MethodStart", 40, "public void op() throws NullPointerException, ", "javaLangThrowables.pass"); 872 } 873 874 public void testBeforeTypingSecondThrownException() throws Exception { 875 performTest("MethodNoParamsAndThrows", 56, "throws NullPointerException, ", "javaLangThrowables.pass"); 876 } 877 878 public void testBeforeSecondThrownExceptionAndSpace() throws Exception { 879 performTest("Method", 102, null, "javaLangThrowables.pass"); 880 } 881 882 public void testEmptyFileTypingSecondThrownException() throws Exception { 883 performTest("MethodStart", 40, "public void op() throws NullPointerException, I", "javaLangThrowablesStartingWithI.pass"); 884 } 885 886 public void testTypingSecondThrownException() throws Exception { 887 performTest("MethodNoParamsAndThrows", 56, "throws NullPointerException, I", "javaLangThrowablesStartingWithI.pass"); 888 } 889 890 public void testOnSecondThrownException() throws Exception { 891 performTest("Method", 103, null, "javaLangThrowablesStartingWithI.pass"); 892 } 893 894 public void testEmptyFileAfterTypingMethodBody() throws Exception { 895 performTest("MethodStart", 40, "public void op() {\n}", "memberModifiersTypesAndGenElements.pass"); 896 } 897 898 public void testAfterMethodBody() throws Exception { 899 performTest("Method", 131, null, "memberModifiersTypesAndGenElements.pass"); 900 } 901 902 public void testEmptyFileAfterTypingIncompleteMethodBodyAndPublicKeyword() throws Exception { 903 performTest("MethodStart", 40, "public void op() {\npublic", "empty.pass"); 904 } 905 906 public void testEmptyFileAfterTypingIncompleteMethodBodyAndPublicKeywordAndSpace() throws Exception { 907 performTest("MethodStart", 40, "public void op() {\npublic ", "memberModifiersAndTypesWithoutPublic.pass"); 908 } 909 910 912 public void testEmptyFileAfterTypingFieldNameAndSpace() throws Exception { 913 performTest("MethodStart", 40, "public int field ", "empty.pass"); 914 } 915 916 public void testAfterTypingFieldNameAndSpace() throws Exception { 917 performTest("FieldNoInit", 56, " ", "empty.pass"); 918 } 919 920 public void testAfterFieldNameAndSpace() throws Exception { 921 performTest("Field", 57, null, "empty.pass"); 922 } 923 924 public void testEmptyFileAfterTypingAssignmentInField() throws Exception { 925 performTest("MethodStart", 40, "public static int staticField = 10;\npublic int field =", "typesLocalMembersAndSmartInt.pass"); 926 } 927 928 public void testAfterTypingAssignmentInField() throws Exception { 929 performTest("FieldNoInit", 56, " =", "typesLocalMembersAndSmartInt.pass"); 930 } 931 932 public void testAfterAssignmentInField() throws Exception { 933 performTest("Field", 58, null, "typesLocalMembersAndSmartInt.pass"); 934 } 935 936 public void testEmptyFileBeforeTypingInitOfField() throws Exception { 937 performTest("MethodStart", 40, "public static int staticField = 10;\npublic int field = ", "typesLocalMembersAndSmartInt.pass"); 938 } 939 940 public void testBeforeTypingInitOfField() throws Exception { 941 performTest("FieldNoInit", 56, " = ", "typesLocalMembersAndSmartInt.pass"); 942 } 943 944 public void testBeforeInitOfField() throws Exception { 945 performTest("Field", 59, null, "typesLocalMembersAndSmartInt.pass"); 946 } 947 948 public void testEmptyFileBeforeTypingInitOfStaticField() throws Exception { 949 performTest("MethodStart", 40, "public static int staticField = ", "typesAndStaticLocalMembers.pass"); 950 } 951 952 public void testBeforeTypingInitOfStaticField() throws Exception { 953 performTest("FieldNoInit", 91, " = ", "typesAndStaticLocalMembers.pass"); 954 } 955 956 public void testBeforeInitOfStaticField() throws Exception { 957 performTest("Field", 112, null, "typesAndStaticLocalMembers.pass"); 958 } 959 960 public void testEmptyFileTypingInitOfField() throws Exception { 961 performTest("MethodStart", 40, "public int field = ha", "hashCode.pass"); 962 } 963 964 public void testTypingInitOfField() throws Exception { 965 performTest("FieldNoInit", 56, " = ha", "hashCode.pass"); 966 } 967 968 public void testOnInitOfField() throws Exception { 969 performTest("Field", 61, null, "hashCode.pass"); 970 } 971 972 public void testEmptyFileTypingMethodInvocationWithinInitOfField() throws Exception { 973 performTest("MethodStart", 40, "public static int staticField = 10;\npublic int field = hashCode(", "typesAndLocalMembers.pass"); 974 } 975 976 public void testTypingMethodInvocationWithinInitOfField() throws Exception { 977 performTest("FieldNoInit", 56, " = hashCode(", "typesAndLocalMembers.pass"); 978 } 979 980 public void testOnMethodInvocationWithinInitOfField() throws Exception { 981 performTest("Field", 68, null, "typesAndLocalMembers.pass"); 982 } 983 984 public void testEmptyFileAfterTypingMethodInvocationWithinInitOfField() throws Exception { 985 performTest("MethodStart", 40, "public int field = hashCode()", "empty.pass"); 986 } 987 988 public void testAfterTypingMethodInvocationWithinInitOfField() throws Exception { 989 performTest("FieldNoInit", 56, " = hashCode()", "empty.pass"); 990 } 991 992 public void testAfterMethodInvocationWithinInitOfField() throws Exception { 993 performTest("Field", 69, null, "empty.pass"); 994 } 995 996 public void testEmptyFileAfterTypingOperatorWithinInitOfField() throws Exception { 997 performTest("MethodStart", 40, "public static int staticField = 10;\npublic int field = hashCode() /", "typesLocalMembersAndSmartPrimitives.pass"); 998 } 999 1000 public void testAfterTypingOperatorWithinInitOfField() throws Exception { 1001 performTest("FieldNoInit", 56, " = hashCode() /", "typesLocalMembersAndSmartPrimitives.pass"); 1002 } 1003 1004 public void testAfterOperatorWithinInitOfField() throws Exception { 1005 performTest("Field", 71, null, "typesLocalMembersAndSmartPrimitives.pass"); 1006 } 1007 1008 public void testEmptyFileAfterTypingConstantWithinInitOfField() throws Exception { 1009 performTest("MethodStart", 40, "public int field = hashCode() / 10", "empty.pass"); 1010 } 1011 1012 public void testAfterTypingConstantWithinInitOfField() throws Exception { 1013 performTest("FieldNoInit", 56, " = hashCode() / 10", "empty.pass"); 1014 } 1015 1016 public void testAfterConstantWithinInitOfField() throws Exception { 1017 performTest("Field", 74, null, "empty.pass"); 1018 } 1019 1020 public void testEmptyFileAfterTypingFieldDeclaration() throws Exception { 1021 performTest("MethodStart", 40, "public int field = hashCode() / 10;", "memberModifiersTypesAndGenElements.pass"); 1022 } 1023 1024 public void testAfterFieldDeclaration() throws Exception { 1025 performTest("Field", 75, null, "memberModifiersTypesAndGenElements.pass"); 1026 } 1027 1028 public void testTypingStaticFieldAfterErrorInPreviousFieldDeclaration() throws Exception { 1029 performTest("MethodStart", 40, "public int \npublic sta", "staticKeyword.pass"); 1030 } 1031 1032 public void testTypingStaticFieldAfterErrorInPreviousFieldInitialization() throws Exception { 1033 performTest("MethodStart", 40, "public int field = has\npublic sta", "staticKeyword.pass"); 1034 } 1035 1036 1038 public void testEmptyFileTypingMethodBody() throws Exception { 1039 performTest("SimpleMethodBodyStart", 89, null, "methodBodyContent.pass"); 1040 } 1041 1042 public void testTypingMethodBody() throws Exception { 1043 performTest("SimpleEmptyMethodBody", 89, null, "methodBodyContent.pass"); 1044 } 1045 1046 public void testInMethodBody() throws Exception { 1047 performTest("SimpleMethodBody", 89, null, "methodBodyContent.pass"); 1048 } 1049 1050 public void testEmptyFileTypingLocalVariableTypeInMethodBody() throws Exception { 1051 performTest("SimpleMethodBodyStart", 98, "bo", "booleanKeyword.pass"); 1052 } 1053 1054 public void testTypingLocalVariableTypeInMethodBody() throws Exception { 1055 performTest("SimpleEmptyMethodBody", 98, "bo", "booleanKeyword.pass"); 1056 } 1057 1058 public void testLocalVariableTypeInMethodBody() throws Exception { 1059 performTest("SimpleMethodBody", 100, null, "booleanKeyword.pass"); 1060 } 1061 1062 public void testEmptyFileAfterTypingLocalVariableTypeInMethodBody() throws Exception { 1063 performTest("SimpleMethodBodyStart", 98, "boolean", "booleanKeyword.pass"); 1064 } 1065 1066 public void testAfterTypingLocalVariableTypeInMethodBody() throws Exception { 1067 performTest("SimpleEmptyMethodBody", 98, "boolean", "booleanKeyword.pass"); 1068 } 1069 1070 public void testAfterLocalVariableTypeInMethodBody() throws Exception { 1071 performTest("SimpleMethodBody", 105, null, "booleanKeyword.pass"); 1072 } 1073 1074 public void testEmptyFileBeforeTypingLocalVariableNameInMethodBody() throws Exception { 1075 performTest("SimpleMethodBodyStart", 98, "boolean ", "booleanVarName.pass"); 1076 } 1077 1078 public void testBeforeTypingLocalVariableNameInMethodBody() throws Exception { 1079 performTest("SimpleEmptyMethodBody", 98, "boolean ", "booleanVarName.pass"); 1080 } 1081 1082 public void testBeforeLocalVariableNameInMethodBody() throws Exception { 1083 performTest("SimpleMethodBody", 106, null, "booleanVarName.pass"); 1084 } 1085 1086 public void testEmptyFileTypingLocalVariableNameInMethodBody() throws Exception { 1087 performTest("SimpleMethodBodyStart", 98, "boolean b", "booleanVarName.pass"); 1088 } 1089 1090 public void testTypingLocalVariableNameInMethodBody() throws Exception { 1091 performTest("SimpleEmptyMethodBody", 98, "boolean b", "booleanVarName.pass"); 1092 } 1093 1094 public void testOnLocalVariableNameInMethodBody() throws Exception { 1095 performTest("SimpleMethodBody", 107, null, "booleanVarName.pass"); 1096 } 1097 1098 public void testEmptyFileAfterTypingLocalVariableNameAndSpaceInMethodBody() throws Exception { 1099 performTest("SimpleMethodBodyStart", 98, "boolean b ", "empty.pass"); 1100 } 1101 1102 public void testAfterTypingLocalVariableNameAndSpaceInMethodBody() throws Exception { 1103 performTest("SimpleEmptyMethodBody", 98, "boolean b ", "empty.pass"); 1104 } 1105 1106 public void testAfterLocalVariableNameAndSpaceInMethodBody() throws Exception { 1107 performTest("SimpleMethodBody", 107, " ", "empty.pass"); 1108 } 1109 1110 public void testEmptyFileAfterTypingLocalVariableInMethodBody() throws Exception { 1111 performTest("SimpleMethodBodyStart", 98, "boolean b;", "methodBodyContentAndLocalVar.pass"); 1112 } 1113 1114 public void testAfterTypingLocalVariableInMethodBody() throws Exception { 1115 performTest("SimpleEmptyMethodBody", 98, "boolean b;", "methodBodyContentAndLocalVar.pass"); 1116 } 1117 1118 public void testAfterLocalVariableInMethodBody() throws Exception { 1119 performTest("SimpleMethodBody", 108, null, "methodBodyContentAndLocalVar.pass"); 1120 } 1121 1122 public void testEmptyFileTypingTypeInMethodBody() throws Exception { 1123 performTest("SimpleMethodBodyStart", 98, "Sy", "system.pass"); 1124 } 1125 1126 public void testTypingTypeInMethodBody() throws Exception { 1127 performTest("SimpleEmptyMethodBody", 98, "Sy", "system.pass"); 1128 } 1129 1130 public void testTypeInMethodBody() throws Exception { 1131 performTest("SimpleMethodBody", 112, null, "system.pass"); 1132 } 1133 1134 public void testEmptyFileAfterTypingTypeInMethodBody() throws Exception { 1135 performTest("SimpleMethodBodyStart", 98, "System", "system.pass"); 1136 } 1137 1138 public void testAfterTypingTypeInMethodBody() throws Exception { 1139 performTest("SimpleEmptyMethodBody", 98, "System", "system.pass"); 1140 } 1141 1142 public void testAfterTypeInMethodBody() throws Exception { 1143 performTest("SimpleMethodBody", 116, null, "system.pass"); 1144 } 1145 1146 public void testEmptyFileAfterTypingTypeAndDotInMethodBody() throws Exception { 1147 performTest("SimpleMethodBodyStart", 98, "System.", "systemContent.pass"); 1148 } 1149 1150 public void testAfterTypingTypeAndDotInMethodBody() throws Exception { 1151 performTest("SimpleEmptyMethodBody", 98, "System.", "systemContent.pass"); 1152 } 1153 1154 public void testAfterTypeAndDotInMethodBody() throws Exception { 1155 performTest("SimpleMethodBody", 117, null, "systemContent.pass"); 1156 } 1157 1158 public void testEmptyFileTypingFieldAccessInMethodBody() throws Exception { 1159 performTest("SimpleMethodBodyStart", 98, "System.o", "systemOut.pass"); 1160 } 1161 1162 public void testTypingFieldAccessInMethodBody() throws Exception { 1163 performTest("SimpleEmptyMethodBody", 98, "System.o", "systemOut.pass"); 1164 } 1165 1166 public void testFieldAccessInMethodBody() throws Exception { 1167 performTest("SimpleMethodBody", 118, null, "systemOut.pass"); 1168 } 1169 1170 public void testEmptyFileAfterTypingFieldAccessInMethodBody() throws Exception { 1171 performTest("SimpleMethodBodyStart", 98, "System.out", "systemOut.pass"); 1172 } 1173 1174 public void testAfterTypingFieldAccessInMethodBody() throws Exception { 1175 performTest("SimpleEmptyMethodBody", 98, "System.out", "systemOut.pass"); 1176 } 1177 1178 public void testAfterFieldAccessInMethodBody() throws Exception { 1179 performTest("SimpleMethodBody", 120, null, "systemOut.pass"); 1180 } 1181 1182 public void testEmptyFileAfterTypingFieldAccessAndSpaceInMethodBody() throws Exception { 1183 performTest("SimpleMethodBodyStart", 98, "System.out ", "instanceOf.pass"); 1184 } 1185 1186 public void testAfterTypingFieldAccessAndSpaceInMethodBody() throws Exception { 1187 performTest("SimpleEmptyMethodBody", 98, "System.out ", "instanceOf.pass"); 1188 } 1189 1190 public void testAfterFieldAccessAndSpaceInMethodBody() throws Exception { 1191 performTest("SimpleMethodBody", 120, " ", "instanceOf.pass"); 1192 } 1193 1194 public void testEmptyFileAfterTypingFieldAccessAndDotInMethodBody() throws Exception { 1195 performTest("SimpleMethodBodyStart", 98, "System.out.", "systemOutContent.pass"); 1196 } 1197 1198 public void testAfterTypingFieldAccessAndDotInMethodBody() throws Exception { 1199 performTest("SimpleEmptyMethodBody", 98, "System.out.", "systemOutContent.pass"); 1200 } 1201 1202 public void testAfterFieldAccessAndDotInMethodBody() throws Exception { 1203 performTest("SimpleMethodBody", 121, null, "systemOutContent.pass"); 1204 } 1205 1206 public void testEmptyFileTypingMethodInvocationInMethodBody() throws Exception { 1207 performTest("SimpleMethodBodyStart", 98, "boolean b;\nSystem.out.println(", "typesLocalMembersVarsAndSmarts.pass"); 1208 } 1209 1210 public void testTypingMethodInvocationInMethodBody() throws Exception { 1211 performTest("SimpleEmptyMethodBody", 98, "boolean b;\nSystem.out.println(", "typesLocalMembersVarsAndSmarts.pass"); 1212 } 1213 1214 public void testMethodInvocationInMethodBody() throws Exception { 1215 performTest("SimpleMethodBody", 129, null, "typesLocalMembersVarsAndSmarts.pass"); 1216 } 1217 1218 public void testEmptyFileTypingMethodInvocationParameterInMethodBody() throws Exception { 1219 performTest("SimpleMethodBodyStart", 98, "boolean b;\nSystem.out.println(b", "typesLocalMembersVarsAndSmartsStartingWithB.pass"); 1220 } 1221 1222 public void testTypingMethodInvocationParameterInMethodBody() throws Exception { 1223 performTest("SimpleEmptyMethodBody", 98, "boolean b;\nSystem.out.println(b", "typesLocalMembersVarsAndSmartsStartingWithB.pass"); 1224 } 1225 1226 public void testOnMethodInvocationParameterInMethodBody() throws Exception { 1227 performTest("SimpleMethodBody", 130, null, "typesLocalMembersVarsAndSmartsStartingWithB.pass"); 1228 } 1229 1230 public void testEmptyFileTypingMethodInvocationParameterAndSpaceInMethodBody() throws Exception { 1231 performTest("SimpleMethodBodyStart", 98, "System.out.println(b ", "empty.pass"); 1232 } 1233 1234 public void testTypingMethodInvocationParameterAndSpaceInMethodBody() throws Exception { 1235 performTest("SimpleEmptyMethodBody", 98, "System.out.println(b ", "empty.pass"); 1236 } 1237 1238 public void testAfterMethodInvocationParameterAndSpaceInMethodBody() throws Exception { 1239 performTest("SimpleMethodBody", 130, " ", "empty.pass"); 1240 } 1241 1242 public void testEmptyFileBeforeTypingSecondMethodInvocationParameterInMethodBody() throws Exception { 1243 performTest("SimpleMethodBodyStart", 98, "boolean b;\nSystem.out.println(b, ", "typesLocalMembersAndVars.pass"); 1244 } 1245 1246 public void testBeforeTypingSecondMethodInvocationParameterInMethodBody() throws Exception { 1247 performTest("SimpleEmptyMethodBody", 98, "boolean b;\nSystem.out.println(b, ", "typesLocalMembersAndVars.pass"); 1248 } 1249 1250 public void testBeforeSecondMethodInvocationParameterInMethodBody() throws Exception { 1251 performTest("SimpleMethodBody", 130, ", ", "typesLocalMembersAndVars.pass"); 1252 } 1253 1254 public void testEmptyFileTypingSecondMethodInvocationParameterInMethodBody() throws Exception { 1255 performTest("SimpleMethodBodyStart", 98, "boolean b;\nSystem.out.println(b, b", "typesLocalMembersAndVarsStartingWithB.pass"); 1256 } 1257 1258 public void testTypingSecondMethodInvocationParameterInMethodBody() throws Exception { 1259 performTest("SimpleEmptyMethodBody", 98, "boolean b;\nSystem.out.println(b, b", "typesLocalMembersAndVarsStartingWithB.pass"); 1260 } 1261 1262 public void testOnSecondMethodInvocationParameterInMethodBody() throws Exception { 1263 performTest("SimpleMethodBody", 130, ", b", "typesLocalMembersAndVarsStartingWithB.pass"); 1264 } 1265 1266 public void testEmptyFileAfterTypingMethodInvocationParametersInMethodBody() throws Exception { 1267 performTest("SimpleMethodBodyStart", 98, "boolean b;\nSystem.out.println(b)", "empty.pass"); 1268 } 1269 1270 public void testAfterTypingMethodInvocationParametersInMethodBody() throws Exception { 1271 performTest("SimpleEmptyMethodBody", 98, "boolean b;\nSystem.out.println(b)", "empty.pass"); 1272 } 1273 1274 public void testAfteMethodInvocationParametersInMethodBody() throws Exception { 1275 performTest("SimpleMethodBody", 131, null, "empty.pass"); 1276 } 1277 1278 public void testEmptyFileAfterTypingMethodInvocationParametersAndSpaceInMethodBody() throws Exception { 1279 performTest("SimpleMethodBodyStart", 98, "boolean b;\nSystem.out.println(b) ", "empty.pass"); 1280 } 1281 1282 public void testAfterTypingMethodInvocationParametersAndSpaceInMethodBody() throws Exception { 1283 performTest("SimpleEmptyMethodBody", 98, "boolean b;\nSystem.out.println(b) ", "empty.pass"); 1284 } 1285 1286 public void testAfteMethodInvocationParametersAndSpaceInMethodBody() throws Exception { 1287 performTest("SimpleMethodBody", 131, " ", "empty.pass"); 1288 } 1289 1290 public void testEmptyFileAfterTypingMethodInvocationInMethodBody() throws Exception { 1291 performTest("SimpleMethodBodyStart", 98, "boolean b;\nSystem.out.println(b);", "methodBodyContentAndLocalVar.pass"); 1292 } 1293 1294 public void testAfterTypingMethodInvocationInMethodBody() throws Exception { 1295 performTest("SimpleEmptyMethodBody", 98, "boolean b;\nSystem.out.println(b);", "methodBodyContentAndLocalVar.pass"); 1296 } 1297 1298 public void testAfteMethodInvocationInMethodBody() throws Exception { 1299 performTest("SimpleMethodBody", 132, null, "methodBodyContentAndLocalVar.pass"); 1300 } 1301} 1302 | Popular Tags |