Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
stat options
Period:
Authors:

Commits per author per week (path 'tests/org.eclipse.wst.wsdl.validation.tests/testresources/idealResults/Paths/Period.InPath/PeriodInPathInvalid.wsdl-log')

AuthorW39 2024W40 2024W41 2024W42 2024Total
Total00000

Back to the top

-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/META-INF/MANIFEST.MF22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/about.html28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/build.properties18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/plugin.properties16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/JSDTCompilerTests.java146
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AbstractCompletionTest.java481
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AbstractSelectionTest.java333
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AllocationExpressionCompletionTest.java194
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ClassLiteralAccessCompletionTest.java214
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionParserTest.java8713
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionParserTest2.java9671
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionParserTestKeyword.java15538
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionRecoveryTest.java1031
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java2375
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/DietCompletionTest.java2033
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/DietRecoveryTest.java7680
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/DualParseSyntaxErrorTest.java359
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ExplicitConstructorInvocationCompletionTest.java385
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ExplicitConstructorInvocationSelectionTest.java229
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/FieldAccessCompletionTest.java2424
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/InMemoryNameEnvironment.java102
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/InnerTypeCompletionTest.java456
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/JavadocCompletionParserTest.java545
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/LabelStatementCompletionTest.java492
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/MethodInvocationCompletionTest.java863
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/NameReferenceCompletionTest.java923
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ParserTest.java693
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ReferenceTypeCompletionTest.java1553
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/RunCompletionParserTests.java108
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SelectionJavadocTest.java865
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SelectionTest.java2579
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SelectionTest2.java229
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SingleCompletionTest.java57
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceElementParserTest.java5261
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceField.java122
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceImport.java52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceInitializer.java32
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceMethod.java192
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourcePackage.java49
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceType.java271
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceUnit.java268
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/StatementRecoveryTest.java3734
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SyntaxErrorTest.java192
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/TestAll.java120
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/TestSourceElementRequestor.java120
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ASTImplTests.java995
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AbstractComparableTest.java49
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AbstractRegressionTest.java1721
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AssignmentTest.java614
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicAnalyseTests.java197
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicErrorTests.java57
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicJsdocTests.java210
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicParserTests.java1017
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicResolveTests.java1717
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/CharOperationTest.java109
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/CompilerInvocationTests.java791
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/Compliance_1_3.java273
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/DeprecatedTest.java737
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ExternalizeStringLiterals15Test.java227
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java515
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/FieldAccessTest.java199
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/FlowAnalysisTest.java1242
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ForStatementTest.java77
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/InMemoryNameEnvironment.java115
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/InferResolveTests.java196
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/InferTypesTests.java948
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/InnerEmulationTest.java5692
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/InternalHexFloatTest.java409
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/InternalScannerTest.java68
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocBugsTest.java5193
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest.java578
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTestForClass.java990
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTestForConstructor.java946
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTestForField.java1013
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTestForInterface.java2219
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTestForMethod.java4835
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTestMixed.java859
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTestOptions.java2022
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest_1_3.java3914
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest_1_4.java3908
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest_1_5.java2940
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/LocalVariableTest.java363
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/LookupTest.java2702
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/MethodVerifyTest.java7376
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/NonFatalErrorTest.java184
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/NullReferenceImplTests.java1889
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/NullReferenceImplTransformations.java3177
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/NullReferenceTest.java8710
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/NumericTest.java95
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/OaaMetadataTests.java150
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ProblemConstructorTest.java136
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java113
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/RegressionTestSetup.java40
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/Requestor.java92
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/RunComparableTests.java70
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/RuntimeTests.java540
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ScannerTest.java1202
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/SerialVersionUIDTests.java136
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/StaticImportTest.java1875
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/SuperTypeTest.java266
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/SwitchTest.java576
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/TestAll.java162
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/TryStatementTest.java5366
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/UtilTest.java605
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/VarargsTest.java2067
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/XLargeTest.java11826
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/eval/target/CodeSnippetClassLoader.java118
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/eval/target/CodeSnippetRunner.java471
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/eval/target/IDEInterface.java157
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/future/compiler/regression/AmbiguousMethodTest.java1988
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/future/compiler/regression/ArrayTest.java371
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/future/compiler/regression/BooleanTest.java1151
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/future/compiler/regression/Compliance_1_4.java3431
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/future/compiler/regression/Compliance_1_5.java3456
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/interpret/BasicInterpretTest.java81
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/interpret/InterpretTest.java65
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/junit/extension/PerformanceTestSuite.java96
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/junit/extension/StopableTestCase.java21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/junit/extension/TestCase.java748
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/junit/extension/TestListener.java27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/junit/extension/TestResult.java67
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/AbstractReader.java54
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/J9VMLauncher.java284
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/J9VirtualMachine.java82
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/JRockitVMLauncher.java193
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/LocalVMLauncher.java470
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/LocalVirtualMachine.java231
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/MacVMLauncher.java135
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/NullConsoleReader.java42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/ProxyConsoleReader.java68
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/RuntimeConstants.java21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/SideCarJ9VMLauncher.java138
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/SideCarVMLauncher.java133
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/StandardVMLauncher.java221
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/TargetException.java34
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/TargetInterface.java148
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/runtime/VMInputStream.java110
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/util/AbstractCompilerTest.java502
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/util/CompilerTestSetup.java61
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/util/TestVerifier.java618
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/util/Util.java1299
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/util/VerifyTests.java217
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/test.xml119
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/.classpath7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/.cvsignore2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/.project28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/.settings/org.eclipse.core.resources.prefs4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/META-INF/MANIFEST.MF25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/META-INF/eclipse.inf6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/about.html28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/build.properties18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/plugin.properties19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/plugin.xml67
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/RunCompilerTests.java59
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/RunDOMTests.java32
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/RunFormatterTests.java60
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/RunJSDTCoreTests.java35
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/RunModelTests.java32
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterAST3Test.java9467
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterBindingsTest.java506
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterJavadocTest.java3405
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterRecoveryTest.java923
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest.java8795
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest2.java5418
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTestAST3_2.java8652
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTMatcherTest.java1112
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTModelBridgeTests.java1419
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTNodesCollectorVisitor.java260
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTParserTest.java116
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTPositionsTest.java144
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTStructuralPropertyTest.java348
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTTest.java7191
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTVisitorTest.java1951
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/AbstractASTTests.java548
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/BatchASTCreationTests.java1670
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/BindingsCollectorVisitor.java429
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/CompatibilityRulesTests.java787
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ConverterTestSetup.java564
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/GetKeyVisitor.java29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ProfilingASTConvertionTest.java350
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/RunAllTests.java69
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/RunConverterTests.java66
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/SampleASTs.java276
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/formatter/DecodeCodeFormatterPreferences.java154
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/formatter/FormatterRegressionTests.java9164
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/formatter/comment/CommentFormatterUtil.java193
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/formatter/comment/CommentTestCase.java114
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/formatter/comment/CommentsTestSuite.java31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/formatter/comment/JavaDocTestCase.java703
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/formatter/comment/MultiLineTestCase.java204
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/formatter/comment/SingleLineTestCase.java197
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaModelCompletionTests.java167
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaModelTests.java2261
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaSearchTests.java607
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavadocCompletionModelTest.java500
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AccessRestrictionsTests.java1023
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachSourceTests.java1141
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AttachedJavadocTests.java509
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/BindingKeyTests.java227
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/BufferTests.java424
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CancelCounter.java31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/Canceler.java34
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassFileTests.java824
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClassNameTests.java1169
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathInitializerTests.java1306
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ClasspathTests.java3032
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CodeCorrectionTests.java731
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CodeCorrectionTestsRequestor.java118
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CodeSnippetParsingUtilTests.java124
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompilationUnitTests.java1422
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionContextTests.java3385
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests.java13665
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests2.java2416
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTestsRequestor.java193
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTestsRequestor2.java446
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests.java1415
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests2.java249
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionWithMissingTypesTests_1_5.java569
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ContainerInitializer.java48
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveElementsTests.java2743
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveResourcesTests.java933
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CopyMoveTests.java307
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateCompilationUnitTests.java341
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreateMembersTests.java144
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CreatePackageTests.java133
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/DefaultJavaElementComparator.java295
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/DeleteTests.java1009
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/EncodingTests.java918
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExclusionPatternsTests.java895
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExistenceTests.java507
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ExternalJarDeltaTests.java541
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/FactoryTests.java232
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/GetSourceTests.java246
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/HierarchyOnWorkingCopiesTests.java102
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/InclusionPatternsTests.java1049
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JSDTModelTests.java244
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaConventionTests.java402
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaElementDeltaTests.java2056
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaModelTests.java564
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaProjectTests.java1133
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaScriptLikeExtensionsTests.java101
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java7560
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchJavadocTests.java926
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchMultipleProjectsTests.java919
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchScopeTests.java966
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchTests.java3616
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocBugsCompletionModelTest.java1061
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocCompletionContextTests.java1587
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocFieldCompletionModelTest.java519
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocMethodCompletionModelTest.java2584
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocPackageCompletionModelTest.java523
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocTextCompletionModelTest.java1240
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavadocTypeCompletionModelTest.java1343
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/LocalElementTests.java580
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/MementoTests.java678
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ModifyingResourceTests.java347
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NameLookupTests2.java253
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NamingConventionTests.java729
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/OptionTests.java632
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/OverflowingCacheTests.java692
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerStatementsRecoveryTests.java346
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ReconcilerTests.java3413
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RenameTests.java875
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ResolveTests.java2113
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RootManipulationsTests.java1226
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RunCompletionModelTests.java100
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/RunJavaSearchTests.java78
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchParticipantTests.java310
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SearchTests.java1014
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SelectionJavadocModelTests.java1019
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/Semaphore.java65
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SignatureTests.java1024
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SnippetCompletionContextTests.java187
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SnippetCompletionTests.java326
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SnippetCompletionTests_1_5.java67
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SortCompilationUnitElementsTests.java2080
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/SuiteOfTestCases.java122
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TestBuffer.java191
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TestPessimisticProvider.java95
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TestProgressMonitor.java69
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TestvalidationParticipant.java28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/ThreadSafetyTests.java117
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyNotificationTests.java1218
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchySerializationTests.java143
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyTests.java1707
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeResolveTests.java233
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/VariablesInitializer.java48
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyNotInClasspathTests.java468
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyOwnerTests.java1331
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopySearchTests.java436
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyTests.java701
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingExpressionsTest.java1229
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingGroupNodeTest.java139
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingInsertBoundTest.java1525
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingJavadocTest.java1062
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingMethodDeclTest.java2180
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingMoveCodeTest.java1892
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingStatementsTest.java3132
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTest.java229
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTrackingTest.java524
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java1084
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/LineCommentOffsetsTest.java466
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/SourceModifierTest.java149
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/describing/StringAsserts.java153
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingCopyTest.java438
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingInsertTest.java325
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingMoveTest.java488
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingOtherTest.java122
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingRemoveTest.java409
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingReplaceTest.java108
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/rewrite/modifying/ASTRewritingModifyingTest.java208
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/utils/SequenceReaderTests.java84
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/test.xml119
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/.classpath16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attach.jarbin953 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attach2.jarbin1051 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attach2src.zipbin22 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attachsrc.new.zipbin374 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/attachsrc.zipbin198 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/b153133.jarbin1774 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/full.jarbin1096 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/fullsrc.zipbin797 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/src.zipbin559 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/src/A.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/srcLib/p/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test.jarbin502 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test2.jarbin1134 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test4.jarbin1055 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test4_src.zipbin609 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test5.jarbin1513 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test6.jarbin1748 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/test6src.zipbin556 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachSourceTests/update.jarbin783 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/.classpath7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc.zipbin78240 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/allclasses-frame.html52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/allclasses-noframe.html52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/constant-values.html142
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/deprecated-list.html142
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/help-doc.html219
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-1.html141
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-10.html144
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-11.html145
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-12.html150
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-13.html141
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-14.html141
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-15.html141
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-2.html156
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-3.html138
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-4.html144
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-5.html141
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-6.html171
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-7.html147
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-8.html141
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index-files/index-9.html138
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/index.html37
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/overview-frame.html46
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/overview-summary.html156
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/overview-tree.html172
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Annot.D.html224
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Annot.html235
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Annot2.html198
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/E.html362
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/TestClass.html221
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/X.A.html230
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/X.B.html224
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/X.html440
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/Z.html258
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Annot.D.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Annot.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Annot2.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/E.html185
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/TestClass.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/X.A.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/X.B.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/X.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/class-use/Z.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/C.html442
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/D.html221
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/class-use/C.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/class-use/D.html201
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-frame.html43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-summary.html168
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-tree.html154
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/p3/package-use.html166
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-frame.html62
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-summary.html198
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-tree.html166
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p1/p2/package-use.html166
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/X.html254
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/Y.html256
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/Z.html221
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/class-use/X.html176
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/class-use/Y.html140
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/class-use/Z.html184
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-frame.html36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-summary.html162
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-tree.html151
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/p2/package-use.html172
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/package-list3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/resources/inherit.gifbin57 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/doc/stylesheet.css29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/lib/test6.jarbin7538 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/lib/test6src.zipbin3083 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/src/p1/p2/X.js68
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/AttachedJavadocProject/src/p1/p2/Y.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/.settings/.jsdtscope7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/lib.jarbin2435 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/libSrc.zipbin1573 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectArgument1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectException1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectException2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectField1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectField2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectFieldType1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectFieldType2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectFieldType3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectImport1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectImport2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectImport3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectLocalVariable1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectLocalVariableType1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectLocalVariableType2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectMethod1.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectMethod2.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectReturnType1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectReturnType2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperClass1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperClass2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperInterface1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CodeCorrection/src/CorrectSuperInterface2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/.settings/.jsdtscope6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/core/compiler/package.html17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser1.rscbin23054 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser10.rscbin252 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser11.rscbin252 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser12.rscbin252 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser13.rscbin252 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser14.rscbin1204 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser15.rscbin890 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser16.rscbin1866 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser17.rscbin671 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser18.rscbin7979 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser19.rsc2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser2.rscbin21712 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser20.rscbin12598 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser21.rscbin5368 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser3.rscbin1866 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser4.rscbin3126 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser5.rscbin1866 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser6.rscbin866 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser7.rscbin218 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser8.rscbin598 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/parser9.rscbin15800 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/readableNames.properties306
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/problem/messages.properties465
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/util/messages.properties66
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/CharOperation.js2747
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/IProblem.js983
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/InvalidInputException.js34
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/core/compiler/package.html17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ASTVisitor.js924
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ClassFile.js3040
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/CompilationResult.js433
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/Compiler.js610
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ConfigurableOption.js227
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/DefaultErrorHandlingPolicies.js75
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ICompilerRequestor.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/IDebugRequestor.js42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/IErrorHandlingPolicy.js28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/IProblemFactory.js41
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AND_AND_Expression.js269
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ASTNode.js298
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AbstractMethodDeclaration.js421
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AbstractVariableDeclaration.js97
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AllocationExpression.js317
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Annotation.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AnnotationTypeDeclaration.js283
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AnnotationTypeMemberDeclaration.js158
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Argument.js132
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayAllocationExpression.js191
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayInitializer.js209
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayQualifiedTypeReference.js86
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayReference.js213
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ArrayTypeReference.js83
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/AssertStatement.js198
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Assignment.js204
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/BinaryExpression.js1764
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Block.js142
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/BranchStatement.js62
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/BreakStatement.js95
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CaseStatement.js114
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CastExpression.js420
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CharLiteral.js101
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ClassLiteralAccess.js105
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Clinit.js248
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CompilationUnitDeclaration.js323
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/CompoundAssignment.js158
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ConditionalExpression.js416
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ConstructorDeclaration.js467
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ContinueStatement.js100
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/DoStatement.js173
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/DoubleLiteral.js115
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EmptyStatement.js64
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EnumConstant.js208
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EnumDeclaration.js242
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/EqualExpression.js454
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ExplicitConstructorCall.js366
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Expression.js757
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ExtendedStringLiteral.js79
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FalseLiteral.js67
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FieldDeclaration.js242
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FieldReference.js545
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/FloatLiteral.js117
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ForStatement.js325
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ForeachStatement.js393
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/IfStatement.js242
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ImplicitDocTypeReference.js73
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ImportReference.js82
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Initializer.js120
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/InstanceOfExpression.js105
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/IntLiteral.js150
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/IntLiteralMinValue.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Javadoc.js495
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocAllocationExpression.js113
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocArgumentExpression.js98
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocArrayQualifiedTypeReference.js48
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocArraySingleTypeReference.js46
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocFieldReference.js143
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocImportReference.js32
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocMessageSend.js170
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocQualifiedTypeReference.js94
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocReturnStatement.js51
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocSingleNameReference.js58
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/JavadocSingleTypeReference.js94
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LabeledStatement.js129
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Literal.js57
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LocalDeclaration.js226
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LongLiteral.js141
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/LongLiteralMinValue.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MagicLiteral.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MarkerAnnotation.js42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MemberValuePair.js67
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MessageSend.js399
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/MethodDeclaration.js181
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NameReference.js64
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NormalAnnotation.js84
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NullLiteral.js59
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/NumberLiteral.js36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/OR_OR_Expression.js272
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/OperatorExpression.js1564
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/OperatorIds.js43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.js287
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ParameterizedSingleTypeReference.js217
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/PostfixExpression.js77
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/PrefixExpression.js60
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedAllocationExpression.js359
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedNameReference.js877
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedSuperReference.js63
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedThisReference.js120
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/QualifiedTypeReference.js115
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Reference.js70
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ReturnStatement.js244
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SingleMemberAnnotation.js69
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SingleNameReference.js689
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SingleTypeReference.js77
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Statement.js79
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/StringLiteral.js120
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/StringLiteralConcatenation.js79
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SubRoutineStatement.js67
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SuperReference.js68
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SwitchStatement.js320
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/SynchronizedStatement.js194
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ThisReference.js120
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/ThrowStatement.js79
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TrueLiteral.js70
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TryStatement.js562
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TypeDeclaration.js1202
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TypeParameter.js79
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/TypeReference.js164
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/UnaryExpression.js301
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/WhileStatement.js234
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/ast/Wildcard.js112
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFileConstants.js72
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFileReader.js827
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFileStruct.js188
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/ClassFormatException.js131
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/FieldInfo.js318
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/InnerClassInfo.js142
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/classfmt/MethodInfo.js251
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/AttributeNamesConstants.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/CaseLabel.js81
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/CharArrayCache.js184
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/CodeStream.js5479
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/ConstantPool.js3609
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/DoubleCache.js138
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/ExceptionLabel.js49
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/FieldNameAndTypeCache.js161
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/FloatCache.js138
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/IntegerCache.js155
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/Label.js262
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/LongCache.js155
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/MethodNameAndTypeCache.js162
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/ObjectCache.js152
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/Opcodes.js216
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/codegen/QualifiedNamesConstants.js107
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryField.js39
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryMethod.js50
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryNestedType.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IBinaryType.js114
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ICompilationUnit.js36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IConstants.js48
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IDependent.js44
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IGenericField.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IGenericMethod.js36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/IGenericType.js32
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/INameEnvironment.js71
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceField.js47
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceImport.js45
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceMethod.js72
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/ISourceType.js108
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/env/NameEnvironmentAnswer.js79
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/ConditionalFlowInfo.js178
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/ExceptionHandlingFlowContext.js219
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/FinallyFlowContext.js122
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/FlowContext.js493
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/FlowInfo.js144
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/InitializationFlowContext.js97
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/InsideSubRoutineFlowContext.js59
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/LabelFlowContext.js61
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/LoopingFlowContext.js153
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/SwitchFlowContext.js54
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/flow/UnconditionalFlowInfo.js558
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/BooleanConstant.js41
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ByteConstant.js52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/CharConstant.js55
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/CompilerOptions.js725
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/Constant.js1611
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/DoubleConstant.js64
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/FloatConstant.js62
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ITypeRequestor.js37
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/IntConstant.js63
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/LongConstant.js52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ReferenceContext.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/ShortConstant.js52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/impl/StringConstant.js48
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ArrayBinding.js219
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BaseTypeBinding.js186
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BaseTypes.js24
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BinaryTypeBinding.js819
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/Binding.js45
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BindingIds.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/BlockScope.js825
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ClassScope.js995
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/CompilationUnitScope.js633
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/CompilerModifiers.js42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/FieldBinding.js228
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ImportBinding.js45
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/InnerEmulationDependency.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/InvocationSite.js28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/LocalTypeBinding.js177
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/LocalVariableBinding.js110
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/LookupEnvironment.js815
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MemberTypeBinding.js39
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodBinding.js635
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodScope.js502
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodVerifier.js544
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/MethodVerifier15.js161
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/NestedTypeBinding.js217
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/PackageBinding.js197
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedFieldBinding.js59
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.js232
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedMethodBinding.js91
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ParameterizedTypeBinding.js787
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemBinding.js55
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemFieldBinding.js41
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemMethodBinding.js42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemPackageBinding.js32
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemReasons.js28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ProblemReferenceBinding.js50
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/RawTypeBinding.js170
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/ReferenceBinding.js742
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/Scope.js2887
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SignatureWrapper.js68
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SourceTypeBinding.js1162
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/Substitution.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SyntheticAccessMethodBinding.js307
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SyntheticArgumentBinding.js61
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/SyntheticFieldBinding.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TagBits.js61
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeBinding.js289
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeConstants.js89
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeIds.js138
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/TypeVariableBinding.js210
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/UnresolvedReferenceBinding.js70
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/UpdatedMethodBinding.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/VariableBinding.js59
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/lookup/WildcardBinding.js325
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/AbstractCommentParser.js1234
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/JavadocParser.js632
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/NLSLine.js65
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/Parser.js9112
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/ParserBasicInformation.js35
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredBlock.js330
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredElement.js308
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredField.js169
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredImport.js57
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredInitializer.js237
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredLocalVariable.js108
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredMethod.js447
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredStatement.js54
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredType.js511
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/RecoveredUnit.js217
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/Scanner.js3587
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/TerminalTokens.js144
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/diagnose/DiagnoseParser.js2295
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/diagnose/LexStream.js270
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/diagnose/RangeUtil.js200
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser1.rscbin23054 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser10.rscbin252 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser11.rscbin252 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser12.rscbin252 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser13.rscbin252 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser14.rscbin1204 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser15.rscbin890 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser16.rscbin1866 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser17.rscbin671 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser18.rscbin7979 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser19.rsc2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser2.rscbin21712 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser20.rscbin12598 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser21.rscbin5368 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser3.rscbin1866 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser4.rscbin3126 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser5.rscbin1866 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser6.rscbin866 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser7.rscbin218 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser8.rscbin598 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/parser9.rscbin15800 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/parser/readableNames.properties90
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortCompilation.js75
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortCompilationUnit.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortMethod.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/AbortType.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/DefaultProblem.js227
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/DefaultProblemFactory.js197
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ProblemHandler.js183
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ProblemReporter.js4731
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ProblemSeverities.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/ShouldNotImplement.js24
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/problem/messages.properties465
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/CompoundNameVector.js71
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/FloatUtil.js421
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfInt.js92
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfIntValues.js148
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfLong.js92
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfObject.js146
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfPackage.js96
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/HashtableOfType.js96
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/ObjectVector.js132
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/SimpleLookupTable.js156
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/SimpleNameVector.js96
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/SuffixConstants.js43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/Util.js523
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/WeakHashSet.js206
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Compiler/src/org/eclipse/jsdt/internal/compiler/util/messages.properties66
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/.settings/.jsdtscope15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/ZZZ.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/constructors.jarbin1456 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/constructorssrc.zipbin615 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/generics.jarbin695 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/genericssrc.zipbin265 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/lib.jarbin392 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/pack.jarbin1303 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/same.jarbin535 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CUWithSecondaryType.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/ClassWithComplexName.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/Completion2InterfacesWithSameMethod.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterCase1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterCase2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterSupercall1.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAfterSwitch.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAllocationExpressionIsParent1.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAllocationExpressionIsParent4.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAllocationExpressionIsParent5.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousFieldName.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousFieldName3.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousFieldName4.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousType.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAmbiguousType2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionArgumentName.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionArrayAccess1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionArraysCloneMethod.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod1.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod2.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionAssignmentInMethod4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicField1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicKeyword1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicLocalVariable1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicMethod1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicMethodDeclaration1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicPackage1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicPotentialMethodDeclaration1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBasicType1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBinaryOperator1.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBinaryOperator2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionBinaryOperator3.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCaseInsensitive.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCaseInsensitivePackage.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCastIsParent1.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCastIsParent2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionCatchArgumentName2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionClassLiteralAfterAnonymousType1.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConditionalExpression1.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConditionalExpression2.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConditionalExpression3.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionConstructorForAnonymousType.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionDefaultPackage.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEmptyToken1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEmptyTypeName2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEmptyTypeName3.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionEndOfCompilationUnit.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionExactNameCaseInsensitive.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionExpectedTypeIsNotValid.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer1.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldInitializer4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFieldName.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindClass2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindException1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindException2.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindField1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindField2.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindField3.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindLocalVariable.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethod1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethod2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethodInProcess.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindMethodInThis.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindSecondaryType1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionFindThisDotField.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionInsideStaticMethod.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionInstanceofOperator1.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionLocalName.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent1.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent2.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent3.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent4.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent5.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMessageSendIsParent6.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration6.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration7.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodDeclaration9.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodThrowsClause.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionMethodThrowsClause2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionNonEmptyToken1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionNonStaticFieldRelevance.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionNullRequestor.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionObjectsMethodWithInterfaceReceiver.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionOnStaticMember1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionOnStaticMember2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionOutOfBounds.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionRepeatedType.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionReturnInInitializer.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionReturnStatementIsParent1.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionReturnStatementIsParent2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionSameClass.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionThrowStatement.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionType1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnaryOperator1.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnaryOperator2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedEnclosingType.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedFieldType.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedParameterType.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionUnresolvedReturnType.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer1.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer2.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInInitializer4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod1.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod2.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableInitializerInMethod4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableName1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableName2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableName3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVariableNameUnresolvedType.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVisibilityCheck.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionVoidMethod.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/CompletionWithBinaryFolder.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/Default.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/SuperClass.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/SuperInterface.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/TEST_FOO_MyClass.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/Test_Bar_MyClass.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/TypeWithConstructor.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX00.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX01.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX02.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX10.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX11.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX12.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX20.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX21.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/XX22.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/deprecation/Bug127628Type1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/deprecation/Bug127628Type2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/org/eclipse/jsdt/core/tests/BasicTestReferences.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/p1/ABC.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/p2/ABC.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/p3/CompletionToplevelType1.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/pack1/PX.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/pack1/pack3/PX.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/pack2/PX.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/q1/CT1.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/q2/CT1.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/Qla1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla0/Qla3.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla0/Qla4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla0/Wla.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src/z1/z2/qla2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract1.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract10.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract11.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract12.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract13.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract14.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract15.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract16.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract2.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract3.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract4.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract5.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract6.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract7.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract8.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAbstract9.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordAssert6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak3.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak4.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak5.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordBreak6.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase10.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase2.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase3.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase4.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase5.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase6.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase7.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase8.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCase9.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch10.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch5.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch6.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch7.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordCatch9.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass1.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass10.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass11.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass12.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass13.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass14.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass15.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass16.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass17.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass18.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass19.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass2.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass20.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass21.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass22.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass23.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass24.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass3.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass4.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass5.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass6.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass7.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass8.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordClass9.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue3.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordContinue4.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault10.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault2.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault3.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault5.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault6.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault7.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault8.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDefault9.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordDo6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse5.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse6.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordElse8.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends5.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordExtends9.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFalse4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal1.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal10.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal11.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal12.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal13.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal14.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal15.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal16.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal17.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal18.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal2.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal3.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal4.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal5.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal6.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal7.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal8.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinal9.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally11.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally12.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally13.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally14.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally5.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally6.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally7.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally8.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFinally9.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordFor6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordIf6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements4.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements5.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImplements6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport4.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport5.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport6.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordImport7.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInstanceof6.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface1.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface10.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface11.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface12.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface13.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface14.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface15.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface16.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface17.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface18.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface3.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface4.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface5.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface6.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface7.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface8.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordInterface9.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative5.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNative8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew10.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew11.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew12.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew13.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew14.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew15.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew16.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew6.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew7.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew8.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNew9.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordNull4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage4.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage5.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage6.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPackage7.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate5.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPrivate9.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected5.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordProtected9.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic1.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic10.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic11.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic12.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic13.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic14.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic15.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic16.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic17.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic18.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic19.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic20.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic3.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic4.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic5.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic6.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic7.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic8.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordPublic9.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordReturn6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic5.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStatic9.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp5.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordStrictfp8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper10.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper11.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper5.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper7.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper8.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSuper9.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSwitch6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized11.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized12.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized5.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized6.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordSynchronized9.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis10.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis11.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis12.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis13.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis14.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis4.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis5.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis6.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis7.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis8.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThis9.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrow6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows1.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows2.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows3.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows4.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows5.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows6.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows7.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordThrows8.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient5.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTransient8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTrue4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordTry6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile5.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile6.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile7.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordVolatile8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile10.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile5.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile6.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile7.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile8.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/CompletionKeywordWhile9.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordImport2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordImport8.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordPackage2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src2/p/CompletionKeywordPackage8.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0001/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0002/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0003/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0004/Test.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0009/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0010/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0023/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0024/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0025/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0028/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0030/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0032/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0033/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0034/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0035/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0036/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0037/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0038/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0039/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0048/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0049/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0050/Test.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0057/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0060/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0064/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0067/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0068/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0069/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0070/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0072/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0073/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/src3/test0074/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/test0049.jarbin453 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/test0049src.zipbin209 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/tmpDoc.jarbin550 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/tmpDocDoc.zipbin20791 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/tmpDocsrc.zipbin221 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/zzz.jarbin842 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Completion/zzzsrc.zipbin528 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/.settings/.jsdtscope7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Hello.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/NO_WORKING.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test0157.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test0158.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test0170.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/Test462.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/X.js0
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/codeManipulation/bug.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/examples.oneofeach/ASTPosterChild.js188
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test000/Test.js36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test001/Test.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test002/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test003/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test004/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test005/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test006/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test007/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test008/Test.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test009/Test.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test010/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test011/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test012/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test013/Test.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test014/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test015/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestB1.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestB2.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestD1.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test100/TestD2.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test101/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestB1.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestB2.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestD1.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test102/TestD2.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test103/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test104/TestD1.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test104/TestD2.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test105/TestB1.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test105/TestB2.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test106/Test.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestB1.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestB2.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestD1.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test107/TestD2.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/test108/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestA.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestB.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestC.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestD.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug48489/TestE.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug50898/G.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug50898/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X4.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51226/X6.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51241/X.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51363/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51476/X1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51476/X2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51476/X3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51478/X1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51478/X2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51478/X3.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51508/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51600/Test.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51617/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51650/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51660/Test.js37
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51770/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestInvalid.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestValid1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestValid2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug51911/TestValid3.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908/X.js47
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908/Y.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908a/Test.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908unicode/X.js47
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug52908unicode/Y.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53075/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53276/TestA.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53276/TestB.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53276/TestC.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug53757/Test.js55
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug54424/Test.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug54776/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/a/Test.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/b/Test.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/c/Test.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55221/d/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55223/TestA.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug55223/TestB.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug63044/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65174/Test.js39
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65253/Test.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65253/TestD.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug65288/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestInvalid.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestValid.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestWarn1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68017/TestWarn2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68025/TestA.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68025/TestB.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726conform1.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726conform2.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726negative1.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug68726/TestBug68726negative2.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestClassInvalid.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestClassValid.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestFieldInvalid.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestFieldValid.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestMethInvalid.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69272/TestMethValid.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69275/TestA.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69275/TestB.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69302/TestInvalid.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69302/TestValid1.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug69302/TestValid2.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug70892/TestInvalid1.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug70892/TestInvalid2.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug70892/TestValid.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestInvalid.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestValid.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug77644/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug77644/B.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/javadoc/testBug77644/C.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/AboutDialog.js67
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/Logo.js53
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/ProgressBar.js84
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/awtui/TestRunner.js539
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/ActiveTestSuite.js64
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/ExceptionTestCase.js46
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/RepeatedTest.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/TestDecorator.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/extensions/TestSetup.js37
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/Assert.js291
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/AssertionFailedError.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/ComparisonFailure.js68
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/Protectable.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/Test.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestCase.js197
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestFailure.js57
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestListener.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestResult.js166
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/framework/TestSuite.js267
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/BaseTestRunner.js323
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/ClassPathTestCollector.js80
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/FailureDetailView.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/LoadingTestCollector.js69
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/ReloadingTestSuiteLoader.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/SimpleTestCollector.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/Sorter.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/StandardTestSuiteLoader.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestCaseClassLoader.js224
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestCollector.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestRunListener.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/TestSuiteLoader.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/runner/Version.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/AboutDialog.js81
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/CounterPanel.js110
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/DefaultFailureDetailView.js94
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/FailureRunView.js110
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/ProgressBar.js42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/StatusLine.js42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestHierarchyRunView.js72
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestRunContext.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestRunView.js37
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestRunner.js774
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestSelector.js258
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestSuitePanel.js159
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/swingui/TestTreeModel.js184
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/textui/ResultPrinter.js138
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/junit/textui/TestRunner.js189
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/p1/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/p2/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/p3/B.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0001/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0002/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0003/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0004/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0005/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0006/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0007/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0008/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0009/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0010/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0011/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0012/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0013/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0014/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0015/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0016/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0017/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0018/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0019/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0020/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0021/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0022/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0023/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0024/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0025/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0026/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0027/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0028/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0029/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0030/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0031/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0032/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0033/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0034/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0035/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0036/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0037/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0038/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0039/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0040/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0041/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0042/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0043/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0044/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0045/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0046/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0047/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0048/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0049/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0050/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0051/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0052/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0053/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0054/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0055/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0056/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0057/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0058/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0059/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0060/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0061/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0062/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0063/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0064/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0065/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0066/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0067/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0068/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0069/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0070/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0071/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0072/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0073/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0074/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0075/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0076/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0077/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0078/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0079/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0080/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0081/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0082/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0083/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0084/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0085/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0086/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0087/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0088/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0089/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0090/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0091/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0092/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0093/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0094/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0095/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0096/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0097/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0098/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0099/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0100/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0101/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0102/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0103/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0104/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0105/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0106/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0107/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0108/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0109/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0110/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0111/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0112/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0113/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0114/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0115/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0116/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0117/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0118/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0119/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0120/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0121/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0122/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0123/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0124/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0125/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0126/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0127/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0128/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0129/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0130/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0131/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0132/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0133/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0134/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0135/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0136/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0137/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0138/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0139/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0140/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0141/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0142/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0143/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0144/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0145/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0146/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0147/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0148/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0149/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0150/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0151/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0152/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0153/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0154/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0155/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0156/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0159/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0160/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0161/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0162/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0163/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0164/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0165/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0166/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0167/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0168/test1/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0169/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0171/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0172/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0173/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0174/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0175/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0176/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0177/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0178/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0179/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0180/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0181/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0182/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0183/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0184/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0185/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0186/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0187/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0188/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0189/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0190/Test.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0191/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0192/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0193/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0194/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0195/Test.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0196/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0197/Test.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0198/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0199/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0200/Test.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0201/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0202/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0203/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0204/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0205/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0206/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0207/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0208/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0209/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0210/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0211/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0212/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0213/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0214/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0215/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0216/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0217/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0218/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0219/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0220/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0221/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0222/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0223/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0224/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0225/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0226/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0227/Test.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0228/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0229/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0230/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0231/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0232/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0233/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0234/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0235/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0236/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0238/Test.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0239/Test.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0240/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0241/Test.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0242/Test.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0243/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0244/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0245/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0246/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0247/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0248/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0249/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0250/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0251/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0252/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0253/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0254/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0255/Test.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0256/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0257/Test.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0258/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0259/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0260/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0261/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0262/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0263/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0264/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0265/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0266/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0267/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0268/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0269/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0270/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0271/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0272/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0273/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0274/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0275/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0276/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0277/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0278/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0279/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0280/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0281/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0282/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0283/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0284/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0285/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0286/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0287/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0288/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0289/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0290/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0291/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0292/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0293/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0294/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0295/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0296/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0297/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0298/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0299/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0300/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0301/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0302/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0303/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0304/Test.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0307/Test.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0308/Test.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0309/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0310/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0311/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0312/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0313/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0314/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0315/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0317/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0318/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0319/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0320/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0321/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0322/Test.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0323/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0324/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0325/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0326/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0327/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0328/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0329/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0330/Test.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0331/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0332/LocalSelectionTransfer.js88
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0333/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0334/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0335/ExceptionTestCaseTest.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0336/SorterTest.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0337/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0338/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0339/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0341/A.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0342/Test.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0343/Test.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0344/Test.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0345/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0346/Test2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0347/Test2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0348/Test2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0349/Test2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0350/Test2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0351/Test2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0352/Test2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0353/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0354/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0355/Foo.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0356/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0356/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0357/A.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0358/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0359/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0360/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0361/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0362/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0363/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0364/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0365/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0366/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0367/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0368/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0369/A.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0370/Test.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0371/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0372/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0373/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0374/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0375/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0376/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0377/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0378/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0379/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0380/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0381/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0382/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0383/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0384/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0385/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0386/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0387/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0388/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0389/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0390/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0391/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0392/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0393/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0394/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0395/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0396/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0397/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0398/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0399/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0400/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0401/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0402/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0403/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0404/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0405/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0406/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0406_a/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0407/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0408/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0409/A.js102
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0410/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0411/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0412/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0413/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0414/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0414/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0415/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0416/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0417/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0418/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0419/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0420/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0421/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0422/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0423/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0424/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0425/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0426/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0427/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0428/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0429/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0430/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0431/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0432/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0433/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0434/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0435/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0436/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0437/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0438/D.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0438_a/W.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0439/C.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0439/E.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0440/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0441/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0442/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0443/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0444/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0445/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0446/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0447/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0448/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0449/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0450/A.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0451/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0453/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0454/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0455/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0456/A.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0457/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0458/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0459/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0460/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0461/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0463/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0464/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0465/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0466/Assert.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0467/Assert.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0468/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0470/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0471/A.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0473/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0474/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0475/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0476/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0477/A.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0478/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0479/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0480/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0481/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0482/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0483/A.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0484/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0485/A.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0486/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0487/A.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0488/A.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0489/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0490/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0490/B.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0491/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0492/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0493/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0494/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0495/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0496/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0497/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0498/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0499/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0500/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0501/JavaEditor.js3243
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0502/A.js28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0503/A.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0504/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0505/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0506/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0507/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0507/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0508/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0509/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0509/B.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0510/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0511/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0512/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0513/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0514/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0515/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0516/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0517/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0518/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0519/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0520/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0521/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0522/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0523/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0524/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0525/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0526/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0527/A.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0528/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0529/A.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0530/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0531/A.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0532/A.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0533/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0534/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0535/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0536/A.js505
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0537/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0537/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0537/C.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0538/A.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0539/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0541/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0541/B.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0542/A.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0543/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0544/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/First.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/Second.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0545/Third.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0546/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0547/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0548/PaletteStackEditPart.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0549/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0550/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0551/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0552/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0553/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0554/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0554/B.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0555/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0555/B.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0556/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0557/A.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0559/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0560/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0561/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0562/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0563/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0564/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0565/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0566/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0567/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0568/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0569/A.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0570/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0573/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0573/Y.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0573/Z.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0574/X.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0575/X.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0578/X.js51
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0579/ParserTask.js91
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0580/DiamondSquareTerrainGenerator.js123
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0582/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0595/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0595a/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0597/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0599/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0600/C.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0600/Try.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0602/X.js2890
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0603/X.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0604/X.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0605/X.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0606/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0610/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0610/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0619/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0629/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0630/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0631/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0653/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0653/X.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0657/A.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter/src/test0657/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/.settings/.jsdtscope6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/A.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/A2.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/Annot.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/E.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/E2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/CreateMembers/src/E3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/.classpath8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testBug110576/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testBug66898/Test.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testBug66898b/Test.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testUTF8/Test.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/src/testUTF8BOM/Test.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/testUTF8.jarbin1737 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Encoding/testUTF8.zipbin1038 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/.settings/.jsdtscope6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test001/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test001/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test002/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test002/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test003/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test003/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test004/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test004/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test005/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test005/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test006/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test006/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test007/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test007/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test008/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test008/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test009/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test009/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test010/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test010/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test011/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test011/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test012/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test012/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test013/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test013/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test014/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test014/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test015/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test015/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test016/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test016/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test017/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test017/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test018/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test018/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_1_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_1_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_2_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test019/A_2_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test020/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test020/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test021/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test021/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test022/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test022/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test023/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test023/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test024/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test024/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test025/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test025/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test026/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test026/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test027/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test027/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test028/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test028/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test029/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test029/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test030/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test030/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test031/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test031/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test032/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test032/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test033/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test033/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test034/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test034/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test035/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test035/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test036/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test036/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test037/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test037/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test038/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test038/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test039/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test039/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test040/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test040/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test041/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test041/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test042/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test042/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test043/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test043/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test044/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test044/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test045/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test045/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test046/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test046/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test047/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test047/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test048/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test048/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test049/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test049/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test050/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test050/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test051/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test051/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test052/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test052/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test053/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test053/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test054/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test054/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test055/A_in.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test055/A_out.js32
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test056/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test056/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test057/A_in.js293
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test057/A_out.js289
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test058/A_in.js135
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test058/A_out.js117
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test059/Parser_in.js293
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test059/Parser_out.js289
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test060/Parser_in.js135
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test060/Parser_out.js117
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test061/Parser_in.js135
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test061/Parser_out.js117
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test062/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test062/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test063/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test063/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test064/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test064/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test065/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test065/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test066/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test066/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test067/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test067/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test068/A_in.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test068/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test069/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test069/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test070/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test070/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test071/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test071/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test072/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test072/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test073/A_in.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test073/A_out.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test074/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test074/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test075/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test075/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test076/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test076/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test077/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test077/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test078/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test078/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test079/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test079/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test080/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test080/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test081/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test081/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test082/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test082/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test083/A_in.js28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test083/A_out.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test084/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test084/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test085/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test085/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test086/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test086/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test087/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test087/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test088/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test088/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test089/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test089/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test090/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test090/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test091/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test091/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test092/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test092/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test093/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test093/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test094/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test094/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test095/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test095/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test096/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test096/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test097/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test097/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test098/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test098/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test099/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test099/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test100/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test100/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test101/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test101/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test102/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test102/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test103/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test103/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test104/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test104/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test105/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test105/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test106/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test106/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test107/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test107/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test108/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test108/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test109/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test109/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test110/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test110/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test111/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test111/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test112/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test112/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test113/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test113/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test114/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test114/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test115/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test115/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test116/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test116/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test117/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test117/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test118/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test118/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test119/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test119/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test120/A_in.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test120/A_out.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test121/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test121/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test122/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test122/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test123/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test123/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test124/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test124/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test125/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test125/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test126/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test126/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test127/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test127/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test128/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test128/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test129/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test129/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test130/A_in.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test130/A_out.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test131/A_in.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test131/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test132/A_in.js94
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test132/A_out.js94
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test133/A_in.js156
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test133/A_out.js144
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test134/A_in.js142
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test134/A_out.js144
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test135/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test135/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test136/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test136/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test137/A_in.js129
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test137/A_out.js119
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test138/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test138/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test139/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test139/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test140/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test140/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test141/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test141/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test142/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test142/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test143/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test143/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test144/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test144/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test145/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test145/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test146/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test146/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test147/A_in.js40
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test147/A_out.js37
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test148/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test148/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test149/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test149/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test150/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test150/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test151/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test151/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test152/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test152/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test153/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test153/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test154/A_in.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test154/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test155/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test155/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test156/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test156/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test157/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test157/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test158/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test158/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test159/A_in.js44
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test159/A_out.js44
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test160/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test160/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test161/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test161/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test162/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test162/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test163/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test163/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test164/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test164/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test165/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test165/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test166/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test166/A_out.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test167/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test167/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test168/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test168/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test169/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test169/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test170/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test170/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test171/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test171/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test172/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test172/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test173/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test173/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test174/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test174/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test175/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test175/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test176/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test176/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test177/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test177/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test178/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test178/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test179/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test179/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test180/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test180/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test181/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test181/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test182/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test182/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test183/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test183/A_out.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test184/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test184/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test185/A_in.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test185/A_out.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test186/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test186/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test187/A_in.js380
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test187/A_out.js308
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test188/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test188/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test189/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test189/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test190/A_in.js50
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test190/A_out.js52
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test191/A_in.js44
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test191/A_out.js43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test192/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test192/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test193/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test193/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test194/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test194/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test195/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test195/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test196/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test196/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test197/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test197/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test198/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test198/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test199/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test199/A_out.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test200/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test200/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test201/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test201/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test202/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test202/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test203/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test203/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test204/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test204/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test205/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test205/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test206/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test206/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test207/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test207/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test208/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test208/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test209/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test209/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test210/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test210/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test211/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test211/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test212/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test212/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test213/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test213/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test214/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test214/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test215/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test215/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test216/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test216/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test217/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test217/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test218/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test218/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test219/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test219/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test220/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test220/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test221/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test221/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test222/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test222/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test223/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test223/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test224/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test224/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test225/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test225/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test226/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test226/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test227/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test227/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test228/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test228/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test229/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test229/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test230/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test230/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test231/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test231/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test232/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test232/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test233/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test233/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test234/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test234/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test235/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test235/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test236/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test236/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test237/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test237/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test238/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test238/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test239/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test239/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test240/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test240/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test241/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test241/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test242/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test242/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test243/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test243/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test244/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test244/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test245/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test245/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test246/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test246/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test247/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test247/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test248/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test248/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test249/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test249/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test250/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test250/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test251/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test251/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test252/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test252/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test253/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test253/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test254/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test254/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test255/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test255/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test256/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test256/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test257/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test257/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test258/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test258/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test259/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test259/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test260/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test260/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test261/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test261/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test262/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test262/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test263/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test263/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test264/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test264/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test265/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test265/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test266/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test266/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test267/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test267/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test268/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test268/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test269/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test269/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test270/A_in.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test270/A_out.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test271/A_in.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test271/A_out.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test272/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test272/A_out.js35
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test273/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test273/A_out.js44
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test274/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test274/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test275/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test275/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test276/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test276/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test277/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test277/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test278/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test278/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test279/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test279/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test280/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test280/A_out.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test281/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test281/A_out.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test282/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test282/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test283/A_in.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test283/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test284/A_in.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test284/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test285/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test285/A_out.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test286/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test286/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test287/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test287/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test288/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test288/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test289/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test289/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test290/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test290/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test291/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test291/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test292/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test292/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test293/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test293/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test294/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test294/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test295/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test295/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test296/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test296/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test297/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test297/A_out.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test298/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test298/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test299/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test299/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test300/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test300/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test301/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test301/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test302/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test302/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test303/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test303/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test304/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test304/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test305/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test305/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test306/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test306/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test307/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test307/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test308/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test308/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test309/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test309/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test310/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test310/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test311/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test311/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test312/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test312/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test313/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test313/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test314/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test314/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test319/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test319/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test320/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test320/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test321/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test321/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test322/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test322/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test323/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test323/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test324/A_in.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test324/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test325/A_in.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test325/A_out.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test326/A_in.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test326/A_out.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test327/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test327/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test328/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test328/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test329/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test329/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test330/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test330/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test331/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test331/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test332/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test332/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test333/A_in.js53
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test333/A_out.js55
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test334/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test334/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test335/A_in.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test335/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test336/A_in.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test336/A_out.js30
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test337/A_in.js339
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test337/A_out.js346
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test338/A_in.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test338/A_out.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test339/A_in.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test339/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test340/A_in.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test340/A_out.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test341/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test341/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test342/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test342/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test343/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test343/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test344/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test344/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test345/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test345/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test346/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test346/A_out.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test347/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test347/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test348/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test348/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test349/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test349/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test350/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test350/A_out.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test351/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test351/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test352/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test352/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test353/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test353/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test354/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test354/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test355/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test355/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test356/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test356/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test357/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test357/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test358/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test358/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test359/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test359/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test360/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test360/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test361/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test361/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test362/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test362/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test363/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test363/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test364/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test364/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test365/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test365/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test366/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test366/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test367/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test367/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test368/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test368/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test369/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test369/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test370/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test370/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test371/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test371/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test372/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test372/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test373/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test373/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test374/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test374/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test375/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test375/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test376/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test376/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test377/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test377/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test378/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test378/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test379/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test379/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test380/A_in.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test380/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test381/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test381/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test382/A_in.js80
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test382/A_out.js82
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test383/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test383/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test384/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test384/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test385/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test385/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test386/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test386/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test387/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test387/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test388/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test388/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test389/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test389/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test390/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test390/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test391/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test391/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test392/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test392/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test393/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test393/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test394/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test394/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test395/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test395/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test396/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test396/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test397/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test397/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test398/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test398/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test399/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test399/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test400/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test400/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test401/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test401/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test402/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test402/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test403/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test403/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test404/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test404/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test405/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test405/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test406/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test406/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test407/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test407/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test408/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test408/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test409/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test409/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test410/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test410/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test411/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test411/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test412/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test412/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test413/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test413/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test414/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test414/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test415/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test415/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test416/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test416/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test417/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test417/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test418/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test418/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test419/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test419/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test420/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test420/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test421/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test421/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test422/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test422/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test423/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test423/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test424/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test424/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test425/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test425/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test426/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test426/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test427/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test427/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test428/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test428/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test429/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test429/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test430/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test430/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test431/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test431/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test432/A_in.js838
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test432/A_out.js839
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test432/formatter.xml159
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test433/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test433/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test434/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test434/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test435/A_in.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test435/A_out.js23
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test436/A_in.js33
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test436/A_out.js34
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test437/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test437/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test437/formatter.xml163
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test438/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test438/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test438/formatter.xml163
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test439/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test439/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test439/formatter.xml162
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test440/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test440/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test441/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test441/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test442/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test442/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test443/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test443/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test444/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test444/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test445/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test445/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test446/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test446/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test447/test447.zipbin1852 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test448/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test448/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test449/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test449/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test450/A_in.js0
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test450/A_out.js0
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test451/test451.zipbin2024 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test452/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test452/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test453/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test453/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test454/test454.zipbin1774 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test455/A_in.js49
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test455/A_out.js51
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test456/test456.zipbin1760 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test457/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test457/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test458/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test458/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test459/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test459/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test460/A_in.js31
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test460/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test461/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test461/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test462/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test462/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test462/formatter.xml182
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test463/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test463/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test464/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test464/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test465/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test465/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test466/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test466/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test467/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test467/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test468/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test468/A_out.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test469/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test469/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test470/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test470/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test471/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test471/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test472/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test472/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test473/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test473/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test474/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test474/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test475/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test475/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test476/A_in.js30
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test476/A_out.js30
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test478/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test478/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test479/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test479/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test480/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test480/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test481/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test481/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test482/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test482/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test483/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test483/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test484/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test484/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test485/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test485/A_out.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test486/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test486/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test487/A_in.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test487/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test488/A_in.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test488/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test489/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test489/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test490/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test490/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test491/BundleChain_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test491/BundleChain_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test491/formatter.xml181
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test492/Main_in.js1574
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test492/Main_out.js1574
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test492/core_formatting.xml181
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test493/MyClass_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test493/MyClass_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test494/A_in.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test494/A_out.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test494/format.xml180
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test495/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test495/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test496/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test496/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test497/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test497/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test498/A_in.js207
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test498/A_out.js205
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test499/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test499/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test500/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test500/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test501/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test501/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test501/formatter.xml183
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test502/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test502/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test503/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test503/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test504/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test504/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test505/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test505/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test506/A_in.js77
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test506/A_out.js87
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test507/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test507/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test508/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test508/A_out.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test509/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test509/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test510/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test510/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test511/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test511/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test512/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test512/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test513/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test513/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test514/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test514/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test514/formatter.xml186
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test515/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test515/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test516/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test516/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test517/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test517/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test518/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test518/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test519/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test519/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test520/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test520/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test521/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test521/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test522/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test522/A_out.js33
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test523/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test523/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test524/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test524/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test525/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test525/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test526/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test526/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test527/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test527/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test528/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test528/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test529/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test529/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test530/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test530/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test531/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test531/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test532/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test532/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test533/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test533/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test534/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test534/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test535/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test535/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test536/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test536/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test537/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test537/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test538/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test538/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test539/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test539/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test540/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test540/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test541/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test541/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test542/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test542/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test543/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test543/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test544/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test544/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test545/A_in.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test545/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test546/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test546/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test547/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test547/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test548/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test548/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test549/A_in.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test549/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test550/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test550/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test551/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test551/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test552/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test552/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test553/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test553/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test554/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test554/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test555/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test555/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test556/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test556/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test557/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test557/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test558/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test558/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test559/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test559/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test560/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test560/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test561/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test561/A_out.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test562/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test562/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test563/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test563/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test564/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test564/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test565/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test565/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test566/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test566/A_out.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test567/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test567/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test568/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test568/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test569/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test569/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test570/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test570/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test571/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test571/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test572/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test572/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test573/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test573/A_out.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test574/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test574/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test575/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test575/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test576/A_in.js41
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test576/A_out.js40
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test577/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test577/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test578/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test578/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test579/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test579/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test580/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test580/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test581/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test581/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test582/A_in.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test582/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test583/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test583/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test584/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test584/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test585/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test585/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test586/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test586/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test587/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test587/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test588/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test588/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test589/A_in.js35
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test589/A_out.js34
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test590/A_in.js33
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test590/A_out.js33
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test591/A_in.js33
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test591/A_out.js33
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test592/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test592/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test593/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test593/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test594/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test594/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test595/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test595/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test596/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test596/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test597/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test597/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test598/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test598/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test599/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test599/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test600/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test600/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test601/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test601/A_out.js36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test605/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test605/A_out.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test606/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test606/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test607/A_in.js70
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test607/A_out.js69
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test608/A_in.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test608/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test609/A_in.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test609/A_out.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test610/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test610/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test610/formatter.xml246
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test612/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test612/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test613/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test613/A_out.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test614/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test614/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test615/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test615/A_out.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test616/A_in.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test616/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test617/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test617/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test617/formatter.xml246
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test618/A_in.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test618/A_out.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test619/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test619/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test620/A_in.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test620/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test621/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test621/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test622/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test622/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test623/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test623/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test624/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test624/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test625/A_in.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test625/A_out.js13298
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test626/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test626/A_out.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test627/A_in.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test627/A_out.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test628/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test628/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test629/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test629/A_out.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test630/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test630/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test631/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test631/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test632/A_in.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test632/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test633/A_in.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test633/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test634/A_in.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test634/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test635/A_in.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test635/A_out.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test636/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test636/A_out.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test637/A_in.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test637/A_out.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test638/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test638/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test639/A_in.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test639/A_out.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test640/A_in.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test640/A_out.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test641/A_in.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test641/A_out.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/A_in.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/A_out.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/formatter.prefs248
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test642/formatter.xml251
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test643/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test643/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test644/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test644/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test645/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test645/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test646/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test646/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test647/A_in.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test647/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test648/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test648/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test649/A_in.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test649/A_out.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test650/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test650/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test651/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test651/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test652/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test652/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test653/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test653/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test654/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test654/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test655/A_in.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Formatter/test655/A_out.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/.settings/.jsdtscope7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/NotInClasspath/p/Y.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/otherSrc()/X31997.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/otherSrc()/X92210.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/otherSrc()/Y31997.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/CA.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/D.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/E.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/O.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/Test.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/TypeReferenceAsSingleNameReference.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/W.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a2/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/References.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/Y.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/Z.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/b/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a3/b/B.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a4/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a5/B.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a6/A.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a7/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a8/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/a9/A.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/b1/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/b1/B.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/A.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/X.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/Y.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/Z.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/cls1.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/p/usecls1.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/wc1/X.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/wc2/Y.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JSSearch/src/wc3/X44884.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectSrcTests/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectSrcTests/.settings/.jsdtscope6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectSrcTests/src/A.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/.settings/.jsdtscope7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/B.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/lib.jarbin783 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/lib142530.jarbin316 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/lib148949.jarbin308 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/q/A.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/q/readme.txt0
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/x/readme.txt0
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/x/readme2.txt0
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaProjectTests/x/y/Main.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/.settings/.jsdtscope15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/AbortCompilation.jarbin1711 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/AbortCompilation.zipbin2522 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/MyJar.jarbin2040 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/MyJar.zipbin533 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/NotInClasspath/p/Y.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/b111416.jarbin846 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/corrupt.jar0
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/otherSrc()/X31997.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/otherSrc()/X92210.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/otherSrc()/Y31997.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/CA.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/D.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/E.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/InterfaceImplementors.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/MemberTypeReference/Azz.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/MemberTypeReference/B.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/NoReference/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/O.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/ObjectMemberTypeReference/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PR_1GGNOTF.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/C.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/D.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/E.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/F.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/G.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/H.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/I.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/J.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/K.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceA.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceB.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceC.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceD.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceE.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceF.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceG.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceH.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceI.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/PackageReference/NoReferenceJ.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/Test.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/TypeReferenceAsSingleNameReference.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/TypeReferenceInArray/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/TypeReferenceInImport/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/A.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/B.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/C.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/VariousTypeReferences/D.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/W.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a2/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/References.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/Y.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/Z.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/b/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a3/b/B.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a4/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a5/B.js25
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a6/A.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a7/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a8/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/a9/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b1/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b1/B.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b111416/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b2/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b2/Y.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b2/Z.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b3/X.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b4/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b5/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b6/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b7/X.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b8/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/b9/Foo.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c1/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c1/B.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c1/I.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c10/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c11/A.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c2/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c2/B.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c3/C.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c4/X.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c5/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c6/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c7/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c7/Y.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c8/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c8/Y.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/c9/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d1/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d2/Y.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d2/Z.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d3/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d4/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d4/Y.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d5/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d5/Y.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d6/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d6/Y.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d7/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d8/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d8/AA.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d9/p1/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/d9/p2/B.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e1/A29366.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e2/X.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e3/X31985.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e3/Y31985.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e4/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e5/A1.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e6/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e7/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e8/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/e9/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/f1/X.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/f2/X.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/f3/X.js24
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocHiddenRef.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocInvalidRef.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocSearched.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j1/JavadocValidRef.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j2/Bug47968.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j2/Bug47968s.js30
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j3/Y.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CC47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CF47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CM47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/CT47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FC47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FF47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FM47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/FT47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MC47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MF47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MM47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/MT47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TC47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TF47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TM47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j4/TT47209.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j5/Bug49994.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j6/Bug54962.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/j7/qua/li/fied/Bug54962a.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/net/sf/saxon/om/Navigator.js637
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/A.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/I.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/X.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/Y.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p/Z.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p10/a/b/dom/Y.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p10/a/b/om/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p2/Z.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p3/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p3/p2/p/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p4/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p5/A.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p6/A.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p7/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p71267/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p71267/q71267/Test.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p8/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/p9/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q1/B.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q2/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q3/A$B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q4/C.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q5/AQ.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q6/CD.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q7/AQ.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q8/EclipseTest.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/q9/I.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r/A.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r2/I.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r2/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r3/A21485.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r4/B21485.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r5/XYZ.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r6/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r6/B.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r7/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r7/B.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r8/A.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/r9/A.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s1/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s1/Y.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s2/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s2/Z.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s3/A.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s4/X.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/s5/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/sd/AQ.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc1/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc2/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/src/wc3/X44884.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test20631.jarbin978 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test20631.zipbin208 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test24741.jarbin1145 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test47909.jarbin1093 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test47989.jarbin1168 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test48261.jarbin1207 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch/test48725.jarbin1240 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/.classpath6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/a1/Author.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/a1/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/e1/Team.js29
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/e1/Test.js28
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/def/Generic.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/def/NonGeneric.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R1.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R2.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R3.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/m/ref/R4.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/def/Generic.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/def/NonGeneric.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R1.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R2.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R3.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g1/t/s/ref/R4.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R1.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R2.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R3.js54
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/def/R4.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR1.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR2.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR3.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/m/ref/RR4.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R1.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R2.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R3.js54
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/def/R4.js38
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR1.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR2.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR3.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g2/f/s/ref/RR4.js21
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/GM.js20
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/GS.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/NGM.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/def/NGS.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R1.js43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R2.js43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R3.js43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g3/t/ref/R4.js43
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R1.js35
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R2.js36
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R3.js35
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R4.js35
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g4/v/ref/R5.js48
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/def/Multiple.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/def/Single.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/ref/RefMultiple.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/ref/RefRaw.js22
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/c/ref/RefSingle.js27
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/def/Multiple.js32
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/def/Single.js32
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/ref/RefMultiple.js42
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/ref/RefRaw.js26
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g5/m/ref/RefSingle.js59
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/def/List.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/def/Table.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/Multiple.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/QualifMultiple.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/QualifSingle.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/g6/t/ref/Single.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p1/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p1/Y.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p2/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p2/Y.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/p3/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/A.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/B.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/C.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/D.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s1/pack/age/S.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/B.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/C.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/D.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/s2/pack/age/S.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearch15/src/v1/X.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/.classpath19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/JavaSearch15.jarbin8077 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b110422.jarbin724 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b123679.jarbin2782 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b124469.jarbin6234 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b124645.jarbin6715 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b125178.jarbin2098 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b126330.jarbin1135 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b128877.jarbin1851 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b137984.jarbin1688 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b140156.jarbin928 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b148215.jarbin1675 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b164791.jarbin3587 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b166348.jarbin955 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b86293.jarbin1568 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b87627.jarbin1169 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b89848/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b89848/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/b95152.jarbin6646 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/test75816.jarbin1169 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/lib/test81556.jarbin717 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b108088/B108088.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b108088/Test108088.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b123679/pack/I123679.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b123679/test/Test.js19
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/T_124645.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/test/A_124645.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/test/X_124645.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/xy/X_124645.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b124645/xy/Y_124645.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b127628/Test127628.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b137984/C.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b163984/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b163984/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b163984/C.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/a/A81556.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/a/B81556.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/a/X81556.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b81556/b/XX81556.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b86380/Annot.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchBugs/src/b95794/Test.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects1/.classpath6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects1/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects1/lib/p/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects2/.classpath8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects2/.project18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects2/lib/p/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/JavaSearchMultipleProjects2/src/q/Z.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/.settings/.jsdtscope16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/ResolveConstructorCall.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/ResolveConstructorCallOfMemberType.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/ResolveConstructorCallOfMemberType2.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/class-folder/test0101/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/jj.jarbin997 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/jjsrc.zipbin428 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p3.jarbin483 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p3src.zipbin328 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p4.jarbin483 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/p4src.zipbin328 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveAbstractMethod.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveArgumentName.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveArrayLength.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveArrayParameterInsideParent1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveCatchArgumentName.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveCatchArgumentType1.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveCatchArgumentType2.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass1.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass2.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass3.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass4.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass5.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveClass6.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveConstructor.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveConstructorDeclaration.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDeepLocalVariable.js24
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateFieldDeclaration.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateFieldDeclaration3.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration11.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration3.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration5.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration7.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateMethodDeclaration9.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateTypeDeclaration.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateTypeDeclaration3.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveDuplicateTypeDeclaration5.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveEmptySelectionOnMethod.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveEndOfFile.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveExplicitSuperConstructorCall.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveExplicitThisConstructorCall.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveField.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveField0.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveFieldDeclaration.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveImport.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveInnerClassAsParamater.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveInterface.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass1.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass2.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass3.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass4.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass5.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass6.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalClass7.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalConstructor.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalConstructorDeclaration.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalField.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalField2.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalFieldDeclaration.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMemberTypeDeclaration1.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMemberTypeDeclaration2.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMethod.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMethod2.js17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalMethodDeclaration.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalName.js15
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveLocalVariable.js18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMemberTypeDeclaration1.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMemberTypeDeclaration2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMessageSendOnBaseType.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethod.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclaration.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInAnonymous.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInAnonymous2.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInAnonymous3.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodDeclarationInInterface.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveMethodWithIncorrectParameter.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolvePackage.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolvePartiallyQualifiedType.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName4.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedName5.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveQualifiedType.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeDeclaration.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeEmptySelection.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeEmptySelection2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveTypeInComment.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/ResolveUnicode.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/SuperClass.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/SuperInterface.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/X1.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/a/b/ImportedClass.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/b120350/Test.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/b120350/X.js1
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/p1/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/p1/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/p2/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src/pp/qq/XX.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0001/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0002/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0003/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0005/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0006/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0007/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0008/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0009/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0010/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0011/Test.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0012/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0013/Test.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0014/Test.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0015/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0016/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0017/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0018/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0019/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0020/Test.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0021/Test.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0022/Y.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0023/Test.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0024/Test.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/src2/test0025/Test.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test0023.jarbin4537 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test0023src.zipbin923 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test25888.jarbin1083 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test25888src.zipbin286 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test47177.jarbin1236 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test47177src.zipbin608 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/test47214.jarbin1126 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/zzz.jarbin1621 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Resolve/zzzsrc.zipbin400 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/.classpath16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/class-folder/aa/bb/cc/CClass.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/class-folder/bug132665/Bug132665.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/SnippetCompletion/src/aa/bb/cc/BClass.js16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/.settings/.jsdtscope16
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/NotInClasspath/e/E.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/lib.jarbin6026 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/lib48459/p48459/p2/Y48459.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/lib53095/p53095/X53095.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/cycle/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/cycle/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/A.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/Deep.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/I1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/I2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p1/Z.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/I3.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p2/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/I.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p3/I1.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p4/X.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p48459/p1/X48459.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p48459/p1/Z48459.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p5/X.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p6/A.js12
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p7/A.js37
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p7/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p8/X.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/p9/X.js9
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q1/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q1/Z.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q2/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q3/Z.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q4/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q4/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q5/X.js7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q6/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q6/Z.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/q7/X.js11
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/src/wc/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test144976.jarbin1235 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test49809.jarbin682 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test54043.jarbin2263 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test58440.jarbin1620 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchy/test60365.jarbin902 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyDependent/.project18
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyDependent/.settings/.jsdtscope7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyDependent/Dependent.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/.settings/.jsdtscope7
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/a/A.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/b/B.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/c/C.js5
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/d/D.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/e/E.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/i/I1.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/i/I2.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/External.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/MyError.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/X.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p/other/External.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p2/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p2/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p3/A.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchyNotification/src/p3/B.js4
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/.settings/.jsdtscope6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/Y.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeHierarchySerialization/src/p1/Z.js2
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/.project17
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/.settings/.jsdtscope6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p/TypeResolve.js13
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p1/X.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p2/Y.js3
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p3/B.js14
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p4/A.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p4/B.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/TypeResolve/src/p5/A.js10
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/.classpath7
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/.cvsignore2
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/.project28
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/META-INF/MANIFEST.MF22
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/about.html28
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/build.properties20
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/icons/full/eview16/package.gifbin145 -> 0 bytes-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/plugin.properties17
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/plugin.xml14
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/src/org/eclipse/wst/jsdt/ui/tests/EditorTests.java80
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/src/org/eclipse/wst/jsdt/ui/tests/JSDTUITests.java58
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/src/org/eclipse/wst/jsdt/ui/tests/internal/Activator.java29
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/src/org/eclipse/wst/jsdt/ui/tests/internal/JsStorageEditorInput.java164
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/test.xml117
4113 files changed, 0 insertions, 544393 deletions
diff --git a/features/org.eclipse.wst.jsdt_tests.feature/.cvsignore b/features/org.eclipse.wst.jsdt_tests.feature/.cvsignore
deleted file mode 100644
index c14487c..0000000
--- a/features/org.eclipse.wst.jsdt_tests.feature/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-build.xml
diff --git a/features/org.eclipse.wst.jsdt_tests.feature/.project b/features/org.eclipse.wst.jsdt_tests.feature/.project
deleted file mode 100644
index 808c20f..0000000
--- a/features/org.eclipse.wst.jsdt_tests.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.jsdt_tests.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.wst.jsdt_tests.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.wst.jsdt_tests.feature/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 06da1cb..0000000
--- a/features/org.eclipse.wst.jsdt_tests.feature/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Dec 12 03:20:23 EST 2007
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
diff --git a/features/org.eclipse.wst.jsdt_tests.feature/build.properties b/features/org.eclipse.wst.jsdt_tests.feature/build.properties
deleted file mode 100644
index 27affc5..0000000
--- a/features/org.eclipse.wst.jsdt_tests.feature/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-bin.includes = feature.xml,\
- epl-v10.html,\
- eclipse_update_120.jpg,\
- license.html,\
- feature.properties
diff --git a/features/org.eclipse.wst.jsdt_tests.feature/eclipse_update_120.jpg b/features/org.eclipse.wst.jsdt_tests.feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708..0000000
--- a/features/org.eclipse.wst.jsdt_tests.feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.wst.jsdt_tests.feature/epl-v10.html b/features/org.eclipse.wst.jsdt_tests.feature/epl-v10.html
deleted file mode 100644
index ed4b196..0000000
--- a/features/org.eclipse.wst.jsdt_tests.feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.wst.jsdt_tests.feature/feature.properties b/features/org.eclipse.wst.jsdt_tests.feature/feature.properties
deleted file mode 100644
index c4d1bc9..0000000
--- a/features/org.eclipse.wst.jsdt_tests.feature/feature.properties
+++ /dev/null
@@ -1,170 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2010 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=JSDT Tests
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse Web Tools Platform
-
-# "updateSiteName" property - label for the update site
-updateSiteName=The Eclipse Web Tools Platform (WTP) Project update site
-
-# "description" property - description of the feature
-description=JSDT Tests
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2010 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-April 14, 2010\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse Foundation source code\n\
-repository ("Repository") in software modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
-Update License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-\n\Use of Provisioning Technology\n\
-\n\
-The Eclipse Foundation makes available provisioning software, examples of which include,\n\
-but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
-the purpose of allowing users to install software, documentation, information and/or\n\
-other materials (collectively "Installable Software"). This capability is provided with\n\
-the intent of allowing such users to install, extend and update Eclipse-based products.\n\
-Information about packaging Installable Software is available at\n\
-http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
-\n\
-You may use Provisioning Technology to allow other parties to install Installable Software.\n\
-You shall be responsible for enabling the applicable license agreements relating to the\n\
-Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
-in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
-making it available in accordance with the Specification, you further acknowledge your\n\
-agreement to, and the acquisition of all necessary rights to permit the following:\n\
-\n\
- 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
- the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
- extending or updating the functionality of an Eclipse-based product.\n\
- 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
- Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
- 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
- govern the use of the Installable Software ("Installable Software Agreement") and such\n\
- Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
- with the Specification. Such Installable Software Agreement must inform the user of the\n\
- terms and conditions that govern the Installable Software and must solicit acceptance by\n\
- the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
- indication of agreement by the user, the provisioning Technology will complete installation\n\
- of the Installable Software.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use, and\n\
-re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.wst.jsdt_tests.feature/feature.xml b/features/org.eclipse.wst.jsdt_tests.feature/feature.xml
deleted file mode 100644
index 2054370..0000000
--- a/features/org.eclipse.wst.jsdt_tests.feature/feature.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.wst.jsdt_tests.feature"
- label="%featureName"
- version="1.2.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="license.html">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/webtools/updates/"/>
- </url>
-
- <plugin
- id="org.eclipse.wst.jsdt.core.tests.compiler"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.wst.jsdt.core.tests.model"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.wst.jsdt.ui.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.wtp.releng.versionchecker"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.wtp.releng.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
-
- <plugin
- id="org.eclipse.wst.jsdt.debug.rhino.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="true"/>
-
- <plugin
- id="org.eclipse.wst.jsdt.debug.core.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="true"/>
-
-</feature>
diff --git a/features/org.eclipse.wst.jsdt_tests.feature/license.html b/features/org.eclipse.wst.jsdt_tests.feature/license.html
deleted file mode 100644
index c184ca3..0000000
--- a/features/org.eclipse.wst.jsdt_tests.feature/license.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>April 14, 2010</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
- repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
- Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
- other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
- href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
- (&quot;Specification&quot;).</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
- applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
- in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
- Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
- <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
- on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
- product.</li>
- <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
- Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
- the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
- indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-</body>
-</html>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/.classpath b/tests/org.eclipse.wst.jsdt.core.tests.compiler/.classpath
deleted file mode 100644
index ce73933..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/.cvsignore b/tests/org.eclipse.wst.jsdt.core.tests.compiler/.cvsignore
deleted file mode 100644
index 7722bc8..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-build.xml
-javaCompiler...args
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/.project b/tests/org.eclipse.wst.jsdt.core.tests.compiler/.project
deleted file mode 100644
index ba31f32..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.jsdt.core.tests.compiler</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/.settings/org.eclipse.core.resources.prefs b/tests/org.eclipse.wst.jsdt.core.tests.compiler/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 5fc8110..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Dec 12 03:20:36 EST 2007
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.wst.jsdt.core.tests.compiler/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 839a233..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Mon Dec 07 03:40:31 EST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.jsdt.core.tests.compiler/META-INF/MANIFEST.MF
deleted file mode 100644
index d0b9d39..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.wst.jsdt.core.tests.compiler; singleton:=true
-Bundle-Version: 1.0.300.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.jsdt.core;bundle-version="[1.1.0,2.0.0)",
- org.junit;bundle-version=3.8.2
-Export-Package: org.eclipse.wst.jsdt.core.tests.compiler,
- org.eclipse.wst.jsdt.core.tests.compiler.parser,
- org.eclipse.wst.jsdt.core.tests.compiler.regression,
- org.eclipse.wst.jsdt.core.tests.eval.target,
- org.eclipse.wst.jsdt.core.tests.future.compiler.regression,
- org.eclipse.wst.jsdt.core.tests.interpret,
- org.eclipse.wst.jsdt.core.tests.junit.extension,
- org.eclipse.wst.jsdt.core.tests.runtime,
- org.eclipse.wst.jsdt.core.tests.util
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-ActivationPolicy: lazy
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/about.html b/tests/org.eclipse.wst.jsdt.core.tests.compiler/about.html
deleted file mode 100644
index 4602330..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/build.properties b/tests/org.eclipse.wst.jsdt.core.tests.compiler/build.properties
deleted file mode 100644
index 5717ad8..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = test.xml,\
- .,\
- plugin.properties,\
- META-INF/,\
- about.html
-src.includes = test.xml
-source.. = src/
-jars.compile.order = .
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/plugin.properties b/tests/org.eclipse.wst.jsdt.core.tests.compiler/plugin.properties
deleted file mode 100644
index 540ee82..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2010 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-#
-# Messages in plugin.xml.
-#
-pluginName=JSDT Core Compiler Tests
-providerName=Eclipse Web Tools Platform
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/JSDTCompilerTests.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/JSDTCompilerTests.java
deleted file mode 100644
index 6b32849..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/JSDTCompilerTests.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.jsdt.core.JavaScriptCore;
-import org.eclipse.wst.jsdt.core.tests.compiler.parser.SyntaxErrorTest;
-import org.eclipse.wst.jsdt.core.tests.compiler.regression.BasicAnalyseTests;
-import org.eclipse.wst.jsdt.core.tests.compiler.regression.BasicParserTests;
-import org.eclipse.wst.jsdt.core.tests.compiler.regression.BasicResolveTests;
-import org.eclipse.wst.jsdt.core.tests.compiler.regression.CharOperationTest;
-import org.eclipse.wst.jsdt.core.tests.compiler.regression.InferTypesTests;
-import org.eclipse.wst.jsdt.core.tests.compiler.regression.UtilTest;
-import org.eclipse.wst.jsdt.core.tests.interpret.BasicInterpretTest;
-
-/**
- * Run all compiler regression tests
- */
-public class JSDTCompilerTests extends TestSuite {
-
-static {
- JavaScriptCore.getPlugin().getPluginPreferences().setValue("semanticValidation", true);
-}
-
-public JSDTCompilerTests() {
- this("JavaScript Model Tests");
-}
-
-public JSDTCompilerTests(String testName) {
- super(testName);
-}
-public static Test suite() {
-
- ArrayList standardTests = new ArrayList();
-
- // regression tests
- standardTests.add(BasicParserTests.class);
- standardTests.add(InferTypesTests.class);
- standardTests.add(BasicResolveTests.class);
- standardTests.add(BasicAnalyseTests.class);
- standardTests.add(CharOperationTest.class);
- standardTests.add(UtilTest.class);
-
- // parser tests
- standardTests.add(SyntaxErrorTest.class);
-
- // interpret tests
- standardTests.add(BasicInterpretTest.class);
-
-
-
-
-// standardTests.addAll(JavadocTest.allTestClasses);
-
-// standardTests.add(BasicErrorTests.class);
-
- // // add all javadoc tests
-// for (int i=0, l=JavadocTest.ALL_CLASSES.size(); i<l; i++) {
-// standardTests.add(JavadocTest.ALL_CLASSES.get(i));
-// }
-//
- TestSuite all = new TestSuite("JSDT 'Compiler' Tests");
-// int possibleComplianceLevels = AbstractCompilerTest.getPossibleComplianceLevels();
-// if ((possibleComplianceLevels & AbstractCompilerTest.F_1_3) != 0) {
-// ArrayList tests_1_3 = (ArrayList)standardTests.clone();
-// tests_1_3.add(Compliance_1_3.class);
-// tests_1_3.add(JavadocTest_1_3.class);
-// // Reset forgotten subsets tests
-// TestCase.TESTS_PREFIX = null;
-// TestCase.TESTS_NAMES = null;
-// TestCase.TESTS_NUMBERS= null;
-// TestCase.TESTS_RANGE = null;
-// TestCase.RUN_ONLY_ID = null;
-// all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_3, tests_1_3));
-// }
-// if ((possibleComplianceLevels & AbstractCompilerTest.F_1_4) != 0) {
-// ArrayList tests_1_4 = (ArrayList)standardTests.clone();
-// tests_1_4.add(AssertionTest.class);
-// tests_1_4.add(Compliance_1_4.class);
-// tests_1_4.add(ClassFileReaderTest_1_4.class);
-// tests_1_4.add(JavadocTest_1_4.class);
-// // Reset forgotten subsets tests
-// TestCase.TESTS_PREFIX = null;
-// TestCase.TESTS_NAMES = null;
-// TestCase.TESTS_NUMBERS= null;
-// TestCase.TESTS_RANGE = null;
-// TestCase.RUN_ONLY_ID = null;
-// all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_4, tests_1_4));
-// }
-// if ((possibleComplianceLevels & AbstractCompilerTest.F_1_5) != 0) {
-// ArrayList tests_1_5 = (ArrayList)standardTests.clone();
-// tests_1_5.addAll(RunComparableTests.ALL_CLASSES);
-// tests_1_5.add(AssertionTest.class);
-// tests_1_5.add(ClassFileReaderTest_1_5.class);
-// tests_1_5.add(GenericTypeSignatureTest.class);
-// tests_1_5.add(InternalHexFloatTest.class);
-// tests_1_5.add(JavadocTest_1_5.class);
-// tests_1_5.add(BatchCompilerTest.class);
-// tests_1_5.add(ExternalizeStringLiterals15Test.class);
-// // Reset forgotten subsets tests
-// TestCase.TESTS_PREFIX = null;
-// TestCase.TESTS_NAMES = null;
-// TestCase.TESTS_NUMBERS= null;
-// TestCase.TESTS_RANGE = null;
-// TestCase.RUN_ONLY_ID = null;
-// all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_5, tests_1_5));
-// }
-// if ((possibleComplianceLevels & AbstractCompilerTest.F_1_6) != 0) {
-// ArrayList tests_1_6 = (ArrayList)standardTests.clone();
-// tests_1_6.addAll(RunComparableTests.ALL_CLASSES);
-// tests_1_6.add(AssertionTest.class);
-// tests_1_6.add(ClassFileReaderTest_1_5.class);
-// tests_1_6.add(GenericTypeSignatureTest.class);
-// tests_1_6.add(InternalHexFloatTest.class);
-// tests_1_6.add(JavadocTest_1_5.class);
-// tests_1_6.add(BatchCompilerTest.class);
-// tests_1_6.add(ExternalizeStringLiterals15Test.class);
-// tests_1_6.add(StackMapAttributeTest.class);
-// // Reset forgotten subsets tests
-// TestCase.TESTS_PREFIX = null;
-// TestCase.TESTS_NAMES = null;
-// TestCase.TESTS_NUMBERS= null;
-// TestCase.TESTS_RANGE = null;
-// TestCase.RUN_ONLY_ID = null;
-// all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_6, tests_1_6));
-// }
- for (Iterator iter = standardTests.iterator(); iter.hasNext();) {
- Class test = (Class) iter.next();
- all.addTestSuite(test);
- }
- return all;
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AbstractCompletionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AbstractCompletionTest.java
deleted file mode 100644
index 3ec8ee5..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AbstractCompletionTest.java
+++ /dev/null
@@ -1,481 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import java.util.Locale;
-
-import org.eclipse.wst.jsdt.internal.codeassist.complete.CompletionParser;
-import org.eclipse.wst.jsdt.internal.codeassist.complete.CompletionScanner;
-import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
-import org.eclipse.wst.jsdt.internal.compiler.DefaultErrorHandlingPolicies;
-import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
-import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.ast.Initializer;
-import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.wst.jsdt.internal.compiler.parser.Parser;
-import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblemFactory;
-import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
-import org.eclipse.wst.jsdt.core.compiler.CharOperation;
-import org.eclipse.wst.jsdt.core.tests.util.AbstractCompilerTest;
-import org.eclipse.wst.jsdt.core.tests.util.Util;
-
-public abstract class AbstractCompletionTest extends AbstractCompilerTest {
-
- public final static String NONE = "<NONE>";
-public AbstractCompletionTest(String testName){
- super(testName);
-}
-/*
- * DietParse with completionNode check
- */
-public void checkDietParse(
- char[] source,
- int cursorLocation,
- String expectedCompletion,
- String expectedUnitToString,
- String expectedCompletionIdentifier,
- String expectedReplacedSource,
- String testName) {
- this.checkDietParse(
- source,
- cursorLocation,
- expectedCompletion,
- null,
- expectedUnitToString,
- expectedCompletionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * DietParse with completionNode check
- */
-public void checkDietParse(
- char[] source,
- int cursorLocation,
- String expectedCompletion,
- String expectedParentCompletion,
- String expectedUnitToString,
- String expectedCompletionIdentifier,
- String expectedReplacedSource,
- String testName) {
-
- CompilerOptions options = new CompilerOptions(getCompilerOptions());
- CompletionParser parser =
- new CompletionParser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- options,
- new DefaultProblemFactory(Locale.getDefault())));
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration unit = parser.dietParse(sourceUnit, compilationResult, cursorLocation);
-
- String computedCompletion = parser.assistNode == null
- ? NONE
- : parser.assistNode.toString();
- String computedParentCompletion = parser.assistNodeParent == null
- ? NONE
- : parser.assistNodeParent.toString();
- String computedUnitToString = unit.toString();
- //System.out.println(computedUnitToString);
- //System.out.println(Util.displayString(computedUnitToString));
- //System.out.println(expectedUnitToString);
-
- if (!expectedCompletion.equals(computedCompletion)) {
- System.out.println(Util.displayString(computedCompletion));
- }
- assertEquals(
- "invalid completion node-" + testName,
- expectedCompletion,
- computedCompletion);
-
- if(expectedParentCompletion != null) {
- if (!expectedParentCompletion.equals(computedParentCompletion)) {
- System.out.println(Util.displayString(computedParentCompletion));
- }
- assertEquals(
- "invalid completion parent node-" + testName,
- expectedParentCompletion,
- computedParentCompletion);
- }
-
- if (!expectedUnitToString.equals(computedUnitToString)) {
- System.out.println(Util.displayString(computedUnitToString));
- }
- assertEquals(
- "invalid completion tree-" + testName,
- expectedUnitToString,
- computedUnitToString);
-
- if (expectedCompletionIdentifier != null){
- char[] chars = ((CompletionScanner)parser.scanner).completionIdentifier;
- String computedCompletionIdentifier = chars == null ? NONE : new String(chars);
- assertEquals(
- "invalid completion identifier-" + testName,
- expectedCompletionIdentifier,
- computedCompletionIdentifier);
- }
-
- if (expectedReplacedSource != null){
- char[] chars = null;
- if (parser.assistNode != null){
- chars = CharOperation.subarray(
- parser.scanner.source,
- parser.assistNode.sourceStart,
- parser.assistNode.sourceEnd + 1);
- } else {
- if (parser.assistIdentifier() != null){
- if (((CompletionScanner)parser.scanner).completedIdentifierEnd
- >= ((CompletionScanner)parser.scanner).completedIdentifierStart){
- chars = CharOperation.subarray(
- parser.scanner.source,
- ((CompletionScanner)parser.scanner).completedIdentifierStart,
- ((CompletionScanner)parser.scanner).completedIdentifierEnd + 1);
- }
- }
- }
- String computedReplacedSource = chars == null ? NONE : new String(chars);
- assertEquals(
- "invalid replaced source-" + testName,
- expectedReplacedSource,
- computedReplacedSource);
- }
-}
-/*
- * Parse a method with completionNode check
- */
-public void checkMethodParse(
- char[] source,
- int cursorLocation,
- String expectedCompletion,
- String expectedParentCompletion,
- String expectedUnitToString,
- String expectedCompletionIdentifier,
- String expectedReplacedSource,
- String[] expectedLabels,
- String testName) {
-
- assertTrue("bad cursor location",cursorLocation>=0);
- CompilerOptions options = new CompilerOptions(getCompilerOptions());
- CompletionParser parser =
- new CompletionParser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- options,
- new DefaultProblemFactory(Locale.getDefault())));
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration unit = parser.dietParse(sourceUnit, compilationResult, cursorLocation);
-
- if (Parser.DO_DIET_PARSE)
- {
- ASTNode foundMethod = null;
- if (unit.types != null) {
- for (int i = 0; i < unit.types.length; i++) {
- TypeDeclaration type = unit.types[i];
- ASTNode method = findMethod(type, cursorLocation);
- if (method != null) {
- foundMethod = method;
- break;
- }
- }
- }
- assertTrue("no method found at cursor location", foundMethod != null);
- if (foundMethod instanceof AbstractMethodDeclaration) {
- parser.parseBlockStatements((AbstractMethodDeclaration)foundMethod, unit);
- } else {
- TypeDeclaration type = (TypeDeclaration)foundMethod;
- if (type.fields != null) {
- for (int i = 0; i < type.fields.length; i++) {
- FieldDeclaration field = type.fields[i];
- if (field.declarationSourceStart <= cursorLocation && (cursorLocation <= field.declarationSourceEnd || field.declarationSourceEnd == 0)) {
- if (field instanceof Initializer) {
- parser.parseBlockStatements((Initializer)field, type, unit);
- break;
- }
- assertTrue("TBD", false); // field initializer
- }
- }
- }
- }
- }
-
- String computedCompletion = parser.assistNode == null
- ? NONE
- : parser.assistNode.toString();
- String computedParentCompletion = parser.assistNodeParent == null
- ? NONE
- : parser.assistNodeParent.toString();
- String computedUnitToString = unit.toString();
-
- if (!expectedCompletion.equals(computedCompletion)) {
- System.out.println(Util.displayString(computedCompletion));
- }
- assertEquals(
- "invalid completion node-" + testName,
- expectedCompletion,
- computedCompletion);
-
- if(expectedParentCompletion != null) {
- if (!expectedParentCompletion.equals(computedParentCompletion)) {
- System.out.println(Util.displayString(computedParentCompletion));
- }
- assertEquals(
- "invalid completion parent node-" + testName,
- expectedParentCompletion,
- computedParentCompletion);
- }
-
- if (!expectedUnitToString.equals(computedUnitToString)) {
- System.out.println(Util.displayString(computedUnitToString));
- }
- assertEquals(
- "invalid completion location-"+testName,
- expectedUnitToString,
- computedUnitToString);
-
- if (expectedCompletionIdentifier != null){
- char[] chars = ((CompletionScanner)parser.scanner).completionIdentifier;
- String computedCompletionIdentifier = chars == null ? NONE : new String(chars);
- if (!expectedCompletionIdentifier.equals(computedCompletionIdentifier)) {
- System.out.println(Util.displayString(computedCompletionIdentifier));
- }
- assertEquals(
- "invalid completion identifier-" + testName,
- expectedCompletionIdentifier,
- computedCompletionIdentifier);
- }
- if (expectedReplacedSource != null){
- char[] chars = null;
- if (parser.assistNode != null){
- chars = CharOperation.subarray(
- parser.scanner.source,
- parser.assistNode.sourceStart,
- parser.assistNode.sourceEnd + 1);
- } else {
- if (parser.assistIdentifier() != null){
- if (((CompletionScanner)parser.scanner).completedIdentifierEnd
- >= ((CompletionScanner)parser.scanner).completedIdentifierStart){
- chars = CharOperation.subarray(
- parser.scanner.source,
- ((CompletionScanner)parser.scanner).completedIdentifierStart,
- ((CompletionScanner)parser.scanner).completedIdentifierEnd + 1);
- }
- }
- }
- String computedReplacedSource = chars == null ? NONE : new String(chars);
- if (!expectedReplacedSource.equals(computedReplacedSource)) {
- System.out.println(Util.displayString(computedReplacedSource));
- }
- assertEquals(
- "invalid replaced source-" + testName,
- expectedReplacedSource,
- computedReplacedSource);
- if (expectedReplacedSource.length() == 0) {
- assertEquals(
- "invalid insertion point-" + testName,
- cursorLocation + 1,
- parser.assistNode.sourceStart);
- }
- }
- if (expectedLabels != null) {
-// int length = (parser.labels == null) ? 0 : parser.labels.length;
-// assertEquals("invalid number of labels-" + testName, expectedLabels.length, length);
-// for (int i = 0; i < length; i++) {
-// String label = new String(parser.labels[i]);
-// assertEquals("invalid label-" + testName, expectedLabels[i], label);
-// }
- }
-}
-/*
- * Parse a method with completionNode check
- */
-public void checkMethodParse(
- char[] source,
- int cursorLocation,
- String expectedCompletion,
- String expectedUnitToString,
- String expectedCompletionIdentifier,
- String expectedReplacedSource,
- String testName) {
-
- this.checkMethodParse(
- source,
- cursorLocation,
- expectedCompletion,
- null,
- expectedUnitToString,
- expectedCompletionIdentifier,
- expectedReplacedSource,
- null,
- testName);
-}
-/*
- * Parse a method with completionNode check
- */
-public void checkMethodParse(
- char[] source,
- int cursorLocation,
- String expectedCompletion,
- String expectedParentCompletion,
- String expectedUnitToString,
- String expectedCompletionIdentifier,
- String expectedReplacedSource,
- String testName) {
-
- this.checkMethodParse(
- source,
- cursorLocation,
- expectedCompletion,
- expectedParentCompletion,
- expectedUnitToString,
- expectedCompletionIdentifier,
- expectedReplacedSource,
- null,
- testName);
-}
-/*
- * Parse a method with completionNode check
- */
-public void checkMethodParse(
- char[] source,
- int cursorLocation,
- String expectedCompletion,
- String expectedUnitToString,
- String expectedCompletionIdentifier,
- String expectedReplacedSource,
- String[] expectedLabels,
- String testName) {
-
- this.checkMethodParse(
- source,
- cursorLocation,
- expectedCompletion,
- null,
- expectedUnitToString,
- expectedCompletionIdentifier,
- expectedReplacedSource,
- expectedLabels,
- testName);
-}
-/*
- * Returns the method, the constructor or the type declaring the initializer
- * at the cursor location in the given type.
- * Returns null if not found.
- */
-private ASTNode findMethod(TypeDeclaration type, int cursorLocation) {
- if (type.methods != null) {
- for (int i = 0; i < type.methods.length; i++) {
- AbstractMethodDeclaration method = type.methods[i];
- if (method.declarationSourceStart <= cursorLocation && (cursorLocation <= method.declarationSourceEnd || method.declarationSourceEnd == 0)) {
- return method;
- }
- }
- }
- if (type.memberTypes != null) {
- for (int i = 0; i < type.memberTypes.length; i++) {
- TypeDeclaration memberType = type.memberTypes[i];
- ASTNode method = findMethod(memberType, cursorLocation);
- if (method != null) {
- return method;
- }
- }
- }
- if (type.fields != null) {
- for (int i = 0; i < type.fields.length; i++) {
- FieldDeclaration field = type.fields[i];
- if (field instanceof Initializer && field.declarationSourceStart <= cursorLocation && (cursorLocation <= field.declarationSourceEnd || field.declarationSourceEnd == 0)) {
- return type;
- }
- }
- }
- return null;
-}
-/**
- * Runs the given test that checks that diet completion parsing returns the given completion.
- */
-protected void runTestCheckDietParse(
- String compilationUnit,
- String completeBehind,
- String expectedCompletionNodeToString,
- String expectedUnitDisplayString,
- String expectedCompletionIdentifier,
- String expectedReplacedSource,
- String testName) {
-
- int cursorLocation = compilationUnit.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- compilationUnit.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- expectedCompletionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * Runs the given test that checks that method completion parsing returns the given completion.
- */
-protected void runTestCheckMethodParse(
- String compilationUnit,
- String completeBehind,
- String expectedCompletionNodeToString,
- String expectedUnitDisplayString,
- String expectedCompletionIdentifier,
- String expectedReplacedSource,
- String[] expectedLabels,
- String testName) {
-
- int completeBehindStart = compilationUnit.indexOf(completeBehind);
- assertTrue("completeBehind string not found", completeBehindStart >= 0);
- int cursorLocation = completeBehindStart + completeBehind.length() - 1;
- this.checkMethodParse(
- compilationUnit.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- expectedCompletionIdentifier,
- expectedReplacedSource,
- expectedLabels,
- testName);
-}
-/**
- * Runs the given test that checks that method completion parsing returns the given completion.
- */
-protected void runTestCheckMethodParse(
- String compilationUnit,
- String completeBehind,
- String expectedCompletionNodeToString,
- String expectedUnitDisplayString,
- String expectedCompletionIdentifier,
- String expectedReplacedSource,
- String testName) {
-
- this.runTestCheckMethodParse(
- compilationUnit,
- completeBehind,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- expectedCompletionIdentifier,
- expectedReplacedSource,
- null,
- testName);
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AbstractSelectionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AbstractSelectionTest.java
deleted file mode 100644
index 405bbcd..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AbstractSelectionTest.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import java.util.Locale;
-
-import org.eclipse.wst.jsdt.internal.codeassist.select.SelectionParser;
-import org.eclipse.wst.jsdt.internal.codeassist.select.SelectionScanner;
-import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
-import org.eclipse.wst.jsdt.internal.compiler.DefaultErrorHandlingPolicies;
-import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
-import org.eclipse.wst.jsdt.internal.compiler.ast.Block;
-import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.ast.Initializer;
-import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.wst.jsdt.internal.compiler.parser.Parser;
-import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblemFactory;
-import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
-import org.eclipse.wst.jsdt.core.compiler.CharOperation;
-import org.eclipse.wst.jsdt.core.tests.util.AbstractCompilerTest;
-import org.eclipse.wst.jsdt.core.tests.util.Util;
-
-public abstract class AbstractSelectionTest extends AbstractCompilerTest {
-
- public final static String NONE = "<NONE>";
-public AbstractSelectionTest(String testName){
- super(testName);
-}
-/*
- * DietParse with selectionNode check
- */
-public void checkDietParse(
- char[] source,
- int selectionStart,
- int selectionEnd,
- String expectedSelection,
- String expectedUnitToString,
- String expectedSelectionIdentifier,
- String expectedSelectedSource,
- String testName) {
-
- CompilerOptions options = new CompilerOptions(getCompilerOptions());
- SelectionParser parser =
- new SelectionParser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- options,
- new DefaultProblemFactory(Locale.getDefault())));
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration unit = parser.dietParse(sourceUnit, compilationResult, selectionStart, selectionEnd);
-
- String computedUnitToString = unit.toString();
- //System.out.println(computedUnitToString);
- //System.out.println(Util.displayString(computedUnitToString));
- //System.out.println(expectedUnitToString);
-
- String computedSelection = parser.assistNode == null
- ? NONE
- : parser.assistNode.toString();
- assertEquals(
- "invalid selection node-" + testName,
- expectedSelection,
- computedSelection);
-
- if (!expectedUnitToString.equals(computedUnitToString)) {
- System.out.println(Util.displayString(computedUnitToString, 2));
- }
- assertEquals(
- "invalid selection unit-" + testName,
- expectedUnitToString,
- computedUnitToString);
-
- if (expectedSelectionIdentifier != null){
- char[] chars = ((SelectionScanner)parser.scanner).selectionIdentifier;
- String computedSelectionIdentifier = chars == null ? NONE : new String(chars);
- assertEquals(
- "invalid selection identifier-" + testName,
- expectedSelectionIdentifier,
- computedSelectionIdentifier);
- }
- if (expectedSelectedSource != null){
- char[] chars = null;
- if (parser.assistNode != null){
- chars = CharOperation.subarray(
- parser.scanner.source,
- parser.assistNode.sourceStart,
- parser.assistNode.sourceEnd + 1);
- } else {
- if (parser.assistIdentifier() != null){
- if (((SelectionScanner)parser.scanner).selectionEnd
- >= ((SelectionScanner)parser.scanner).selectionStart){
- chars = CharOperation.subarray(
- parser.scanner.source,
- ((SelectionScanner)parser.scanner).selectionStart,
- ((SelectionScanner)parser.scanner).selectionEnd + 1);
- }
- }
- }
- String computedSelectedSource = chars == null ? NONE : new String(chars);
- assertEquals(
- "invalid replaced source-" + testName,
- expectedSelectedSource,
- computedSelectedSource);
- }
-}
-/*
- * Parse a method with selectionNode check
- */
-public void checkMethodParse(
- char[] source,
- int selectionStart,
- int selectionEnd,
- String expectedSelection,
- String expectedUnitToString,
- String expectedSelectionIdentifier,
- String expectedSelectedSource,
- String[] expectedLabels,
- String testName) {
-
- CompilerOptions options = new CompilerOptions(getCompilerOptions());
- SelectionParser parser =
- new SelectionParser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- options,
- new DefaultProblemFactory(Locale.getDefault())));
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration unit = parser.dietParse(sourceUnit, compilationResult, selectionStart, selectionEnd);
-
- if (Parser.DO_DIET_PARSE)
- {
- ASTNode foundMethod = null;
- if (unit.types != null) {
- for (int i = 0; i < unit.types.length; i++) {
- TypeDeclaration type = unit.types[i];
- ASTNode method = findMethod(type, selectionStart);
- if (method != null) {
- foundMethod = method;
- break;
- }
- }
- }
- assertTrue("no method found at cursor location", foundMethod != null);
- if (foundMethod instanceof AbstractMethodDeclaration) {
- parser.parseBlockStatements((AbstractMethodDeclaration)foundMethod, unit);
- } else {
- TypeDeclaration type = (TypeDeclaration)foundMethod;
- if (type.fields != null) {
- for (int i = 0; i < type.fields.length; i++) {
- FieldDeclaration field = type.fields[i];
- if (field instanceof Initializer && field.sourceStart <= selectionStart && selectionStart <= field.sourceEnd) {
- parser.parseBlockStatements((Initializer)field, type, unit);
- break;
- }
- }
- }
- }
- }
- String computedUnitToString = unit.toString();
- //System.out.println(computedUnitToString);
- //System.out.println(expectedUnitToString);
-
- String computedCompletion = parser.assistNode == null
- ? NONE
- : parser.assistNode.toString();
- assertEquals(
- "invalid selection node-" + testName,
- expectedSelection,
- computedCompletion);
-
- if (!expectedUnitToString.equals(computedUnitToString)) {
- System.out.println(Util.displayString(computedUnitToString, 2));
- }
- assertEquals(
- "invalid selection unit-"+testName,
- expectedUnitToString,
- computedUnitToString);
-
- if (expectedSelectionIdentifier != null){
- char[] chars = ((SelectionScanner)parser.scanner).selectionIdentifier;
- String computedSelectionIdentifier = chars == null ? NONE : new String(chars);
- assertEquals(
- "invalid selection identifier-" + testName,
- expectedSelectionIdentifier,
- computedSelectionIdentifier);
- }
- if (expectedSelectedSource != null){
- char[] chars = null;
- if (parser.assistNode != null){
- chars = CharOperation.subarray(
- parser.scanner.source,
- parser.assistNode.sourceStart,
- parser.assistNode.sourceEnd + 1);
- } else {
- if (parser.assistIdentifier() != null){
- if (((SelectionScanner)parser.scanner).selectionEnd
- >= ((SelectionScanner)parser.scanner).selectionStart){
- chars = CharOperation.subarray(
- parser.scanner.source,
- ((SelectionScanner)parser.scanner).selectionStart,
- ((SelectionScanner)parser.scanner).selectionEnd + 1);
- }
- }
- }
- String computedReplacedSource = chars == null ? NONE : new String(chars);
- assertEquals(
- "invalid replaced source-" + testName,
- expectedSelectedSource,
- computedReplacedSource);
- }
- if (expectedLabels != null) {
-/*
- assert("no labels-" + testName, parser.labels != null);
- int length = parser.labels.length;
- assertEquals("invalid number of labels-" + testName, expectedLabels.length, length);
- for (int i = 0; i < length; i++) {
- String label = new String(parser.labels[i]);
- assertEquals("invalid label-" + testName, expectedLabels[i], label);
- }
-*/
- }
-}
-/*
- * Parse a method with selectionNode check
- */
-public void checkMethodParse(
- char[] source,
- int selectionStart,
- int selectionEnd,
- String expectedSelection,
- String expectedUnitToString,
- String expectedSelectionIdentifier,
- String expectedSelectedSource,
- String testName) {
-
- this.checkMethodParse(
- source,
- selectionStart,
- selectionEnd,
- expectedSelection,
- expectedUnitToString,
- expectedSelectionIdentifier,
- expectedSelectedSource,
- null,
- testName);
-}
-/*
- * Returns the method, the constructor or the type declaring the initializer
- * at the cursor location in the given type.
- * Returns null if not found.
- */
-protected ASTNode findMethod(TypeDeclaration type, int cursorLocation) {
- if (type.methods != null) {
- for (int i = 0; i < type.methods.length; i++) {
- AbstractMethodDeclaration method = type.methods[i];
- if (method.declarationSourceStart <= cursorLocation && (cursorLocation <= method.declarationSourceEnd || method.declarationSourceEnd == 0)) {
- return method;
- }
- }
- }
- if (type.memberTypes != null) {
- for (int i = 0; i < type.memberTypes.length; i++) {
- TypeDeclaration memberType = type.memberTypes[i];
- ASTNode method = findMethod(memberType, cursorLocation);
- if (method != null) {
- return method;
- }
- }
- }
- if (type.fields != null) {
- for (int i = 0; i < type.fields.length; i++) {
- FieldDeclaration field = type.fields[i];
- if (field instanceof Initializer) {
- Initializer initializer = (Initializer)field;
- Block block = initializer.block;
- if (block != null && block.sourceStart <= cursorLocation && (cursorLocation <= block.sourceEnd || block.sourceEnd == 0)) {
- return type;
- }
- }
- }
- }
- return null;
-}
-/**
- * Runs the given test that checks that method completion parsing returns the given completion.
- */
-protected void runTestCheckMethodParse(
- String compilationUnit,
- String selectionStartBehind,
- String selectionEndBehind,
- String expectedSelectionNodeToString,
- String expectedUnitDisplayString,
- String expectedSelectionIdentifier,
- String expectedReplacedSource,
- String testName) {
-
- int selectionStartBehindStart = compilationUnit.indexOf(selectionStartBehind);
- assertTrue("selectionStartBehind string not found", selectionStartBehindStart != -1);
- int selectionStart = selectionStartBehindStart + selectionStartBehind.length();
- int selectionEndBehindStart = compilationUnit.indexOf(selectionEndBehind);
- assertTrue("selectionEndBehind string not found", selectionEndBehindStart != -1);
- int selectionEnd = selectionEndBehindStart + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- compilationUnit.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedSelectionNodeToString,
- expectedUnitDisplayString,
- expectedSelectionIdentifier,
- expectedReplacedSource,
- testName);
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AllocationExpressionCompletionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AllocationExpressionCompletionTest.java
deleted file mode 100644
index bf642bb..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AllocationExpressionCompletionTest.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-/**
- * Completion is expected to be an AllocationExpression.
- */
-public class AllocationExpressionCompletionTest extends AbstractCompletionTest {
-public AllocationExpressionCompletionTest(String testName) {
- super(testName);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(AllocationExpressionCompletionTest.class);
-}
-/*
- * Completion inside an if statement.
- */
-public void testInIfStatement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " if (true) { \n" +
- " new z.y.X(1, 2, i); \n" +
- " } \n" +
- " } \n" +
- "}\n",
- // completeBehind:
- "X(1, 2,",
- // expectedCompletionNodeToString:
- "<CompleteOnAllocationExpression:new z.y.X(1, 2)>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " <CompleteOnAllocationExpression:new z.y.X(1, 2)>;\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete inside an if statement>"
- );
-}
-/*
- * Completion on a constructor invocation with no qualification and using a qualified type name.
- *
- * ie. ClassInstanceCreationExpression ::= 'new' ClassType '(' ArgumentListopt ')' ClassBodyopt
- * where ClassType is a qualified type name
- */
-public void testNoQualificationQualifiedTypeName() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " new z.y.X(1, 2, i); \n" +
- " } \n" +
- "}\n",
- // completeBehind:
- "X(1, 2,",
- // expectedCompletionNodeToString:
- "<CompleteOnAllocationExpression:new z.y.X(1, 2)>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnAllocationExpression:new z.y.X(1, 2)>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete on non qualified instance creation with qualified type name>"
- );
-}
-/*
- * Completion on a constructor invocation with no qualification and using a simple type name.
- *
- * ie. ClassInstanceCreationExpression ::= 'new' ClassType '(' ArgumentListopt ')' ClassBodyopt
- * where ClassType is a simple type name
- */
-public void testNoQualificationSimpleTypeName() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " new X(1, 2, i); \n" +
- " } \n" +
- "}\n",
- // completeBehind:
- "X(1, 2,",
- // expectedCompletionNodeToString:
- "<CompleteOnAllocationExpression:new X(1, 2)>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnAllocationExpression:new X(1, 2)>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete on non qualified instance creation with simple type name>"
- );
-}
-/*
- * Completion on a constructor invocation qualified with a name.
- *
- * ie. ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
- */
-public void testQualifiedWithName() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar {\n" +
- " void foo() { \n" +
- " Buz.x.new X(1, 2, i); \n" +
- " } \n" +
- "}\n",
- // completeBehind:
- "X(1, 2,",
- // expectedCompletionNodeToString:
- "<CompleteOnQualifiedAllocationExpression:Buz.x.new X(1, 2)>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnQualifiedAllocationExpression:Buz.x.new X(1, 2)>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete on name qualified instance creation>"
- );
-}
-/*
- * Completion on a constructor invocation qualified with a primary.
- *
- * ie. ClassInstanceCreationExpression ::= Primary '.' 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
- */
-public void testQualifiedWithPrimary() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " primary().new X(1, 2, i); \n" +
- " } \n" +
- "}\n",
- // completeBehind:
- "X(1, 2,",
- // expectedCompletionNodeToString:
- "<CompleteOnQualifiedAllocationExpression:primary().new X(1, 2)>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnQualifiedAllocationExpression:primary().new X(1, 2)>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete on primary qualified instance creation>"
- );
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ClassLiteralAccessCompletionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ClassLiteralAccessCompletionTest.java
deleted file mode 100644
index a0bf291..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ClassLiteralAccessCompletionTest.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-/**
- * Completion is expected to be a ClassLiteralAccess.
- */
-public class ClassLiteralAccessCompletionTest extends AbstractCompletionTest {
-public ClassLiteralAccessCompletionTest(String testName) {
- super(testName);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(ClassLiteralAccessCompletionTest.class);
-}
-/*
- * Completion on the keyword 'class' on an array type
- */
-public void testArrayType() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " String[].; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "String[].",
- // expectedCompletionNodeToString:
- "<CompleteOnClassLiteralAccess:String[].>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnClassLiteralAccess:String[].>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "String[].",
- // test name
- "<complete on array type member>"
- );
-}
-/*
- * Test access to the keyword 'class' on an array type
- * where the keyword is non empty.
- */
-public void testArrayTypeWithNonEmptyIdentifier() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " String[].class; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "String[].cl",
- // expectedCompletionNodeToString:
- "<CompleteOnClassLiteralAccess:String[].cl>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnClassLiteralAccess:String[].cl>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "cl",
- // expectedReplacedSource:
- "String[].class",
- // test name
- "<complete on array type member with non empty identifier>"
- );
-}
-/*
- * Completion on the keyword 'class' on a primitive array type
- */
-public void testPrimitiveArrayType() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int[].; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "int[].",
- // expectedCompletionNodeToString:
- "<CompleteOnClassLiteralAccess:int[].>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnClassLiteralAccess:int[].>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "int[].",
- // test name
- "<complete on primitive array type member>"
- );
-}
-/*
- * Completion on the keyword 'class' on a primitive array type where the
- * keyword is non empty
- */
-public void testPrimitiveArrayTypeWithNonEmptyIdentifier() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int[].class; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "int[].cl",
- // expectedCompletionNodeToString:
- "<CompleteOnClassLiteralAccess:int[].cl>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnClassLiteralAccess:int[].cl>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "cl",
- // expectedReplacedSource:
- "int[].class",
- // test name
- "<complete on primitive array type member with non empty identifier>"
- );
-}
-/*
- * Completion on the keyword 'class' on a primitive type
- */
-public void testPrimitiveType() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int.; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "int.",
- // expectedCompletionNodeToString:
- "<CompleteOnClassLiteralAccess:int.>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnClassLiteralAccess:int.>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "int.",
- // test name
- "<complete on primitive type member>"
- );
-}
-/*
- * Completion on the keyword 'class' on a primitive type where the
- * keyword is non empty
- */
-public void testPrimitiveTypeWithNonEmptyIdentifier() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int.class; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "int.cl",
- // expectedCompletionNodeToString:
- "<CompleteOnClassLiteralAccess:int.cl>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnClassLiteralAccess:int.cl>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "cl",
- // expectedReplacedSource:
- "int.class",
- // test name
- "<complete on primitive type member with non empty identifier>"
- );
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionParserTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionParserTest.java
deleted file mode 100644
index 3e3f3ce..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionParserTest.java
+++ /dev/null
@@ -1,8713 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-import org.eclipse.wst.jsdt.internal.codeassist.complete.*;
-
-public class CompletionParserTest extends AbstractCompletionTest {
-public CompletionParserTest(String testName) {
- super(testName);
-}
-static {
-// TESTS_NAMES = new String[] { "testXA_1FGGUQF_1FHSL8H_1" };
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(CompletionParserTest.class);
-}
-public void testA() {
- String str =
- " function foo(){\n" +
- " var i;\n" +
- " if (i instanceof O) {\n" +
- " }\n" +
- " var s = \"hello\";\n" +
- " s.}\n" +
- "\n";
-
- String testName = "<complete on methods/fields>";
- String completeBehind = "s.";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:s.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " var i;\n" +
- " if ((i instanceof O))\n" +
- " {\n" +
- " }\n" +
- " var s = \"hello\";\n" +
- " <CompleteOnMemberAccess:s.>;\n" +
- "}" +
- "\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testAA_1() {
- String str =
- " function foo() {\n" +
- " var maxUnits = 0;\n" +
- " var unitResult = \n" +
- " new CompilationUnitResult(\n" +
- " null, \n" +
- " i, \n" +
- " maxUnits); \n" +
- " }" +
- "}\n";
-
- String completeBehind = "n";
- String expectedCompletionNodeToString = "<CompleteOnName:n>";
- String completionIdentifier = "n";
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " var maxUnits = 0;\n" +
- " var unitResult = <CompleteOnName:n>;\n" +
- " CompilationUnitResult(null, i, maxUnits);\n"+
- "}\n";
- String expectedReplacedSource = "new";
- String testName = "<complete on initializer (new)>";
-
- int cursorLocation = str.indexOf("new CompilationUnitResult(") + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-public void testAA_2() {
- String str =
- "// test unicode \\u000a var c = 1; \n" +
- "var b =c; \n";
- String testName = "<unicode in comment complete on variable>";
- String expectedCompletionNodeToString = "<CompleteOnName:c>";
- String completionIdentifier = "c";
- String expectedReplacedSource = "c";
- int cursorLocation = str.indexOf("var b =c") -1 /*+ completeBehind.length() - 1*/;
- String expectedUnitDisplayString =
- "// test unicode \\u000a var c = 1; \n" +
- "var b = <CompleteOnName:c>;\n";
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-//public void testAA_3() {
-// String str =
-// "'abc\\u0027def';\n";
-// String testName = "<unicode in comment complete on variable>";
-// String expectedCompletionNodeToString = "<CompleteOnName:c>";
-// String completionIdentifier = "c";
-// String expectedReplacedSource = "c";
-// int cursorLocation = str.indexOf("var b =") -1 /*+ completeBehind.length() - 1*/;
-// String expectedUnitDisplayString =
-// "'abc\\u0027def';\n";
-// checkMethodParse(
-// str.toCharArray(),
-// cursorLocation,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-
-//public void testAA_3() {
-// String str =
-// "package p; \n" +
-// "import something; \n" +
-// "import p2.; \n" +
-// "public class AA {\n" +
-// " void foo() {\n" +
-// " int maxUnits = 0;\n" +
-// " for (int i = 0; \n" +
-// " i < maxUnits; \n" +
-// " i++) {\n" +
-// " CompilationUnitResult unitResult = \n" +
-// " new CompilationUnitResult(\n" +
-// " null, \n" +
-// " i, \n" +
-// " maxUnits); \n" +
-// " }\n" +
-// " }\n" +
-// "}\n";
-//
-// String testName = "<complete on call to constructor argument>";
-// String completeBehind = "i";
-// String expectedCompletionNodeToString = "<CompleteOnName:i>";
-// String completionIdentifier = "i";
-// String expectedReplacedSource = "i";
-// int cursorLocation = str.indexOf("i, ") + completeBehind.length() - 1;
-// String expectedUnitDisplayString =
-// "package p;\n" +
-// "import something;\n" +
-// "public class AA {\n" +
-// " public AA() {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " int maxUnits;\n" +
-// " int i;\n" +
-// " {\n" +
-// " CompilationUnitResult unitResult = new CompilationUnitResult(null, <CompleteOnName:i>);\n" +
-// " }\n" +
-// " }\n" +
-// "}\n";
-//
-// checkMethodParse(
-// str.toCharArray(),
-// cursorLocation,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-//public void testAA_4() {
-// String str =
-// "package p; \n" +
-// "import something; \n" +
-// "import p2.; \n" +
-// "public class AA {\n" +
-// " void foo() {\n" +
-// " int maxUnits = 0;\n" +
-// " for (int i = 0; \n" +
-// " i < maxUnits; \n" +
-// " i++) {\n" +
-// " CompilationUnitResult unitResult = \n" +
-// " new CompilationUnitResult(\n" +
-// " null, \n" +
-// " i, \n" +
-// " maxUnits); \n" +
-// " }\n" +
-// " }\n" +
-// "}\n";
-//
-// String testName = "<complete on constructor call argument>";
-// String completeBehind = "max";
-// String expectedCompletionNodeToString = "<CompleteOnName:max>";
-// String completionIdentifier = "max";
-// String expectedReplacedSource = "maxUnits";
-// int cursorLocation = str.indexOf("maxUnits); ") + completeBehind.length() - 1;
-// String expectedUnitDisplayString =
-// "package p;\n" +
-// "import something;\n" +
-// "public class AA {\n" +
-// " public AA() {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " int maxUnits;\n" +
-// " int i;\n" +
-// " {\n" +
-// " CompilationUnitResult unitResult = new CompilationUnitResult(null, i, <CompleteOnName:max>);\n" +
-// " }\n" +
-// " }\n" +
-// "}\n";
-//
-// checkMethodParse(
-// str.toCharArray(),
-// cursorLocation,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-//public void testAB_1FHU9LU() {
-// String str =
-// "package p; \n" +
-// "/**\n" +
-// " * 1FHU9LU\n" +
-// " */\n" +
-// "class SuperClass {\n" +
-// " static void eFooStatic() {\n" +
-// " }\n" +
-// " void eFoo() {\n" +
-// " }\n" +
-// "}\n" +
-// "public class AB\n" +
-// " extends SuperClass {\n" +
-// " void eBar() {\n" +
-// " super.eFoo();\n" +
-// " }\n" +
-// "}\n";
-//
-// String testName = "<complete on methods/fields from super class>";
-// String completeBehind = "super.";
-// String expectedCompletionNodeToString = "<CompleteOnMemberAccess:super.>";
-// String completionIdentifier = "";
-// String expectedReplacedSource = "super.";
-// int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
-// String expectedUnitDisplayString =
-// "package p;\n" +
-// "class SuperClass {\n" +
-// " SuperClass() {\n" +
-// " }\n" +
-// " static void eFooStatic() {\n" +
-// " }\n" +
-// " void eFoo() {\n" +
-// " }\n" +
-// "}\n" +
-// "public class AB extends SuperClass {\n" +
-// " public AB() {\n" +
-// " }\n" +
-// " void eBar() {\n" +
-// " <CompleteOnMemberAccess:super.>;\n" +
-// " }\n" +
-// "}\n";
-//
-// checkMethodParse(
-// str.toCharArray(),
-// cursorLocation,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-//public void testAC_1FJ8D9Z_1() {
-// String str =
-// "package p; \n" +
-// "/**\n" +
-// " * 1FJ8D9Z\n" +
-// " */\n" +
-// "import java.io.*;\n" +
-// "public class AC {\n" +
-// " AC() {\n" +
-// " }\n" +
-// " AC(int i) {\n" +
-// " }\n" +
-// " AC(int i, String s) {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " new AC(new File(\n" +
-// " new java\n" +
-// " .util\n" +
-// " .Vector(}\n" +
-// "}\n";
-//
-// String testName = "<complete on constructor argument>";
-// String completeBehind = "new AC(";
-// String expectedCompletionNodeToString = "<CompleteOnAllocationExpression:new AC()>";
-// String completionIdentifier = "";
-// String expectedReplacedSource = "";
-// int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
-// String expectedUnitDisplayString =
-// "package p;\n" +
-// "import java.io.*;\n" +
-// "public class AC {\n" +
-// " AC() {\n" +
-// " }\n" +
-// " AC(int i) {\n" +
-// " }\n" +
-// " AC(int i, String s) {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " <CompleteOnAllocationExpression:new AC()>;\n" +
-// " }\n" +
-// "}\n";
-//
-// checkMethodParse(
-// str.toCharArray(),
-// cursorLocation,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-//public void testAC_1FJ8D9Z_2() {
-// String str =
-// "package p; \n" +
-// "/**\n" +
-// " * 1FJ8D9Z\n" +
-// " */\n" +
-// "import java.io.*;\n" +
-// "public class AC {\n" +
-// " AC() {\n" +
-// " }\n" +
-// " AC(int i) {\n" +
-// " }\n" +
-// " AC(int i, String s) {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " new AC(new File(\n" +
-// " new java\n" +
-// " .util\n" +
-// " .Vector(}\n" +
-// "}\n";
-//
-// String testName = "<complete on constructor argument>";
-// String completeBehind = "new File(";
-// String expectedCompletionNodeToString = "<CompleteOnAllocationExpression:new File()>";
-// String completionIdentifier = "";
-// String expectedReplacedSource = "";
-// int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
-// String expectedUnitDisplayString =
-// "package p;\n" +
-// "import java.io.*;\n" +
-// "public class AC {\n" +
-// " AC() {\n" +
-// " }\n" +
-// " AC(int i) {\n" +
-// " }\n" +
-// " AC(int i, String s) {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " <CompleteOnAllocationExpression:new File()>;\n" +
-// " }\n" +
-// "}\n";
-//
-// checkMethodParse(
-// str.toCharArray(),
-// cursorLocation,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-//public void testAC_1FJ8D9Z_3() {
-// String str =
-// "package p; \n" +
-// "/**\n" +
-// " * 1FJ8D9Z\n" +
-// " */\n" +
-// "import java.io.*;\n" +
-// "public class AC {\n" +
-// " AC() {\n" +
-// " }\n" +
-// " AC(int i) {\n" +
-// " }\n" +
-// " AC(int i, String s) {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " new AC(new File(\n" +
-// " new java.util.Vector(}\n" +
-// "}\n";
-//
-// String testName = "<complete on constructor argument>";
-// String completeBehind = "new java.util.Vector(";
-// String expectedCompletionNodeToString = "<CompleteOnAllocationExpression:new java.util.Vector()>";
-// String completionIdentifier = "";
-// String expectedReplacedSource = "";
-// int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
-// String expectedUnitDisplayString =
-// "package p;\n" +
-// "import java.io.*;\n" +
-// "public class AC {\n" +
-// " AC() {\n" +
-// " }\n" +
-// " AC(int i) {\n" +
-// " }\n" +
-// " AC(int i, String s) {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " <CompleteOnAllocationExpression:new java.util.Vector()>;\n" +
-// " }\n" +
-// "}\n";
-//
-// checkMethodParse(
-// str.toCharArray(),
-// cursorLocation,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-public void testB() {
- String str =
- "function B() {\n" +
- " var o = new Object \n}\n";
-
- String testName = "<complete on type into type creation>";
- String completeBehind = "new Object";
- String expectedCompletionNodeToString = "<CompleteOnName:Object>";
- String completionIdentifier = "Object";
- String expectedReplacedSource = "Object";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "function B() {\n" +
- " var o = new <CompleteOnType:Object>;\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-//public void testBA_1() {
-// String str =
-// "package p; \n" +
-// "public class BA {\n" +
-// " void foo() {\n" +
-// " java.util.Vector v2;\n" +
-// " java.util.Vector v1;\n" +
-// " }\n" +
-// "}\n";
-//
-// String testName = "<complete on package name>";
-// String completeBehind = "java.";
-// String expectedCompletionNodeToString = "<CompleteOnName:java.>";
-// String completionIdentifier = "";
-// String expectedReplacedSource = "java.";
-// int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
-// String expectedUnitDisplayString =
-// "package p;\n" +
-// "public class BA {\n" +
-// " public BA() {\n" +
-//
-// " }\n" +
-// " void foo() {\n" +
-// " <CompleteOnName:java.>;\n" +
-// " }\n" +
-// "}\n";
-//
-// checkMethodParse(
-// str.toCharArray(),
-// cursorLocation,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-//public void testBA_2() {
-// String str =
-// "package p; \n" +
-// "public class BA {\n" +
-// " void foo() {\n" +
-// " java.util.Vector v2;\n" +
-// " java.util.Vector v1;\n" +
-// " }\n" +
-// "}\n";
-//
-// String testName = "<complete on package contents>";
-// String completeBehind = "java.util.";
-// String expectedCompletionNodeToString = "<CompleteOnName:java.util.>";
-// String completionIdentifier = "";
-// String expectedReplacedSource = "java.util.";
-// int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
-// String expectedUnitDisplayString =
-// "package p;\n" +
-// "public class BA {\n" +
-// " public BA() {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " <CompleteOnName:java.util.>;\n" +
-// " }\n" +
-// "}\n";
-//
-// checkMethodParse(
-// str.toCharArray(),
-// cursorLocation,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-public void testBB_1FHJ8H9() {
- String str =
- "function bar() {\n" +
- " z }\n" +
- "\n";
-
- String testName = "<complete on method/field from implicit method call>";
- String completeBehind = "z";
- String expectedCompletionNodeToString = "<CompleteOnName:z>";
- String completionIdentifier = "z";
- String expectedReplacedSource = "z";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "function bar() {\n" +
- " <CompleteOnName:z>;\n" +
- "}" +
- "\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-//public void testBC_1FJ4GSG_1() {
-// String str =
-// "package p; \n" +
-// "/**\n" +
-// " * 1FJ4GSG\n" +
-// " */\n" +
-// "import java.util.Vector;\n" +
-// "public class BC {\n" +
-// " int Value1 = 0;\n" +
-// " interface Constants {\n" +
-// " int OK = 1;\n" +
-// " int CANCEL = 2;\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " Vector v = \n" +
-// " new Vector(\n" +
-// " Value1, \n" +
-// " BC.Constants.OK\n" +
-// " | BC.Constants.CANCEL); \n" +
-// " Object ans = v.elementAt(1);\n" +
-// " }\n" +
-// "}\n";
-//
-// String testName = "<complete on member type>";
-// String completeBehind = "BC.";
-// String expectedCompletionNodeToString = "<CompleteOnName:BC.>";
-// String completionIdentifier = "";
-// String expectedReplacedSource = "BC.";
-// int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
-// String expectedUnitDisplayString =
-// "package p;\n" +
-// "import java.util.Vector;\n" +
-// "public class BC {\n" +
-// " interface Constants {\n" +
-// " int OK;\n" +
-// " int CANCEL;\n" +
-// " <clinit>() {\n" +
-// " }\n" +
-// " }\n" +
-// " int Value1;\n" +
-// " public BC() {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " Vector v = new Vector(Value1, <CompleteOnName:BC.>);\n" +
-// " }\n" +
-// "}\n";
-//
-// checkMethodParse(
-// str.toCharArray(),
-// cursorLocation,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-//public void testBC_1FJ4GSG_2() {
-// String str =
-// "package p; \n" +
-// "/**\n" +
-// " * 1FJ4GSG\n" +
-// " */\n" +
-// "import java.util.Vector;\n" +
-// "public class BC {\n" +
-// " int Value1 = 0;\n" +
-// " interface Constants {\n" +
-// " int OK = 1;\n" +
-// " int CANCEL = 2;\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " Vector v = \n" +
-// " new Vector(\n" +
-// " Value1, \n" +
-// " BC.Constants.OK\n" +
-// " | BC.Constants.CANCEL); \n" +
-// " Object ans = v.elementAt(1);\n" +
-// " }\n" +
-// "}\n";
-//
-// String testName = "<complete on member type method/field>";
-// String completeBehind = "| BC.Constants.";
-// String expectedCompletionNodeToString = "<CompleteOnName:BC.Constants.>";
-// String completionIdentifier = "";
-// String expectedReplacedSource = "BC.Constants.";
-// int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
-// String expectedUnitDisplayString =
-// "package p;\n" +
-// "import java.util.Vector;\n" +
-// "public class BC {\n" +
-// " interface Constants {\n" +
-// " int OK;\n" +
-// " int CANCEL;\n" +
-// " <clinit>() {\n" +
-// " }\n" +
-// " }\n" +
-// " int Value1;\n" +
-// " public BC() {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " Vector v = (BC.Constants.OK | <CompleteOnName:BC.Constants.>);\n" +
-// " }\n" +
-// "}\n";
-//
-// checkMethodParse(
-// str.toCharArray(),
-// cursorLocation,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-public void testMsgSend() {
- String str =
- " function foo() {\n"+
- " var removed = 0;\n"+
- " toto(Test.vvv).titi(removed);\n"+
- " }\n";
-
- String testName = "<complete on method call>";
- String completeBehind = "removed";
- String expectedCompletionNodeToString = "<CompleteOnName:removed>";
- String completionIdentifier = "removed";
- String expectedReplacedSource = "removed";
- int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " var removed = 0;\n" +
- " toto(Test.vvv).titi(<CompleteOnName:removed>);\n" +
- "}" +
- "\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-public void testMsgSend2() {
- String str =
- " abc.titi();\n"+
- "";
-
- String testName = "<complete on method call 2>";
- String completeBehind = "titi";
- String expectedCompletionNodeToString = "<CompleteOnMessageSend:abc.titi()>";
- String completionIdentifier = "titi";
- String expectedReplacedSource = "titi()";
- int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "<CompleteOnMessageSend:abc.titi()>;" +
- "\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-public void testMsgSend3() {
- String str =
- " function foo() {\n"+
- " var removed = 0;\n"+
- " toto(Test.vvv).titi(removed);\n"+
- " }\n";
-
- String testName = "<complete on method call 3>";
- String completeBehind = "titi";
- String expectedCompletionNodeToString = "<CompleteOnMessageSend:toto(Test.vvv).titi(removed)>";
- String completionIdentifier = "titi";
- String expectedReplacedSource = "titi(removed)";
- int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " var removed = 0;\n" +
- " <CompleteOnMessageSend:toto(Test.vvv).titi(removed)>;\n" +
- "}" +
- "\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-
-public void testBC_1FJ4GSG_3() {
- String str =
- " function foo() {\n" +
- " var v = \n" +
- " new Vector();\n" +
- " var ans = v.elementAt(1);\n" +
- " }\n" +
- "\n";
-
- String testName = "<complete on method/field>";
- String completeBehind = "v.";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:v.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "v.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " var v = new Vector();\n" +
- " var ans = <CompleteOnMemberAccess:v.>;\n" +
- "}" +
- "\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-
-public void testC() {
- String str =
- "function foo() {\n" +
- " var string = n;\n" +
- " }\n" +
- "\n";
-
- String completeBehind = "= n";
- String expectedCompletionNodeToString = "<CompleteOnName:n>";
- String completionIdentifier = "n";
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " var string = <CompleteOnName:n>;\n" +
- "}\n";
- String expectedReplacedSource = "n";
- String testName = "<complete on local variable initializer>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testCA_1FGPJQZ() {
- String str =
- " function moo() {\n" +
- " unknownField.}\n" +
- "}\n";
-
- String testName = "<complete on method/field>";
- String completeBehind = "unknownField.";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:unknownField.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- String expectedUnitDisplayString =
- "function moo() {\n" +
- " <CompleteOnMemberAccess:unknownField.>;\n" +
- "}\n";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testCB_1FHSKQ9_1() {
- String str =
- " function foo() {\n" +
- " var i = 0;\n" +
- " var tab1 = 0;\n" +
- " System.out.println(\n" +
- " \" \" + (i + 1)); \n" +
- "}\n";
-
- String testName = "<complete on method call argument>";
- String completeBehind = "+ (i";
- String expectedCompletionNodeToString = "<CompleteOnName:i>";
- String completionIdentifier = "i";
- String expectedReplacedSource = "i";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " var i = 0;\n" +
- " var tab1 = 0;\n" +
- " System.out.println((\" \" + (<CompleteOnName:i> + 1)));\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testCB_1FHSKQ9_2() {
- String str =
- " function foo() {\n" +
- " var i = 0;\n" +
- " System.out.println(\n" +
- " \" \" + (i + 1)); \n" +
- "}\n";
-
- String completeBehind = "i + 1";
- String expectedCompletionNodeToString = NONE;
- String completionIdentifier = "";
- String expectedUnitDisplayString = null;
- String expectedReplacedSource = NONE;
- String testName = "<complete on digit into method call argument>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
-
- try {
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
- assertTrue("failed to detect invalid cursor location", false);
- } catch(InvalidCursorLocation e){
- assertEquals("invalid cursor location: ", e.irritant, InvalidCursorLocation.NO_COMPLETION_INSIDE_NUMBER);
- }
-}
-//public void testCC_1FJ64I9() {
-// String str =
-// "package p; \n" +
-// "/**\n" +
-// " * 1FJ64I9\n" +
-// " */\n" +
-// "class CCHelper {\n" +
-// " class Member1 {\n" +
-// " }\n" +
-// " class Member2 {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " }\n" +
-// "}\n" +
-// "public class CC {\n" +
-// " void foo() {\n" +
-// " new CCHelper()\n" +
-// " .new CCHelper()\n" +
-// " .new M }\n" +
-// "}\n";
-//
-// String testName = "<complete on qualified member type>";
-// String completeBehind = ".new M";
-// String expectedCompletionNodeToString = "<CompleteOnType:M>";
-// String completionIdentifier = "M";
-// String expectedReplacedSource = "M";
-// int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
-// String expectedUnitDisplayString =
-// "package p;\n" +
-// "class CCHelper {\n" +
-// " class Member1 {\n" +
-// " Member1() {\n" +
-// " }\n" +
-// " }\n" +
-// " class Member2 {\n" +
-// " Member2() {\n" +
-// " }\n" +
-// " }\n" +
-// " CCHelper() {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " }\n" +
-// "}\n" +
-// "public class CC {\n" +
-// " public CC() {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " new CCHelper().new CCHelper().new <CompleteOnType:M>();\n" +
-// " }\n" +
-// "}\n";
-//
-// checkMethodParse(
-// str.toCharArray(),
-// cursorLocation,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-//public void testD_1() {
-// String str =
-// "package p; \n" +
-// "import java.util.*;\n" +
-// "public class D {\n" +
-// " static int i;\n" +
-// " static {\n" +
-// " i = 5;\n" +
-// " }\n" +
-// " public int j;\n" +
-// " Vector a = new Vector();\n" +
-// " void foo(String s) {\n" +
-// " String string = null;\n" +
-// " int soso;\n" +
-// " float f;\n" +
-// " string.regionMatches(\n" +
-// " 0, \n" +
-// " \"\", \n" +
-// " 0, \n" +
-// " 0); \n" +
-// " }\n" +
-// "}\n";
-//
-// String testName = "<complete on variable into type initializer>";
-// String completeBehind = "i";
-// String expectedCompletionNodeToString = "<CompleteOnName:i>";
-// String completionIdentifier = "i";
-// String expectedReplacedSource = "i";
-// int cursorLocation = str.indexOf("i = 5;") + completeBehind.length() - 1;
-// String expectedUnitDisplayString =
-// "package p;\n" +
-// "import java.util.*;\n" +
-// "public class D {\n" +
-// " static int i;\n" +
-// " static {\n" +
-// " <CompleteOnName:i>;\n" +
-// " }\n" +
-// " public int j;\n" +
-// " Vector a;\n" +
-// " <clinit>() {\n" +
-// " }\n" +
-// " public D() {\n" +
-// " }\n" +
-// " void foo(String s) {\n" +
-// " }\n" +
-// "}\n";
-//
-// checkMethodParse(
-// str.toCharArray(),
-// cursorLocation,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-public void testD_2() {
- String str =
- " var a = new Vector();\n" +
- " function foo(s) {\n" +
- " var string = null;\n" +
- " var soso;\n" +
- " var f;\n" +
- " string.regionMatches(\n" +
- " 0, \n" +
- " \"\", \n" +
- " 0, \n" +
- " 0); \n" +
- "}\n";
-
- String testName = "<complete on method/field>";
- String completeBehind = "string.";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:string.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "string.";
- String expectedUnitDisplayString =
- "var a = new Vector();\n" +
- "function foo(s) {\n" +
- " var string = null;\n" +
- " var soso;\n" +
- " var f;\n" +
- " <CompleteOnMemberAccess:string.>;\n" +
- "}\n";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testD_2b() {
- String str =
- " function foo(s) {\n" +
- " foo(string.regionMatches);\n" +
- "}\n";
-
- String testName = "<complete on method/field>";
- String completeBehind = "string.";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:string.>";
- String completionIdentifier = "string.";
- String expectedReplacedSource = "regionMatches";
- String expectedUnitDisplayString =
- "function foo(s) {\n" +
- " foo(<CompleteOnMemberAccess:string.>);\n" +
- "}\n";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testD_2c() {
- String str =
- " var obj= {\n" +
- " a: string.regionMatches\n" +
- "}\n";
-
- String testName = "<complete on method/field>";
- String completeBehind = "string.";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:string.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "regionMatches";
- String expectedUnitDisplayString =
- "var obj = {\n" +
- " a : <CompleteOnMemberAccess:string.>\n" +
- "};\n";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-public void testDA_1() {
- String str =
- "package p; \n" +
- "public class DA {\n" +
- " void foo() {\n" +
- " new TestCase(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field into anonymous declaration>";
- String completeBehind = "v";
- String expectedCompletionNodeToString = "<CompleteOnName:v>";
- String completionIdentifier = "v";
- String expectedReplacedSource = "v";
- int cursorLocation = str.indexOf("v }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class DA {\n" +
- " public DA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new TestCase(\"error\") {\n" +
- " () {\n" +
- " }\n" +
- " protected void runTest() {\n" +
- " Vector v11111;\n" +
- " <CompleteOnName:v>;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testDA_2() {
- String str =
- "package p; \n" +
- "public class DA {\n" +
- " void foo() {\n" +
- " new TestCase(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "protected v";
- String expectedCompletionNodeToString = "<CompleteOnType:v>";
- String completionIdentifier = "v";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class DA {\n" +
- " public DA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new TestCase(\"error\") {\n" +
- " <CompleteOnType:v>;\n" +
- " () {\n" +
- " }\n" +
- " runTest() {\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "void";
- String testName = "<complete on return type into anonymous declaration>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testDA_3() {
- String str =
- "package p; \n" +
- "public class DA {\n" +
- " void foo() {\n" +
- " new TestCase(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method selector into anonymous declaration>";
- String completeBehind = "r";
- String expectedCompletionNodeToString = "<CompleteOnFieldName:void r>;";
- String completionIdentifier = "r";
- String expectedReplacedSource = "runTest";
- int cursorLocation = str.indexOf("runTest") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class DA {\n" +
- " public DA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new TestCase(\"error\") {\n" +
- " <CompleteOnFieldName:void r>;\n" +
- " {\n" +
- " }\n" +
- " () {\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testDA_4() {
- String str =
- "package p; \n" +
- "public class DA {\n" +
- " void foo() {\n" +
- " new TestCase(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on local variable type into anonymous declaration>";
- String completeBehind = "V";
- String expectedCompletionNodeToString = "<CompleteOnName:V>";
- String completionIdentifier = "V";
- String expectedReplacedSource = "Vector";
- int cursorLocation = str.indexOf("Vector v11111") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class DA {\n" +
- " public DA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new TestCase(\"error\") {\n" +
- " () {\n" +
- " }\n" +
- " protected void runTest() {\n" +
- " <CompleteOnName:V>;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testDA_5() {
- String str =
- "package p; \n" +
- "public class DA {\n" +
- " void foo() {\n" +
- " new TestCase(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on local type into anonymous declaration>";
- String completeBehind = "v";
- String expectedCompletionNodeToString = "<CompleteOnName:v>";
- String completionIdentifier = "v";
- String expectedReplacedSource = "v";
- int cursorLocation = str.indexOf("v }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class DA {\n" +
- " public DA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new TestCase(\"error\") {\n" +
- " () {\n" +
- " }\n" +
- " protected void runTest() {\n" +
- " Vector v11111;\n" +
- " <CompleteOnName:v>;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testDB_1FHSLDR() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FHSLDR\n" +
- " */\n" +
- "public class DB {\n" +
- " void foo() {\n" +
- " try {\n" +
- " System.out.println(\"\");\n" +
- " }\n" +
- " fi }\n" +
- "}\n";
-
- String testName = "<complete on finally keyword>";
- String completeBehind = "fi";
- String expectedCompletionNodeToString = "<CompleteOnKeyword:fi>";
- String completionIdentifier = "fi";
- String expectedReplacedSource = "fi";
- int cursorLocation = str.indexOf("fi }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class DB {\n" +
- " public DB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnKeyword:fi>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testDC_1FJJ0JR_1() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FJJ0JR\n" +
- " */\n" +
- "public class DC\n" +
- " extends ModelChangeOperation {\n" +
- " ISec public SetSecondarySourceOperation(\n" +
- " ISecondarySourceContainer element, \n" +
- " VersionID id) {\n" +
- " }\n" +
- " protected abstract void doExecute(IProgressMonitor monitor)\n" +
- " throws OperationFailedException {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method return type>";
- String completeBehind = "ISec";
- String expectedCompletionNodeToString = "<CompleteOnType:ISec>";
- String completionIdentifier = "ISec";
- String expectedReplacedSource = "ISec";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class DC extends ModelChangeOperation {\n" +
- " <CompleteOnType:ISec>;\n" +
- " public DC() {\n" +
- " }\n" +
- " public SetSecondarySourceOperation(ISecondarySourceContainer element, VersionID id) {\n" +
- " }\n" +
- " protected abstract void doExecute(IProgressMonitor monitor) throws OperationFailedException;\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testE_1FG1YDS_1() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FG1YDS\n" +
- " */\n" +
- "public class E {\n" +
- " {\n" +
- " new Y()\n" +
- " }\n" +
- " {\n" +
- " new Y().}\n" +
- " class Y\n" +
- " extends java.util.Vector {\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on type into type creation>";
- String completeBehind = "Y";
- String expectedCompletionNodeToString = "<CompleteOnType:Y>";
- String completionIdentifier = "Y";
- String expectedReplacedSource = "Y";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class E {\n" +
- " class Y extends java.util.Vector {\n" +
- " Y() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " {\n" +
- " new <CompleteOnType:Y>();\n" +
- " }\n" +
- " {\n" +
- " }\n" +
- " public E() {\n" +
- " }\n" +
- "}\n";
-
- int cursorLocation = str.indexOf("Y()\n") + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testE_1FG1YDS_2() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FG1YDS\n" +
- " */\n" +
- "public class E {\n" +
- " {\n" +
- " new Y()\n" +
- " }\n" +
- " {\n" +
- " new Y().}\n" +
- " class Y\n" +
- " extends java.util.Vector {\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on implicit method call into intializer>";
- String completeBehind = "new Y().";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:new Y().>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class E {\n" +
- " class Y extends java.util.Vector {\n" +
- " Y() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " {\n" +
- " }\n" +
- " {\n" +
- " <CompleteOnMemberAccess:new Y().>;\n" +
- " }\n" +
- " public E() {\n" +
- " }\n" +
- "}\n";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testE_1FG1YDS_3() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FG1YDS\n" +
- " */\n" +
- "public class E {\n" +
- " {\n" +
- " new Y()\n" +
- " }\n" +
- " {\n" +
- " new Y().}\n" +
- " class Y\n" +
- " extends java.util.Vector {\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on extend type>";
- String completeBehind = "java.util.";
- String expectedCompletionNodeToString = "<CompleteOnClass:java.util.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "java.util.Vector";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class E {\n" +
- " class Y extends <CompleteOnClass:java.util.> {\n" +
- " Y() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " {\n" +
- " }\n" +
- " {\n" +
- " }\n" +
- " public E() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testEA_1() {
- String str =
- "package p; \n" +
- "public class EA {\n" +
- " void foo() {\n" +
- " try {\n" +
- " throw new Error();\n" +
- " } catch (Exception eeee) {\n" +
- " eeee.}\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on catch block exception type declaration>";
- String completeBehind = "E";
- String expectedCompletionNodeToString = "<CompleteOnException:E>";
- String completionIdentifier = "E";
- String expectedReplacedSource = "Exception";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class EA {\n" +
- " public EA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnException:E>;\n" +
- " }\n" +
- "}\n";
-
- int cursorLocation = str.indexOf("Exception eeee") + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testEA_2() {
- String str =
- "package p; \n" +
- "public class EA {\n" +
- " void foo() {\n" +
- " try {\n" +
- " throw new Error();\n" +
- " } catch (Exception eeee) {\n" +
- " eeee.}\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field of thrown exception into catch block>";
- String completeBehind = "eeee.";
- String expectedCompletionNodeToString = "<CompleteOnName:eeee.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "eeee.";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class EA {\n" +
- " public EA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " Exception eeee;\n" +
- " <CompleteOnName:eeee.>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testEB_1FI74S3() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FI74S3\n" +
- " */\n" +
- "public class EB {\n" +
- " int[] table;\n" +
- " void foo() {\n" +
- " int x = table.}\n" +
- "}\n";
-
- String testName = "<complete on method/field of array>";
- String completeBehind = "table.";
- String expectedCompletionNodeToString = "<CompleteOnName:table.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "table.";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class EB {\n" +
- " int[] table;\n" +
- " public EB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int x = <CompleteOnName:table.>;\n" +
- " }\n" +
- "}\n";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testEC_1FSBZ2Y() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FSBZ2Y\n" +
- " */\n" +
- "class EC {\n" +
- " void foo() {\n" +
- " EC\n" +
- " }\n" +
- "}\n" +
- "class ECOtherTopLevel {\n" +
- "}\n";
-
- String testName = "<complete on local variable decaration type>";
- String completeBehind = "EC";
- String expectedCompletionNodeToString = "<CompleteOnName:EC>";
- String completionIdentifier = "EC";
- String expectedReplacedSource = "EC";
- String expectedUnitDisplayString =
- "package p;\n" +
- "class EC {\n" +
- " EC() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:EC>;\n" +
- " }\n" +
- "}\n" +
- "class ECOtherTopLevel {\n" +
- " ECOtherTopLevel() {\n" +
- " }\n" +
- "}\n";
-
- int cursorLocation = str.indexOf("EC\n") + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testF() {
- String str =
- "package p; \n" +
- "public class F {\n" +
- " void bar() {\n" +
- " }\n" +
- " class Y {\n" +
- " void foo() {\n" +
- " ba }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field explicit access>";
- String completeBehind = "ba";
- String expectedCompletionNodeToString = "<CompleteOnName:ba>";
- String completionIdentifier = "ba";
- String expectedReplacedSource = "ba";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class F {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:ba>;\n" +
- " }\n" +
- " }\n" +
- " public F() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- int cursorLocation = str.indexOf("ba }") + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testFA_1() {
- String str =
- "package p; \n" +
- "public class FA {\n" +
- " byte value;\n" +
- " public float foo() {\n" +
- " return (float) value;\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on cast expression type>";
- String completeBehind = "f";
- String expectedCompletionNodeToString = "<CompleteOnName:f>";
- String completionIdentifier = "f";
- String expectedReplacedSource = "float";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class FA {\n" +
- " byte value;\n" +
- " public FA() {\n" +
- " }\n" +
- " public float foo() {\n" +
- " return <CompleteOnName:f>;\n" +
- " }\n" +
- "}\n";
-
- int cursorLocation = str.indexOf("float)") + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testFA_2() {
- String str =
- "package p; \n" +
- "public class FA {\n" +
- " byte value;\n" +
- " public float foo() {\n" +
- " return (float) value; \n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on returned value>";
- String completeBehind = "v";
- String expectedCompletionNodeToString = "<CompleteOnName:v>";
- String completionIdentifier = "v";
- String expectedReplacedSource = "value";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class FA {\n" +
- " byte value;\n" +
- " public FA() {\n" +
- " }\n" +
- " public float foo() {\n" +
- " (float) <CompleteOnName:v>;\n" +
- " }\n" +
- "}\n";
-
- int cursorLocation = str.indexOf("value; \n") + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testFB_1FI74S3() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FI74S3\n" +
- " */\n" +
- "public class FB {\n" +
- " int[] table;\n" +
- " void foo() {\n" +
- " int x = table[1].}\n" +
- "}\n";
-
- String testName = "<complete on method/field of array element>";
- String completeBehind = "table[1].";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:table[1].>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class FB {\n" +
- " int[] table;\n" +
- " public FB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int x = <CompleteOnMemberAccess:table[1].>;\n" +
- " }\n" +
- "}\n";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testFC_1FSBZ9B() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FSBZ9B\n" +
- " */\n" +
- "class FC {\n" +
- " UNKOWNTYPE field;\n" +
- " void foo() {\n" +
- " f\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field implicit access>";
- String completeBehind = "f";
- String expectedCompletionNodeToString = "<CompleteOnName:f>";
- String completionIdentifier = "f";
- String expectedReplacedSource = "f";
- int cursorLocation = str.indexOf("f\n") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class FC {\n" +
- " UNKOWNTYPE field;\n" +
- " FC() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:f>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testG() {
- String str =
- "package p; \n" +
- "public class G {\n" +
- " int bar() {\n" +
- " }\n" +
- " class Y {\n" +
- " void foo(int b) {\n" +
- " return b }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on return value>";
- String completeBehind = "b";
- String expectedCompletionNodeToString = "<CompleteOnName:b>";
- String completionIdentifier = "b";
- String expectedReplacedSource = "b";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class G {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " void foo(int b) {\n" +
- " return <CompleteOnName:b>;\n" +
- " }\n" +
- " }\n" +
- " public G() {\n" +
- " }\n" +
- " int bar() {\n" +
- " }\n" +
- "}\n";
-
- int cursorLocation = str.indexOf("b }") + completeBehind.length() - 1;
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testGA() {
- String str =
- "package p; \n" +
- "public class GA {\n" +
- " void foo(String s) {\n" +
- " String string = s;\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on local variable initializer>";
- String completeBehind = "s";
- String expectedCompletionNodeToString = "<CompleteOnName:s>";
- String completionIdentifier = "s";
- String expectedReplacedSource = "s";
- int cursorLocation = str.indexOf("s;") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class GA {\n" +
- " public GA() {\n" +
- " }\n" +
- " void foo(String s) {\n" +
- " String string = <CompleteOnName:s>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testGB_1FI74S3() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FI74S3\n" +
- " */\n" +
- "public class GB {\n" +
- " String[] table;\n" +
- " void foo() {\n" +
- " int x = table[1].}\n" +
- "}\n";
-
- String testName = "<complete on method/field of array element>";
- String completeBehind = "table[1].";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:table[1].>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class GB {\n" +
- " String[] table;\n" +
- " public GB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int x = <CompleteOnMemberAccess:table[1].>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testGC_1FSHLHV_1() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FSHLHV\n" +
- " */\n" +
- "public class GC {\n" +
- "public static void main(String[] args) {\n" +
- " Object l = new Object() {\n" +
- " public void handleEvent(String[] event) {\n" +
- " String s = new String();\n" +
- " s.\n" +
- " try {\n" +
- " event.;\n" +
- " }\n" +
- " catch (Exception e) {\n" +
- " e.\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n" +
- "}\n";
-
- String testName = "<complete on anonymous declaration type>";
- String completeBehind = "O";
- String expectedCompletionNodeToString = "<CompleteOnType:O>";
- String completionIdentifier = "O";
- String expectedReplacedSource = "Object";
- int cursorLocation = str.indexOf("Object()") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class GC {\n" +
- " public GC() {\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " Object l = new <CompleteOnType:O>();\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testGC_1FSHLHV_2() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FSHLHV\n" +
- " */\n" +
- "public class GC {\n" +
- "public static void main(String[] args) {\n" +
- " Object l = new Object() {\n" +
- " public void handleEvent(String[] event) {\n" +
- " String s = new String();\n" +
- " s.\n" +
- " try {\n" +
- " event.;\n" +
- " }\n" +
- " catch (Exception e) {\n" +
- " e.\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n" +
- "}\n";
-
- String testName = "<complete on method/field of local variable into anonymous declaration>";
- String completeBehind = "s.";
- String expectedCompletionNodeToString = "<CompleteOnName:s.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "s.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class GC {\n" +
- " public GC() {\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " Object l;\n" +
- " new Object() {\n" +
- " () {\n" +
- " }\n" +
- " public void handleEvent(String[] event) {\n" +
- " String s;\n" +
- " <CompleteOnName:s.>;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testGC_1FSHLHV_3() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FSHLHV\n" +
- " */\n" +
- "public class GC {\n" +
- "public static void main(String[] args) {\n" +
- " Object l = new Object() {\n" +
- " public void handleEvent(String[] event) {\n" +
- " String s = new String();\n" +
- " s.\n" +
- " try {\n" +
- " event.;\n" +
- " }\n" +
- " catch (Exception e) {\n" +
- " e.\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n" +
- "}\n";
-
- String testName = "<complete on method/field of array>";
- String completeBehind = "event.";
- String expectedCompletionNodeToString = "<CompleteOnName:event.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "event.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class GC {\n" +
- " public GC() {\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " Object l;\n" +
- " new Object() {\n" +
- " () {\n" +
- " }\n" +
- " public void handleEvent(String[] event) {\n" +
- " String s;\n" +
- " {\n" +
- " <CompleteOnName:event.>;\n" +
- " }\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testGC_1FSHLHV_4() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FSHLHV\n" +
- " */\n" +
- "public class GC {\n" +
- "public static void main(String[] args) {\n" +
- " Object l = new Object() {\n" +
- " public void handleEvent(String[] event) {\n" +
- " String s = new String();\n" +
- " s.\n" +
- " try {\n" +
- " event.;\n" +
- " }\n" +
- " catch (Exception e) {\n" +
- " e.\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n" +
- "}\n";
-
- String testName = "<complete on method/field of thrown exception into catch block into anonymous declaration>";
- String completeBehind = "e.";
- String expectedCompletionNodeToString = "<CompleteOnName:e.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "e.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class GC {\n" +
- " public GC() {\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " Object l;\n" +
- " new Object() {\n" +
- " () {\n" +
- " }\n" +
- " public void handleEvent(String[] event) {\n" +
- " String s;\n" +
- " {\n" +
- " Exception e;\n" +
- " <CompleteOnName:e.>;\n" +
- " }\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-public void testH0() {
- String str =
- " function foo() {\n" +
- " whil \n" +
- "\n";
-
- String testName = "<complete on while keyword argument>";
- String completeBehind = "whil";
- String expectedCompletionNodeToString = "<CompleteOnName:whil>";
- String completionIdentifier = "whil";
- String expectedReplacedSource = "whil";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " <CompleteOnName:whil>;\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-
-
-public void testH() {
- String str =
- " function foo(bbbb) {\n" +
- " while (Xbm }\n" +
- " function bar() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on while keyword argument>";
- String completeBehind = "Xbm";
- String expectedCompletionNodeToString = "<CompleteOnName:Xbm>";
- String completionIdentifier = "Xbm";
- String expectedReplacedSource = "Xbm";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class H {\n" +
- " public H() {\n" +
- " }\n" +
- " function foo( bbbb) {\n" +
- " <CompleteOnName:Xbm>;\n" +
- " }\n" +
- " function bar() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testHA_1() {
- String str =
- "package p; \n" +
- "public class HA {\n" +
- " void foo() {\n" +
- " x.y.Z[] field1; \n" +
- " field1[1].}\n" +
- "}\n";
-
- String testName = "<complete on package member type>";
- String completeBehind = "x.y.";
- String expectedCompletionNodeToString = "<CompleteOnName:x.y.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "x.y.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class HA {\n" +
- " public HA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:x.y.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testHA_2() {
- String str =
- "package p; \n" +
- "public class HA {\n" +
- " void foo() {\n" +
- " x.y.Z[] field1; \n" +
- " field1[1].}\n" +
- "}\n";
-
- String testName = "<complete on method/field of array element>";
- String completeBehind = "field1[1].";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:field1[1].>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class HA {\n" +
- " public HA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " x.y.Z[] field1;\n" +
- " <CompleteOnMemberAccess:field1[1].>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testHB_1FHSLDR() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FHSLDR\n" +
- " */\n" +
- "public class HB {\n" +
- " void foo() {\n" +
- " for (; i < totalUnits; i++) {\n" +
- " unit = unitsToProcess[i];\n" +
- " try {\n" +
- " if (options.verbose) {\n" +
- " System.out.println(\n" +
- " \"process \"\n" +
- " + (i + 1)\n" +
- " + \"/\"\n" +
- " + totalUnits\n" +
- " + \" : \"\n" +
- " + unitsToProcess[i]\n" +
- " .sourceFileName()); \n" +
- " }\n" +
- " process(unit, i);\n" +
- " }\n" +
- " fi }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on finally keyword>";
- String completeBehind = "fi";
- String expectedCompletionNodeToString = "<CompleteOnKeyword:fi>";
- String completionIdentifier = "fi";
- String expectedReplacedSource = "fi";
- int cursorLocation = str.indexOf("fi }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class HB {\n" +
- " public HB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " <CompleteOnKeyword:fi>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testHC_1FMPYO3_1() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FMPYO3\n" +
- " */\n" +
- "class HC {\n" +
- " HC(Object o){}\n" +
- " void foo(){\n" +
- " HC a = new HC(new Object()).\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field of object creation>";
- String completeBehind = "new HC(new Object()).";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:new HC(new Object()).>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class HC {\n" +
- " HC(Object o) {\n" +
- " }\n" +
- " void foo() {\n" +
- " HC a = <CompleteOnMemberAccess:new HC(new Object()).>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testHC_1FMPYO3_2() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FMPYO3\n" +
- " */\n" +
- "class HC {\n" +
- " HC(Object o){}\n" +
- " void foo(){\n" +
- " A a = new A(new Object()).\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on object of nested object creation declaration>";
- String completeBehind = "O";
- String expectedCompletionNodeToString = "<CompleteOnType:O>";
- String completionIdentifier = "O";
- String expectedReplacedSource = "Object";
- int cursorLocation = str.indexOf("Object()") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class HC {\n" +
- " HC(Object o) {\n" +
- " }\n" +
- " void foo() {\n" +
- " A a = new A(new <CompleteOnType:O>());\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testI() {
- String str =
- "package p; \n" +
- "public class I {\n" +
- " Component }\n";
-
- String testName = "<complete on incomplete field declaration type>";
- String completeBehind = "C";
- String expectedCompletionNodeToString = "<CompleteOnType:C>";
- String completionIdentifier = "C";
- String expectedReplacedSource = "Component";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class I {\n" +
- " <CompleteOnType:C>;\n" +
- " public I() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testIA_1FGNBPR_1() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGNBPR\n" +
- " */\n" +
- "public class IA {\n" +
- " void foo1() {\n" +
- " label1 : while (true) {\n" +
- " class A {\n" +
- " void foo2() {\n" +
- " label2 : while (true) {\n" +
- " break la }\n" +
- " }\n" +
- " }\n" +
- " A a = new A();\n" +
- " break la }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on label name>";
- String completeBehind = "la";
- String expectedCompletionNodeToString = "break <CompleteOnLabel:la>;";
- String completionIdentifier = "la";
- String expectedReplacedSource = "la";
- int cursorLocation = str.indexOf("la }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class IA {\n" +
- " public IA() {\n" +
- " }\n" +
- " void foo1() {\n" +
- " {\n" +
- " class A {\n" +
- " A() {\n" +
- " }\n" +
- " void foo2() {\n" +
- " break <CompleteOnLabel:la>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testIA_1FGNBPR_2() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGNBPR\n" +
- " */\n" +
- "public class IA {\n" +
- " void foo1() {\n" +
- " label1 : while (true) {\n" +
- " class A {\n" +
- " void foo2() {\n" +
- " label2 : while (true) {\n" +
- " break la }\n" +
- " }\n" +
- " }\n" +
- " A a = new A();\n" +
- " break la }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on label name>";
- String completeBehind = "la";
- String expectedCompletionNodeToString = "break <CompleteOnLabel:la>;";
- String completionIdentifier = "la";
- String expectedReplacedSource = "la";
- int cursorLocation = str.indexOf("la }", str.indexOf("la }") + 1) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class IA {\n" +
- " public IA() {\n" +
- " }\n" +
- " void foo1() {\n" +
- " {\n" +
- " class A {\n" +
- " A() {\n" +
- " super();\n" + // could be optimized out ?
- " }\n" +
- " void foo2() {\n" +
- " }\n" +
- " }\n" +
- " A a;\n" +
- " break <CompleteOnLabel:la>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testIB() {
- String str =
- "package p; \n" +
- "public class IB {\n" +
- " UnknownFieldTYPE field;\n" +
- " void foo() {\n" +
- " field.}\n" +
- "}\n";
-
- String testName = "<complete on method/field of field of unkown type>";
- String completeBehind = "field.";
- String expectedCompletionNodeToString = "<CompleteOnName:field.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "field.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class IB {\n" +
- " UnknownFieldTYPE field;\n" +
- " public IB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:field.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testIC_1FMGUPR() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FMGUPR\n" +
- " */\n" +
- "public class IC {\n" +
- " void foo(){\n" +
- " new String().toString().\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on multiple method/field call>";
- String completeBehind = "new String().toString().";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:new String().toString().>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class IC {\n" +
- " public IC() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:new String().toString().>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testJ() {
- String str =
- "package p; \n" +
- "public class J {\n" +
- " int foo1()[void foo2() int i;\n" +
- " void foo3() {\n" +
- " f }\n";
-
- String testName = "<complete on method/field access into corrupted method declaration>";
- String completeBehind = "f";
- String expectedCompletionNodeToString = "<CompleteOnName:f>";
- String completionIdentifier = "f";
- String expectedReplacedSource = "f";
- int cursorLocation = str.indexOf("f }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class J {\n" +
- " public J() {\n" +
- " }\n" +
- " int foo1() {\n" +
- " }\n" +
- " void foo2() {\n" +
- " }\n" +
- " void foo3() {\n" +
- " <CompleteOnName:f>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testJA_1FGQVW2_1() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGQVW2\n" +
- " */\n" +
- "public class JA {\n" +
- " void foo() {\n" +
- " \"abc.txt\". 'a'.}\n" +
- "}\n";
-
- String testName = "<complete on string literal>";
- String completeBehind = "\"abc.txt\".";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:\"abc.txt\".>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class JA {\n" +
- " public JA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:\"abc.txt\".>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testJA_1FGQVW2_2() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGQVW2\n" +
- " */\n" +
- "public class JA {\n" +
- " void foo() {\n" +
- " \"abc.txt\". 'a'.}\n" +
- "}\n";
-
- String testName = "<complete on char literal>";
- String completeBehind = "'a'.";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:'a'.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class JA {\n" +
- " public JA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:'a'.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testJB() {
- String str =
- "package p; \n" +
- "public class JB\n" +
- " extends UnknownSUPERCLASS\n" +
- " implements UnknownSUPERINTERFACE {\n" +
- " void foo() {\n" +
- " f }\n" +
- "}\n";
-
- String testName = "<complete into method declared into corrupted class declaration>";
- String completeBehind = "f";
- String expectedCompletionNodeToString = "<CompleteOnName:f>";
- String completionIdentifier = "f";
- String expectedReplacedSource = "f";
- int cursorLocation = str.indexOf("f }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class JB extends UnknownSUPERCLASS implements UnknownSUPERINTERFACE {\n" +
- " public JB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:f>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testJC_1FLG1ZC() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FLG1ZC\n" +
- " */\n" +
- "public class JC {\n" +
- " void foo() {\n" +
- " new String ().\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field of object creation with dummy spaces>";
- String completeBehind = "new String ().";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:new String().>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class JC {\n" +
- " public JC() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:new String().>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testK_1() {
- String str =
- "package p; \n" +
- "class Other {\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n" +
- "public class K {\n" +
- " public static void main(\n" +
- " java.lang.String[] args) {\n" +
- " java.io.File bbbb = \n" +
- " new File(\"c:\\abc.txt\"); \n" +
- " O bb bbbb.}\n" +
- "}\n";
-
-// str =
-// "public class K {\n" +
-// " void foo() {\n" +
-// " new X(\"c:abc.txt\"); \n" +
-// " O" +
-// " }\n" +
-// "}\n";
-
- String testName = "<complete on corrupted local variable declaration>";
- String completeBehind = " O";
- String expectedCompletionNodeToString = "<CompleteOnName:O>";
- String completionIdentifier = "O";
- String expectedReplacedSource = "O";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class Other {\n" +
- " Other() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n" +
- "public class K {\n" +
- " public K() {\n" +
- " }\n" +
- " public static void main(java.lang.String[] args) {\n" +
- " java.io.File bbbb;\n" +
- " <CompleteOnName:O>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testK_2() {
- String str =
- "package p; \n" +
- "class Other {\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n" +
- "public class K {\n" +
- " public static void main(\n" +
- " java.lang.String[] args) {\n" +
- " java.io.File bbbb = \n" +
- " new File(\"c:\\abc.txt\"); \n" +
- " O bb bbbb.}\n" +
- "}\n";
-
- String testName = "<complete on corrupted local variable declaration name>";
- String completeBehind = "bb";
- String expectedCompletionNodeToString = "<CompleteOnLocalName:O bb>;";
- String completionIdentifier = "bb";
- String expectedReplacedSource = "bb";
- int cursorLocation = str.indexOf("bb bbbb.") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class Other {\n" +
- " Other() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n" +
- "public class K {\n" +
- " public K() {\n" +
- " }\n" +
- " public static void main(java.lang.String[] args) {\n" +
- " java.io.File bbbb;\n" +
- " <CompleteOnLocalName:O bb>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testK_3() {
- String str =
- "package p; \n" +
- "class Other {\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n" +
- "public class K {\n" +
- " public static void main(\n" +
- " java.lang.String[] args) {\n" +
- " java.io.File bbbb = \n" +
- " new File(\"c:\\abc.txt\"); \n" +
- " O bb bbbb.}\n" +
- "}\n";
-
- String testName = "<complete on corrupted local variable declaration>";
- String completeBehind = "bbbb";
- String expectedCompletionNodeToString = "<CompleteOnName:bbbb>";
- String completionIdentifier = "bbbb";
- String expectedReplacedSource = "bbbb";
- int cursorLocation = str.indexOf("bbbb.}") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class Other {\n" +
- " Other() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n" +
- "public class K {\n" +
- " public K() {\n" +
- " }\n" +
- " public static void main(java.lang.String[] args) {\n" +
- " java.io.File bbbb;\n" +
- " O bb;\n" +
- " <CompleteOnName:bbbb>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testK_4() {
- String str =
- "package p; \n" +
- "class Other {\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n" +
- "public class K {\n" +
- " public static void main(\n" +
- " java.lang.String[] args) {\n" +
- " java.io.File bbbb = \n" +
- " new File(\"c:\\abc.txt\"); \n" +
- " O bb bbbb.}\n" +
- "}\n";
-
- String testName = "<complete on method/field of local variable with corrupted declaration>";
- String completeBehind = "bbbb.";
- String expectedCompletionNodeToString = "<CompleteOnName:bbbb.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "bbbb.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class Other {\n" +
- " Other() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n" +
- "public class K {\n" +
- " public K() {\n" +
- " }\n" +
- " public static void main(java.lang.String[] args) {\n" +
- " java.io.File bbbb;\n" +
- " O bb;\n" +
- " <CompleteOnName:bbbb.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testKA_1FH5SU5() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FH5SU5\n" +
- " */\n" +
- "class KAHelper\n" +
- " extends java.util.Vector {\n" +
- "}\n" +
- "public class KA {\n" +
- " public int hashCode() {\n" +
- " return 10;\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " KA a = new KA;\n" +
- " a.has }\n" +
- "}\n";
-
- String testName = "<complete on method/field>";
- String completeBehind = "a.has";
- String expectedCompletionNodeToString = "<CompleteOnName:a.has>";
- String completionIdentifier = "has";
- String expectedReplacedSource = "a.has";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class KAHelper extends java.util.Vector {\n" +
- " KAHelper() {\n" +
- " }\n" +
- "}\n" +
- "public class KA {\n" +
- " public KA() {\n" +
- " }\n" +
- " public int hashCode() {\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " KA a;\n" +
- " <CompleteOnName:a.has>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testKB() {
- String str =
- "package p; \n" +
- "public class KB {\n" +
- " void foo()[i }\n" +
- "}\n";
-
- String testName = "<complete on corrupted method header>";
- String completeBehind = "void foo()[i";
- String expectedCompletionNodeToString = NONE;
- String completionIdentifier = "i";
- String expectedReplacedSource = "i";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class KB {\n" +
- " public KB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testKC_1FLG1ZC() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FLG1ZC\n" +
- " */\n" +
- "import java.io.*;\n" +
- "public class KC {\n" +
- "private static char[] read(String fileName){\n" +
- " try {\n" +
- " File file = new File(fileName);\n" +
- " FileReader reader =\n" +
- " new FileReader(file);\n" +
- " int length;\n" +
- " char[] contents =\n" +
- " new char[\n" +
- " length =\n" +
- " (int) file.length()];\n" +
- " int len = 0;\n" +
- " int readSize = 0;\n" +
- " while ((readSize != -1)\n" +
- " && (len != length)) {\n" +
- " readSize = reader.read(\n" +
- " contents,\n" +
- " len,\n" +
- " length - len);\n" +
- " len += readSize;\n" +
- " }\n" +
- " reader. t\n";
-
- String testName = "<complete on method/field with dummy spaces>";
- String completeBehind = "reader. t";
- String expectedCompletionNodeToString = "<CompleteOnName:reader.t>";
- String completionIdentifier = "t";
- String expectedReplacedSource = "reader. t";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "import java.io.*;\n" +
- "public class KC {\n" +
- " public KC() {\n" +
- " }\n" +
- " private static char[] read(String fileName) {\n" +
- " {\n" +
- " File file;\n" +
- " FileReader reader;\n" +
- " int length;\n" +
- " char[] contents;\n" +
- " int len;\n" +
- " int readSize;\n" +
- " <CompleteOnName:reader.t>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testL_1() {
- String str =
- "package p; \n" +
- "public class L {\n" +
- " void foo() {\n" +
- " x.y.Z[] field1, \n" +
- " field2; \n" +
- " field1.if (int[].class }\n" +
- "}\n";
-
- String testName = "<complete on method/field>";
- String completeBehind = "field1.";
- String expectedCompletionNodeToString = "<CompleteOnName:field1.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "field1.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class L {\n" +
- " public L() {\n" +
- " }\n" +
- " void foo() {\n" +
- " x.y.Z[] field1;\n" +
- " x.y.Z[] field2;\n" +
- " <CompleteOnName:field1.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testL_2() {
- String str =
- "package p; \n" +
- "public class L {\n" +
- " void foo() {\n" +
- " x.y.Z[] field1, \n" +
- " field2; \n" +
- " field1.if (int[].class }\n" +
- "}\n";
-
- String testName = "<complete on method/field of array>";
- String completeBehind = "int[].";
- String expectedCompletionNodeToString = "<CompleteOnClassLiteralAccess:int[].>";
- String completionIdentifier = "";
- String expectedReplacedSource = "int[].";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class L {\n" +
- " public L() {\n" +
- " }\n" +
- " void foo() {\n" +
- " x.y.Z[] field1;\n" +
- " x.y.Z[] field2;\n" +
- " <CompleteOnClassLiteralAccess:int[].>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testL_3() {
- String str =
- "package p; \n" +
- "public class L {\n" +
- " void foo() {\n" +
- " x.y.Z[] field1, \n" +
- " field2; \n" +
- " field1.if (int[].class }\n" +
- "}\n";
-
- String testName = "<complete on argument of corrupted if statement>";
- String completeBehind = "int";
- String expectedCompletionNodeToString = "<CompleteOnName:int>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class L {\n" +
- " public L() {\n" +
- " }\n" +
- " void foo() {\n" +
- " x.y.Z[] field1;\n" +
- " x.y.Z[] field2;\n" +
- " <CompleteOnName:int>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testLA_1FGLMOF() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGLMOF\n" +
- " */\n" +
- "public class LA {\n" +
- " void[] foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " f }\n" +
- "}\n";
-
- String testName = "<complete on method/field with corrupted method header>";
- String completeBehind = "f";
- String expectedCompletionNodeToString = "<CompleteOnName:f>";
- String completionIdentifier = "f";
- String expectedReplacedSource = "f";
- int cursorLocation = str.indexOf("f }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class LA {\n" +
- " public LA() {\n" +
- " }\n" +
- " void[] foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " <CompleteOnName:f>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testLB() {
- String str =
- "package p; \n" +
- "public class LB {\n" +
- " void foo() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " i }\n" +
- "}\n";
-
- String testName = "<complete on method/field with duplicate method declaration>";
- String completeBehind = "i";
- String expectedCompletionNodeToString = "<CompleteOnName:i>";
- String completionIdentifier = "i";
- String expectedReplacedSource = "i";
- int cursorLocation = str.indexOf("i }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class LB {\n" +
- " public LB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " <CompleteOnName:i>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testLC_1FLG1E2() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FLG1E2\n" +
- " */\n" +
- "public class LC {\n" +
- " void foo() {\n" +
- " Object[] x = new Object[10];\n" +
- " x [1].\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field of array element with dummy spaces>";
- String completeBehind = "x [1].";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:x[1].>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class LC {\n" +
- " public LC() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object[] x;\n" +
- " <CompleteOnMemberAccess:x[1].>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testM_1FGGLMT() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGGLMT\n" +
- " */\n" +
- "public class M {\n" +
- " class Member {\n" +
- " void fooMember() {\n" +
- " }\n" +
- " }\n" +
- " void foo() {\n" +
- " new Member().}\n" +
- "}\n" +
- "class MemberOfCU {\n" +
- "}\n";
-
- String testName = "<complete on method/field of explicit object creation>";
- String completeBehind = "new Member().";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:new Member().>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class M {\n" +
- " class Member {\n" +
- " Member() {\n" +
- " }\n" +
- " void fooMember() {\n" +
- " }\n" +
- " }\n" +
- " public M() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:new Member().>;\n" +
- " }\n" +
- "}\n" +
- "class MemberOfCU {\n" +
- " MemberOfCU() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testMA_1() {
- String str =
- "package p; \n" +
- "public class MA {\n" +
- " class Member\n" +
- " extends java.util.Vector {\n" +
- " static void fooStaticMember() {\n" +
- " }\n" +
- " void fooMember() {\n" +
- " }\n" +
- " class MemberMember {\n" +
- " void fooMemberMember() {\n" +
- " MemberOfCUMA m = \n" +
- " new MemberOfCUMA(); \n" +
- " }\n" +
- " }\n" +
- " class MemberMember2 {\n" +
- " }\n" +
- " }\n" +
- " void foo() {\n" +
- " Membe }\n" +
- " void foobar() {\n" +
- " new Member().}\n" +
- " class Member2 {\n" +
- " }\n" +
- "}\n" +
- "class MemberOfCUMA {\n" +
- "}\n";
-
- String testName = "<complete on local variable declaration type>";
- String completeBehind = "Membe";
- String expectedCompletionNodeToString = "<CompleteOnName:Membe>";
- String completionIdentifier = "Membe";
- String expectedReplacedSource = "Membe";
- int cursorLocation = str.indexOf("Membe }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class MA {\n" +
- " class Member extends java.util.Vector {\n" +
- " class MemberMember {\n" +
- " MemberMember() {\n" +
- " }\n" +
- " void fooMemberMember() {\n" +
- " }\n" +
- " }\n" +
- " class MemberMember2 {\n" +
- " MemberMember2() {\n" +
- " }\n" +
- " }\n" +
- " Member() {\n" +
- " }\n" +
- " static void fooStaticMember() {\n" +
- " }\n" +
- " void fooMember() {\n" +
- " }\n" +
- " }\n" +
- " class Member2 {\n" +
- " Member2() {\n" +
- " }\n" +
- " }\n" +
- " public MA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:Membe>;\n" +
- " }\n" +
- " void foobar() {\n" +
- " }\n" +
- "}\n" +
- "class MemberOfCUMA {\n" +
- " MemberOfCUMA() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testMA_2() {
- String str =
- "package p; \n" +
- "public class MA {\n" +
- " class Member\n" +
- " extends java.util.Vector {\n" +
- " static void fooStaticMember() {\n" +
- " }\n" +
- " void fooMember() {\n" +
- " }\n" +
- " class MemberMember {\n" +
- " void fooMemberMember() {\n" +
- " MemberOfCUMA m = \n" +
- " new MemberOfCUMA(); \n" +
- " }\n" +
- " }\n" +
- " class MemberMember2 {\n" +
- " }\n" +
- " }\n" +
- " void foo() {\n" +
- " Membe }\n" +
- " void foobar() {\n" +
- " new Member().}\n" +
- " class Member2 {\n" +
- " }\n" +
- "}\n" +
- "class MemberOfCUMA {\n" +
- "}\n";
-
- String testName = "<complete on object creation type>";
- String completeBehind = "MemberOfCU";
- String expectedCompletionNodeToString = "<CompleteOnType:MemberOfCU>";
- String completionIdentifier = "MemberOfCU";
- String expectedReplacedSource = "MemberOfCUMA";
- int cursorLocation = str.indexOf("MemberOfCUMA();") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class MA {\n" +
- " class Member extends java.util.Vector {\n" +
- " class MemberMember {\n" +
- " MemberMember() {\n" +
- " }\n" +
- " void fooMemberMember() {\n" +
- " MemberOfCUMA m = new <CompleteOnType:MemberOfCU>();\n" +
- " }\n" +
- " }\n" +
- " class MemberMember2 {\n" +
- " MemberMember2() {\n" +
- " }\n" +
- " }\n" +
- " Member() {\n" +
- " }\n" +
- " static void fooStaticMember() {\n" +
- " }\n" +
- " void fooMember() {\n" +
- " }\n" +
- " }\n" +
- " class Member2 {\n" +
- " Member2() {\n" +
- " }\n" +
- " }\n" +
- " public MA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void foobar() {\n" +
- " }\n" +
- "}\n" +
- "class MemberOfCUMA {\n" +
- " MemberOfCUMA() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testMA_3() {
- String str =
- "package p; \n" +
- "public class MA {\n" +
- " class Member\n" +
- " extends java.util.Vector {\n" +
- " static void fooStaticMember() {\n" +
- " }\n" +
- " void fooMember() {\n" +
- " }\n" +
- " class MemberMember {\n" +
- " void fooMemberMember() {\n" +
- " MemberOfCUMA m = \n" +
- " new MemberOfCUMA(); \n" +
- " }\n" +
- " }\n" +
- " class MemberMember2 {\n" +
- " }\n" +
- " }\n" +
- " void foo() {\n" +
- " Membe }\n" +
- " void foobar() {\n" +
- " new Member().}\n" +
- " class Member2 {\n" +
- " }\n" +
- "}\n" +
- "class MemberOfCUMA {\n" +
- "}\n";
-
- String testName = "<complete on method/field of object creation>";
- String completeBehind = "new Member().";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:new Member().>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class MA {\n" +
- " class Member extends java.util.Vector {\n" +
- " class MemberMember {\n" +
- " MemberMember() {\n" +
- " }\n" +
- " void fooMemberMember() {\n" +
- " }\n" +
- " }\n" +
- " class MemberMember2 {\n" +
- " MemberMember2() {\n" +
- " }\n" +
- " }\n" +
- " Member() {\n" +
- " }\n" +
- " static void fooStaticMember() {\n" +
- " }\n" +
- " void fooMember() {\n" +
- " }\n" +
- " }\n" +
- " class Member2 {\n" +
- " Member2() {\n" +
- " }\n" +
- " }\n" +
- " public MA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void foobar() {\n" +
- " <CompleteOnMemberAccess:new Member().>;\n" +
- " }\n" +
- "}\n" +
- "class MemberOfCUMA {\n" +
- " MemberOfCUMA() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testMB_1FHSLMQ_1() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FHSLMQ\n" +
- " */\n" +
- "public class MB {\n" +
- " void foo() {\n" +
- " try {\n" +
- " System.out.println(\"\");\n" +
- " } catch (Exception eFirst) {\n" +
- " e } catch (Exception eSecond) {\n" +
- " e }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on local variable name into catch block>";
- String completeBehind = "e";
- String expectedCompletionNodeToString = "<CompleteOnName:e>";
- String completionIdentifier = "e";
- String expectedReplacedSource = "e";
- int cursorLocation = str.indexOf("e }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class MB {\n" +
- " public MB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " Exception eFirst;\n" +
- " <CompleteOnName:e>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testMB_1FHSLMQ_2() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FHSLMQ\n" +
- " */\n" +
- "public class MB {\n" +
- " void foo() {\n" +
- " try {\n" +
- " System.out.println(\"\");\n" +
- " } catch (Exeption eFirst) {\n" +
- " e } catch (Exception eSecond) {\n" +
- " e }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on local variable name into catch block>";
- String completeBehind = "e";
- String expectedCompletionNodeToString = "<CompleteOnName:e>";
- String completionIdentifier = "e";
- String expectedReplacedSource = "e";
- int cursorLocation = str.indexOf("e }\n") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class MB {\n" +
- " public MB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " Exception eSecond;\n" +
- " <CompleteOnName:e>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testMC_1FJ8D9Z() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FJ8D9Z\n" +
- " */\n" +
- "public class MC {\n" +
- " p2.X someField;\n" +
- " public void foo() {\n" +
- " new p2.X(\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on object creation argument>";
- String completeBehind = "new p2.X(";
- String expectedCompletionNodeToString = "<CompleteOnAllocationExpression:new p2.X()>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class MC {\n" +
- " p2.X someField;\n" +
- " public MC() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " <CompleteOnAllocationExpression:new p2.X()>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testN() {
- String str =
- "package p; \n" +
- "public class N extends p.M {\n" +
- " void foo() {\n" +
- " class MLocal\n" +
- " extends Schmurz {\n" +
- " void foo() {\n" +
- " }\n" +
- " int field1;\n" +
- " class MLocalMember\n" +
- " extends myInnerC {\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " new M }\n" +
- " }\n" +
- " class MLocalMember2 {\n" +
- " void fooMyInnerC() {\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on object creation type>";
- String completeBehind = "new M";
- String expectedCompletionNodeToString = "<CompleteOnType:M>";
- String completionIdentifier = "M";
- String expectedReplacedSource = "M";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class N extends p.M {\n" +
- " public N() {\n" +
- " }\n" +
- " void foo() {\n" +
- " class MLocal extends Schmurz {\n" +
- " class MLocalMember extends myInnerC {\n" +
- " MLocalMember() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " new <CompleteOnType:M>();\n" +
- " }\n" +
- " }\n" +
- " class MLocalMember2 {\n" +
- " MLocalMember2() {\n" +
- " }\n" +
- " void fooMyInnerC() {\n" +
- " }\n" +
- " }\n" +
- " int field1;\n" +
- " MLocal() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testNA_1() {
- String str =
- "package p; \n" +
- "class NException2\n" +
- " extends NoClassDefFoundError {\n" +
- "}\n" +
- "interface NInterface {\n" +
- " void foo();\n" +
- "}\n" +
- "class DAB {\n" +
- " public DA foo() {\n" +
- " }\n" +
- " public int foufou;\n" +
- "}\n" +
- "class DANA {\n" +
- " public int f;\n" +
- " N fieldC;\n" +
- "}\n" +
- "public class NA\n" +
- " extends NException2\n" +
- " implements N {\n" +
- " DA fieldB;\n" +
- " class freak {\n" +
- " }\n" +
- " void dede() {\n" +
- " DA local;\n" +
- " local.fieldC.foo();\n" +
- " }\n" +
- "}\n" +
- "interface NCool {\n" +
- "}\n";
-
- String testName = "<complete on local variable name>";
- String completeBehind = "l";
- String expectedCompletionNodeToString = "<CompleteOnName:l>";
- String completionIdentifier = "l";
- String expectedReplacedSource = "local";
- int cursorLocation = str.indexOf("local.") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class NException2 extends NoClassDefFoundError {\n" +
- " NException2() {\n" +
- " }\n" +
- "}\n" +
- "interface NInterface {\n" +
- " void foo();\n" +
- "}\n" +
- "class DAB {\n" +
- " public int foufou;\n" +
- " DAB() {\n" +
- " }\n" +
- " public DA foo() {\n" +
- " }\n" +
- "}\n" +
- "class DANA {\n" +
- " public int f;\n" +
- " N fieldC;\n" +
- " DANA() {\n" +
- " }\n" +
- "}\n" +
- "public class NA extends NException2 implements N {\n" +
- " class freak {\n" +
- " freak() {\n" +
- " }\n" +
- " }\n" +
- " DA fieldB;\n" +
- " public NA() {\n" +
- " }\n" +
- " void dede() {\n" +
- " DA local;\n" +
- " <CompleteOnName:l>;\n" +
- " }\n" +
- "}\n" +
- "interface NCool {\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testNA_2() {
- String str =
- "package p; \n" +
- "class NException2\n" +
- " extends NoClassDefFoundError {\n" +
- "}\n" +
- "interface NInterface {\n" +
- " void foo();\n" +
- "}\n" +
- "class DAB {\n" +
- " public DA foo() {\n" +
- " }\n" +
- " public int foufou;\n" +
- "}\n" +
- "class DANA {\n" +
- " public int f;\n" +
- " N fieldC;\n" +
- "}\n" +
- "public class NA\n" +
- " extends NException2\n" +
- " implements N {\n" +
- " DA fieldB;\n" +
- " class freak {\n" +
- " }\n" +
- " void dede() {\n" +
- " DA local;\n" +
- " local.fieldC.foo();\n" +
- " }\n" +
- "}\n" +
- "interface NCool {\n" +
- "}\n";
-
- String testName = "<complete on method/field of local variable>";
- String completeBehind = "local.f";
- String expectedCompletionNodeToString = "<CompleteOnName:local.f>";
- String completionIdentifier = "f";
- String expectedReplacedSource = "local.fieldC";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class NException2 extends NoClassDefFoundError {\n" +
- " NException2() {\n" +
- " }\n" +
- "}\n" +
- "interface NInterface {\n" +
- " void foo();\n" +
- "}\n" +
- "class DAB {\n" +
- " public int foufou;\n" +
- " DAB() {\n" +
- " }\n" +
- " public DA foo() {\n" +
- " }\n" +
- "}\n" +
- "class DANA {\n" +
- " public int f;\n" +
- " N fieldC;\n" +
- " DANA() {\n" +
- " }\n" +
- "}\n" +
- "public class NA extends NException2 implements N {\n" +
- " class freak {\n" +
- " freak() {\n" +
- " }\n" +
- " }\n" +
- " DA fieldB;\n" +
- " public NA() {\n" +
- " }\n" +
- " void dede() {\n" +
- " DA local;\n" +
- " <CompleteOnName:local.f>;\n" +
- " }\n" +
- "}\n" +
- "interface NCool {\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testNA_3() {
- String str =
- "package p; \n" +
- "class NException2\n" +
- " extends NoClassDefFoundError {\n" +
- "}\n" +
- "interface NInterface {\n" +
- " void foo();\n" +
- "}\n" +
- "class DAB {\n" +
- " public DA foo() {\n" +
- " }\n" +
- " public int foufou;\n" +
- "}\n" +
- "class DANA {\n" +
- " public int f;\n" +
- " N fieldC;\n" +
- "}\n" +
- "public class NA\n" +
- " extends NException2\n" +
- " implements N {\n" +
- " DA fieldB;\n" +
- " class freak {\n" +
- " }\n" +
- " void dede() {\n" +
- " DA local;\n" +
- " local.fieldC.foo();\n" +
- " }\n" +
- "}\n" +
- "interface NCool {\n" +
- "}\n";
-
- String testName = "<complete on method/field of local variable>";
- String completeBehind = "local.fieldC.";
- String expectedCompletionNodeToString = "<CompleteOnName:local.fieldC.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "local.fieldC.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class NException2 extends NoClassDefFoundError {\n" +
- " NException2() {\n" +
- " }\n" +
- "}\n" +
- "interface NInterface {\n" +
- " void foo();\n" +
- "}\n" +
- "class DAB {\n" +
- " public int foufou;\n" +
- " DAB() {\n" +
- " }\n" +
- " public DA foo() {\n" +
- " }\n" +
- "}\n" +
- "class DANA {\n" +
- " public int f;\n" +
- " N fieldC;\n" +
- " DANA() {\n" +
- " }\n" +
- "}\n" +
- "public class NA extends NException2 implements N {\n" +
- " class freak {\n" +
- " freak() {\n" +
- " }\n" +
- " }\n" +
- " DA fieldB;\n" +
- " public NA() {\n" +
- " }\n" +
- " void dede() {\n" +
- " DA local;\n" +
- " <CompleteOnName:local.fieldC.>;\n" +
- " }\n" +
- "}\n" +
- "interface NCool {\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testNB() {
- String str =
- "package p; \n" +
- "public class NB {\n" +
- " void foo() {\n" +
- " int iOutside;\n" +
- " if (i != 0) {\n" +
- " for (int i = 10; --i >= 0;)\n" +
- " unit[i].parseMethod(\n" +
- " parser, \n" +
- " unit); \n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on variable name into for statement>";
- String completeBehind = "i";
- String expectedCompletionNodeToString = "<CompleteOnName:i>";
- String completionIdentifier = "i";
- String expectedReplacedSource = "i";
- int cursorLocation = str.indexOf("i >=") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class NB {\n" +
- " public NB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int iOutside;\n" +
- " {\n" +
- " int i;\n" +
- " -- <CompleteOnName:i>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testNC_1FJ8D9Z() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FJ8D9Z\n" +
- " */\n" +
- "public class NC {\n" +
- " String s = new String(\n";
-
- String testName = "<complete on field intializer into corrupted class declaration>";
- String completeBehind = "new String(";
- String expectedCompletionNodeToString = "<CompleteOnAllocationExpression:new String()>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class NC {\n" +
- " String s = <CompleteOnAllocationExpression:new String()>;\n" +
- " public NC() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testO_1FG1YU0() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FG1YU0\n" +
- " */\n" +
- "public class O\n" +
- " extends java.util.Vector {\n" +
- " void bar(boolean bbbb) {\n" +
- " this.}\n" +
- "}\n";
-
- String testName = "<complete on method/field of explicit this>";
- String completeBehind = "this.";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:this.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "this.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class O extends java.util.Vector {\n" +
- " public O() {\n" +
- " }\n" +
- " void bar(boolean bbbb) {\n" +
- " <CompleteOnMemberAccess:this.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testOA_1() {
- String str =
- "package p; \n" +
- "public class OA {\n" +
- " void proc() {\n" +
- " int[] a = new int[10];\n" +
- " Object b = a;\n" +
- " Class c = a.getClass();\n" +
- " String s = a.toString();\n" +
- " boolean l = a.equals(b);\n" +
- " int h = a.hashCode();\n" +
- " try {\n" +
- " a.wait();\n" +
- " a.wait(3);\n" +
- " a.wait(4, 5);\n" +
- " } catch (Exception e) {\n" +
- " }\n" +
- " a.notify();\n" +
- " a.notifyAll();\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field of array>";
- String completeBehind = "a.n";
- String expectedCompletionNodeToString = "<CompleteOnName:a.n>";
- String completionIdentifier = "n";
- String expectedReplacedSource = "a.notify";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class OA {\n" +
- " public OA() {\n" +
- " }\n" +
- " void proc() {\n" +
- " int[] a;\n" +
- " Object b;\n" +
- " Class c;\n" +
- " String s;\n" +
- " boolean l;\n" +
- " int h;\n" +
- " <CompleteOnName:a.n>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testOA_2() {
- String str =
- "package p; \n" +
- "public class OA {\n" +
- " void proc() {\n" +
- " int[] a = new int[10];\n" +
- " Object b = a;\n" +
- " Class c = a.getClass();\n" +
- " String s = a.toString();\n" +
- " boolean l = a.equals(b);\n" +
- " int h = a.hashCode();\n" +
- " try {\n" +
- " a.wait();\n" +
- " a.wait(3);\n" +
- " a.wait(4, 5);\n" +
- " } catch (Exception e) {\n" +
- " }\n" +
- " a.notify();\n" +
- " a.notifyAll();\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field of array>";
- String completeBehind = "a.w";
- String expectedCompletionNodeToString = "<CompleteOnName:a.w>";
- String completionIdentifier = "w";
- String expectedReplacedSource = "a.wait";
- int cursorLocation = str.indexOf("a.wait(4, 5)") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class OA {\n" +
- " public OA() {\n" +
- " }\n" +
- " void proc() {\n" +
- " int[] a;\n" +
- " Object b;\n" +
- " Class c;\n" +
- " String s;\n" +
- " boolean l;\n" +
- " int h;\n" +
- " {\n" +
- " <CompleteOnName:a.w>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testOB_1() {
- String str =
- "package p; \n" +
- "public class OB {\n" +
- " void foo() {\n" +
- " label : while (true) {\n" +
- " System.out.println(\"\");\n" +
- " break label;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on keyword>";
- String completeBehind = "b";
- String expectedCompletionNodeToString = "<CompleteOnName:b>";
- String completionIdentifier = "b";
- String expectedReplacedSource = "break";
- int cursorLocation = str.indexOf("break") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class OB {\n" +
- " public OB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " <CompleteOnName:b>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testOB_2() {
- String str =
- "package p; \n" +
- "public class OB {\n" +
- " void foo() {\n" +
- " label : while (true) {\n" +
- " System.out.println(\"\");\n" +
- " break label;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on label name>";
- String completeBehind = "l";
- String expectedCompletionNodeToString = "<CompleteOnName:l>";
- String completionIdentifier = "l";
- String expectedReplacedSource = "label";
- int cursorLocation = str.indexOf("label") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class OB {\n" +
- " public OB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:l>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testOC_1FM7J7F() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FM7J7F\n" +
- " */\n" +
- "class OC {\n" +
- " String s = new String(\n" +
- "}\n";
-
- String testName = "<complete on field initializer>";
- String completeBehind = "new String(";
- String expectedCompletionNodeToString = "<CompleteOnAllocationExpression:new String()>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class OC {\n" +
- " String s = <CompleteOnAllocationExpression:new String()>;\n" +
- " OC() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testP_1FG1YU0() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FG1YU0\n" +
- " */\n" +
- "public class P {\n" +
- " {\n" +
- " void bar() {\n" +
- " f }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n";
-
- String testName = "<complete on method/field>";
- String completeBehind = "f";
- String expectedCompletionNodeToString = "<CompleteOnName:f>";
- String completionIdentifier = "f";
- String expectedReplacedSource = "f";
- int cursorLocation = str.indexOf("f }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class P {\n" +
- " {\n" +
- " }\n" +
- " public P() {\n" +
- " }\n" +
- " void bar() {\n" +
- " <CompleteOnName:f>;\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName); }
-public void testPA_1() {
- String str =
- "package p; \n" +
- "class PAHelper {\n" +
- " public int fieldPublic;\n" +
- " protected int fieldProtected;\n" +
- " private int fieldPrivate;\n" +
- " int fieldDefault;\n" +
- " static void staticFoo() {\n" +
- " }\n" +
- " static int i = 1;\n" +
- " int neuneu1() {\n" +
- " return 0;\n" +
- " }\n" +
- " void neuneu2() {\n" +
- " }\n" +
- "}\n" +
- "public class PA\n" +
- " extends PAHelper {\n" +
- " void foo() {\n" +
- " B[] b = \n" +
- " new java.lang.Number[]; \n" +
- " java.lang.Short s;\n" +
- " // b[1].;\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on comment>";
- String completeBehind = "b[1].";
- String expectedCompletionNodeToString = NONE;
- String completionIdentifier = "";
- String expectedReplacedSource = NONE;
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString = null;
-
- try {
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
- assertTrue("failed to detect invalid cursor location", false);
- } catch(InvalidCursorLocation e){
- assertEquals("invalid cursor location: ", e.irritant, InvalidCursorLocation.NO_COMPLETION_INSIDE_COMMENT);
- }
-}
-public void testPA_2() {
- String str =
- "package p; \n" +
- "class PAHelper {\n" +
- " public int fieldPublic;\n" +
- " protected int fieldProtected;\n" +
- " private int fieldPrivate;\n" +
- " int fieldDefault;\n" +
- " static void staticFoo() {\n" +
- " }\n" +
- " static int i = 1;\n" +
- " int neuneu1() {\n" +
- " return 0;\n" +
- " }\n" +
- " void neuneu2() {\n" +
- " }\n" +
- "}\n" +
- "public class PA\n" +
- " extends PAHelper {\n" +
- " void foo() {\n" +
- " B[] b = \n" +
- " new java.lang.Number[]; \n" +
- " java.lang.Short s;\n" +
- " // b[1].;\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on new keyword>";
- String completeBehind = "n";
- String expectedCompletionNodeToString = "<CompleteOnName:n>";
- String completionIdentifier = "n";
- String expectedReplacedSource = "new";
- int cursorLocation = str.indexOf("new ") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class PAHelper {\n" +
- " public int fieldPublic;\n" +
- " protected int fieldProtected;\n" +
- " private int fieldPrivate;\n" +
- " int fieldDefault;\n" +
- " static int i;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " PAHelper() {\n" +
- " }\n" +
- " static void staticFoo() {\n" +
- " }\n" +
- " int neuneu1() {\n" +
- " }\n" +
- " void neuneu2() {\n" +
- " }\n" +
- "}\n" +
- "public class PA extends PAHelper {\n" +
- " public PA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " B[] b = <CompleteOnName:n>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testPB() {
- String str =
- "package p; \n" +
- "public class PB {\n" +
- " void foo() {\n" +
- " class Local {\n" +
- " void foo() {\n" +
- " }\n" +
- " class LocalMember1 {\n" +
- " void foo() {\n" +
- " class LocalMemberLocal {\n" +
- " void foo() {\n" +
- " f\n"+
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " class LocalMember2 {\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field into nested local type>";
- String completeBehind = "f";
- String expectedCompletionNodeToString = "<CompleteOnName:f>";
- String completionIdentifier = "f";
- String expectedReplacedSource = "f";
- int cursorLocation = str.indexOf("f\n") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class PB {\n" +
- " public PB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " class Local {\n" +
- " class LocalMember1 {\n" +
- " LocalMember1() {\n" +
- " }\n" +
- " void foo() {\n" +
- " class LocalMemberLocal {\n" +
- " LocalMemberLocal() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:f>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " class LocalMember2 {\n" +
- " LocalMember2() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " Local() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testPC_1FSU4EF() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FSU4EF\n" +
- " */\n" +
- "import java.util.Vector;\n" +
- "public class PC {\n" +
- " void foo() {\n" +
- " class Inner {\n" +
- " Vector v = new Vector();\n" +
- " void foo() {\n" +
- " Vector v = new Vector();\n" +
- " v.addElement();\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field into local type>";
- String completeBehind = "v.a";
- String expectedCompletionNodeToString = "<CompleteOnName:v.a>";
- String completionIdentifier = "a";
- String expectedReplacedSource = "v.addElement";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "import java.util.Vector;\n" +
- "public class PC {\n" +
- " public PC() {\n" +
- " }\n" +
- " void foo() {\n" +
- " class Inner {\n" +
- " Vector v;\n" +
- " Inner() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Vector v;\n" +
- " <CompleteOnName:v.a>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testQ_1FG1YU0() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FG1YU0\n" +
- " */\n" +
- "public class Q {\n" +
- " void bar(boolean bbbb) {\n" +
- " this.}\n" +
- "}\n";
-
- String testName = "<complete on method/field>";
- String completeBehind = "this.";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:this.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "this.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class Q {\n" +
- " public Q() {\n" +
- " }\n" +
- " void bar(boolean bbbb) {\n" +
- " <CompleteOnMemberAccess:this.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testQA_1() {
- String str =
- "package p; \n" +
- "class QAHelper {\n" +
- " int i = 10;\n" +
- " void f() {\n" +
- " Chk.chkIntVal(\n" +
- " \"err_0\", \n" +
- " \"i\", \n" +
- " this.i, \n" +
- " i); \n" +
- " }\n" +
- " static class Y\n" +
- " extends QAHelper {\n" +
- " public void f() {\n" +
- " super.f();\n" +
- " int j = super.i;\n" +
- " }\n" +
- " public static void main(String a[]) {\n" +
- " Y oy = new Y();\n" +
- " oy.f();\n" +
- " }\n" +
- " }\n" +
- "}\n" +
- "public class QA {\n" +
- " static String s[] = \n" +
- " {\"Dolby\", \"Thx\",}; \n" +
- " void check() {\n" +
- " new QAHelper().new Y().main(\n" +
- " s); \n" +
- " }\n" +
- " static public void main(String args[]) {\n" +
- " new QA().check();\n" +
- " Chk.endTest(\"ciner111\");\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field>";
- String completeBehind = "new QAHelper().new Y().m";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:new QAHelper().new Y().m>";
- String completionIdentifier = "m";
- String expectedReplacedSource = "main";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class QAHelper {\n" +
- " static class Y extends QAHelper {\n" +
- " Y() {\n" +
- " }\n" +
- " public void f() {\n" +
- " }\n" +
- " public static void main(String[] a) {\n" +
- " }\n" +
- " }\n" +
- " int i;\n" +
- " QAHelper() {\n" +
- " }\n" +
- " void f() {\n" +
- " }\n" +
- "}\n" +
- "public class QA {\n" +
- " static String[] s;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public QA() {\n" +
- " }\n" +
- " void check() {\n" +
- " <CompleteOnMemberAccess:new QAHelper().new Y().m>;\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testQA_2() {
- String str =
- "package p; \n" +
- "class QAHelper {\n" +
- " int i = 10;\n" +
- " void f() {\n" +
- " Chk.chkIntVal(\n" +
- " \"err_0\", \n" +
- " \"i\", \n" +
- " this.i, \n" +
- " i); \n" +
- " }\n" +
- " static class Y\n" +
- " extends QAHelper {\n" +
- " public void f() {\n" +
- " super.f();\n" +
- " int j = super.i;\n" +
- " }\n" +
- " public static void main(String a[]) {\n" +
- " Y oy = new Y();\n" +
- " oy.f();\n" +
- " }\n" +
- " }\n" +
- "}\n" +
- "public class QA {\n" +
- " static String s[] = \n" +
- " {\"Dolby\", \"Thx\",}; \n" +
- " void check() {\n" +
- " new QAHelper().new Y().main(\n" +
- " s); \n" +
- " }\n" +
- " static public void main(String args[]) {\n" +
- " new QA().check();\n" +
- " Chk.endTest(\"ciner111\");\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field of object creation>";
- String completeBehind = "new QAHelper().";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:new QAHelper().>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class QAHelper {\n" +
- " static class Y extends QAHelper {\n" +
- " Y() {\n" +
- " }\n" +
- " public void f() {\n" +
- " }\n" +
- " public static void main(String[] a) {\n" +
- " }\n" +
- " }\n" +
- " int i;\n" +
- " QAHelper() {\n" +
- " }\n" +
- " void f() {\n" +
- " }\n" +
- "}\n" +
- "public class QA {\n" +
- " static String[] s;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public QA() {\n" +
- " }\n" +
- " void check() {\n" +
- " <CompleteOnMemberAccess:new QAHelper().>;\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testQA_3() {
- String str =
- "package p; \n" +
- "class QAHelper {\n" +
- " int i = 10;\n" +
- " void f() {\n" +
- " Chk.chkIntVal(\n" +
- " \"err_0\", \n" +
- " \"i\", \n" +
- " this.i, \n" +
- " i); \n" +
- " }\n" +
- " static class Y\n" +
- " extends QAHelper {\n" +
- " public void f() {\n" +
- " super.f();\n" +
- " int j = super.i;\n" +
- " }\n" +
- " public static void main(String a[]) {\n" +
- " Y oy = new Y();\n" +
- " oy.f();\n" +
- " }\n" +
- " }\n" +
- "}\n" +
- "public class QA {\n" +
- " static String s[] = \n" +
- " {\"Dolby\", \"Thx\",}; \n" +
- " void check() {\n" +
- " new QAHelper().new Y().main(\n" +
- " s); \n" +
- " }\n" +
- " static public void main(String args[]) {\n" +
- " new QA().check();\n" +
- " Chk.endTest(\"ciner111\");\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field of object creation>";
- String completeBehind = "new QAHelper().new Y().";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:new QAHelper().new Y().>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class QAHelper {\n" +
- " static class Y extends QAHelper {\n" +
- " Y() {\n" +
- " }\n" +
- " public void f() {\n" +
- " }\n" +
- " public static void main(String[] a) {\n" +
- " }\n" +
- " }\n" +
- " int i;\n" +
- " QAHelper() {\n" +
- " }\n" +
- " void f() {\n" +
- " }\n" +
- "}\n" +
- "public class QA {\n" +
- " static String[] s;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public QA() {\n" +
- " }\n" +
- " void check() {\n" +
- " <CompleteOnMemberAccess:new QAHelper().new Y().>;\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testQA_4() {
- String str =
- "package p; \n" +
- "class QAHelper {\n" +
- " int i = 10;\n" +
- " void f() {\n" +
- " Chk.chkIntVal(\n" +
- " \"err_0\", \n" +
- " \"i\", \n" +
- " this.i, \n" +
- " i); \n" +
- " }\n" +
- " static class Y\n" +
- " extends QAHelper {\n" +
- " public void f() {\n" +
- " super.f();\n" +
- " int j = super.i;\n" +
- " }\n" +
- " public static void main(String a[]) {\n" +
- " Y oy = new Y();\n" +
- " oy.f();\n" +
- " }\n" +
- " }\n" +
- "}\n" +
- "public class QA {\n" +
- " static String s[] = \n" +
- " {\"Dolby\", \"Thx\",}; \n" +
- " void check() {\n" +
- " new QAHelper().new Y().main(\n" +
- " s); \n" +
- " }\n" +
- " static public void main(String args[]) {\n" +
- " new QA().check();\n" +
- " Chk.endTest(\"ciner111\");\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field of object creation>";
- String completeBehind = "new QA().";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:new QA().>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class QAHelper {\n" +
- " static class Y extends QAHelper {\n" +
- " Y() {\n" +
- " }\n" +
- " public void f() {\n" +
- " }\n" +
- " public static void main(String[] a) {\n" +
- " }\n" +
- " }\n" +
- " int i;\n" +
- " QAHelper() {\n" +
- " }\n" +
- " void f() {\n" +
- " }\n" +
- "}\n" +
- "public class QA {\n" +
- " static String[] s;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public QA() {\n" +
- " }\n" +
- " void check() {\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " <CompleteOnMemberAccess:new QA().>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testQB_1FIK820() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FIK820\n" +
- " */\n" +
- "public class QB {\n" +
- " void foo() {\n" +
- " {\n" +
- " }\n" +
- " .}\n" +
- "}\n";
-
- String testName = "<complete on block (no answers wanted)>";
- String completeBehind = ".";
- String expectedCompletionNodeToString = "<CompleteOnName:>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(".}") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class QB {\n" +
- " public QB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testR_1FGD31E() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGD31E\n" +
- " */\n" +
- "public class R {\n" +
- " void moo() {\n" +
- " b }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field>";
- String completeBehind = "b";
- String expectedCompletionNodeToString = "<CompleteOnName:b>";
- String completionIdentifier = "b";
- String expectedReplacedSource = "b";
- int cursorLocation = str.indexOf("b }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class R {\n" +
- " public R() {\n" +
- " }\n" +
- " void moo() {\n" +
- " <CompleteOnName:b>;\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testRA_1() {
- String str =
- "package p; \n" +
- "public class RA extends A {\n" +
- " private int f = 5;\n" +
- " int i(int k) {\n" +
- " }\n" +
- " class B extends I {\n" +
- " void foo();\n" +
- " class C extends Z {\n" +
- " }\n" +
- " final int fo;\n" +
- " }\n" +
- " final void foo(k j) {\n" +
- " }\n" +
- " o o() throws Exc, Exc {\n" +
- " }\n" +
- " static {\n" +
- " this.ff = 5;\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on incorrect this call>";
- String completeBehind = "t";
- String expectedCompletionNodeToString = "<CompleteOnName:t>";
- String completionIdentifier = "t";
- String expectedReplacedSource = "this";
- int cursorLocation = str.indexOf("this.ff") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class RA extends A {\n" +
- " class B extends I {\n" +
- " class C extends Z {\n" +
- " C() {\n" +
- " }\n" +
- " }\n" +
- " final int fo;\n" +
- " B() {\n" +
- " }\n" +
- " void foo();\n" +
- " }\n" +
- " private int f;\n" +
- " static {\n" +
- " <CompleteOnName:t>;\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public RA() {\n" +
- " }\n" +
- " int i(int k) {\n" +
- " }\n" +
- " final void foo(k j) {\n" +
- " }\n" +
- " o o() throws Exc, Exc {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testRA_2() {
- String str =
- "package p; \n" +
- "public class RA extends A {\n" +
- " private int f = 5;\n" +
- " int i(int k) {\n" +
- " }\n" +
- " class B extends I {\n" +
- " void foo();\n" +
- " class C extends Z {\n" +
- " }\n" +
- " final int fo;\n" +
- " }\n" +
- " final void foo(k j) {\n" +
- " }\n" +
- " o o() throws Exc, Exc {\n" +
- " }\n" +
- " static {\n" +
- " this.ff = 5;\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on t>";
- String completeBehind = "t";
- String expectedCompletionNodeToString = "<CompleteOnName:t>";
- String completionIdentifier = "t";
- String expectedReplacedSource = "this";
- int cursorLocation = str.indexOf("this") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class RA extends A {\n" +
- " class B extends I {\n" +
- " class C extends Z {\n" +
- " C() {\n" +
- " }\n" +
- " }\n" +
- " final int fo;\n" +
- " B() {\n" +
- " }\n" +
- " void foo();\n" +
- " }\n" +
- " private int f;\n" +
- " static {\n" +
- " <CompleteOnName:t>;\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public RA() {\n" +
- " }\n" +
- " int i(int k) {\n" +
- " }\n" +
- " final void foo(k j) {\n" +
- " }\n" +
- " o o() throws Exc, Exc {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testRA_3() {
- String str =
- "package p; \n" +
- "public class RA extends A {\n" +
- " private int f = 5;\n" +
- " int i(int k) {\n" +
- " }\n" +
- " class B extends I {\n" +
- " void foo();\n" +
- " class C extends Z {\n" +
- " }\n" +
- " final int fo;\n" +
- " }\n" +
- " final void foo(k j) {\n" +
- " }\n" +
- " o o() throws Exc, Exc {\n" +
- " }\n" +
- " static {\n" +
- " this.ff = 5;\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on exception type>";
- String completeBehind = "Exc";
- String expectedCompletionNodeToString = "<CompleteOnException:Exc>";
- String completionIdentifier = "Exc";
- String expectedReplacedSource = "Exc";
- int cursorLocation = str.indexOf("Exc {") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class RA extends A {\n" +
- " class B extends I {\n" +
- " class C extends Z {\n" +
- " C() {\n" +
- " }\n" +
- " }\n" +
- " final int fo;\n" +
- " B() {\n" +
- " }\n" +
- " void foo();\n" +
- " }\n" +
- " private int f;\n" +
- " static {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public RA() {\n" +
- " }\n" +
- " int i(int k) {\n" +
- " }\n" +
- " final void foo(k j) {\n" +
- " }\n" +
- " o o() throws Exc, <CompleteOnException:Exc> {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testRB_1FI74S3() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FI74S3\n" +
- " */\n" +
- "public class RB {\n" +
- " int[] table;\n" +
- " void foo() {\n" +
- " int x = table.}\n" +
- "}\n";
-
- String testName = "<complete on method/field of arry>";
- String completeBehind = "table.";
- String expectedCompletionNodeToString = "<CompleteOnName:table.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "table.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class RB {\n" +
- " int[] table;\n" +
- " public RB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int x = <CompleteOnName:table.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testS_1FGF64P_1() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGF64P\n" +
- " */\n" +
- "public class S {\n" +
- " {\n" +
- " new Y()..}\n" +
- " class Y {\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on incorrect call>";
- String completeBehind = "new Y()..";
- String expectedCompletionNodeToString = "<CompleteOnName:>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class S {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " {\n" +
- " {\n" +
- " <CompleteOnName:>;\n" +
- " }\n" +
- " }\n" +
- " public S() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testS_1FGF64P_2() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGF64P\n" +
- " */\n" +
- "public class S {\n" +
- " {\n" +
- " new Y()..}\n" +
- " class Y {\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field of object creation>";
- String completeBehind = "new Y().";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:new Y().>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class S {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " {\n" +
- " <CompleteOnMemberAccess:new Y().>;\n" +
- " }\n" +
- " public S() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testS_1FGF64P_3() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGF64P\n" +
- " */\n" +
- "public class S {\n" +
- " {\n" +
- " new Y()..}\n" +
- " class Y {\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on incorrect call>";
- String completeBehind = "new Y()..";
- String expectedCompletionNodeToString = "<CompleteOnName:>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class S {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " {\n" +
- " {\n" +
- " <CompleteOnName:>;\n" +
- " }\n" +
- " }\n" +
- " public S() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testSA() {
- String str =
- "package p; \n" +
- "public class SA {\n" +
- " public sy void foo() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method modifier>";
- String completeBehind = "sy";
- String expectedCompletionNodeToString = "<CompleteOnType:sy>";
- String completionIdentifier = "sy";
- String expectedReplacedSource = "sy";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class SA {\n" +
- " <CompleteOnType:sy>;\n" +
- " public SA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testSB_1FILFDG() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FILFDG\n" +
- " */\n" +
- "public class SB {\n" +
- " public void foo() {\n" +
- " String s = \"hello\n" +
- " int}\n" +
- "}\n";
-
- String testName = "<complete on field declaration type>";
- String completeBehind = "int";
- String expectedCompletionNodeToString = "<CompleteOnName:int>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class SB {\n" +
- " public SB() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " String s;\n" +
- " <CompleteOnName:int>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testT_1FGF64P() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGF64P\n" +
- " */\n" +
- "public class T {\n" +
- " {\n" +
- " new Y().}\n" +
- " class Y {\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on object creation>";
- String completeBehind = "new Y().";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:new Y().>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class T {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " {\n" +
- " <CompleteOnMemberAccess:new Y().>;\n" +
- " }\n" +
- " public T() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testTA_1FHISJJ_1() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FHISJJ\n" +
- " */\n" +
- "public class TA {\n" +
- " void foo() {\n" +
- " Object[] items = \n" +
- " {\n" +
- " \"Mark unublishable\", \n" +
- " null, \n" +
- " \"Properties...\"}\n" +
- " .;\n" +
- " items.}\n" +
- "}\n";
-
- String testName = "<complete on array intializer value>";
- String completeBehind = "n";
- String expectedCompletionNodeToString = "<CompleteOnName:n>";
- String completionIdentifier = "n";
- String expectedReplacedSource = "null";
- int cursorLocation = str.indexOf("null, ") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class TA {\n" +
- " public TA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object[] items = {<CompleteOnName:n>};\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testTA_1FHISJJ_2() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FHISJJ\n" +
- " */\n" +
- "public class TA {\n" +
- " void foo() {\n" +
- " Object[] items = \n" +
- " {\n" +
- " \"Mark unublishable\", \n" +
- " null, \n" +
- " \"Properties...\"}\n" +
- " .;\n" +
- " items.}\n" +
- "}\n";
-
- String testName = "<complete on method/field of array intializer>";
- String completeBehind =
- " {\n" +
- " \"Mark unublishable\", \n" +
- " null, \n" +
- " \"Properties...\"}\n" +
- " .";
- String expectedCompletionNodeToString = "<CompleteOnName:>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class TA {\n" +
- " public TA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object[] items;\n" +
- " <CompleteOnName:>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testTA_1FHISJJ_3() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FHISJJ\n" +
- " */\n" +
- "public class TA {\n" +
- " void foo() {\n" +
- " Object[] items = \n" +
- " {\n" +
- " \"Mark unublishable\", \n" +
- " null, \n" +
- " \"Properties...\"}\n" +
- " .;\n" +
- " items.}\n" +
- "}\n";
-
- String testName = "<complete on method/field of array>";
- String completeBehind = "items.";
- String expectedCompletionNodeToString = "<CompleteOnName:items.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "items.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class TA {\n" +
- " public TA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object[] items;\n" +
- " <CompleteOnName:items.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testTB_1FHSLMQ() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FHSLMQ\n" +
- " */\n" +
- "public class TB {\n" +
- " void foo() {\n" +
- " if (true)\n" +
- " System.out.println(\"\");\n" +
- " e }\n" +
- "}\n";
-
- String testName = "<complete on else keyword>";
- String completeBehind = "e";
- String expectedCompletionNodeToString = "<CompleteOnName:e>";
- String completionIdentifier = "e";
- String expectedReplacedSource = "e";
- int cursorLocation = str.indexOf("e }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class TB {\n" +
- " public TB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:e>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testU_1FGGUME() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGGUME\n" +
- " */\n" +
- "public class U {\n" +
- " public static final int Source = \n" +
- " 5; \n" +
- "}\n";
-
- String testName = "<complete on digit>";
- String completeBehind = "5";
- String expectedCompletionNodeToString = NONE;
- String completionIdentifier = "";
- String expectedReplacedSource = NONE;
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString = null;
-
- try {
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
- assertTrue("failed to detect invalid cursor location", false);
- } catch(InvalidCursorLocation e){
- assertEquals("invalid cursor location: ", e.irritant, InvalidCursorLocation.NO_COMPLETION_INSIDE_NUMBER);
- }
-}
-public void testUA_1FHISJJ_1() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FHISJJ\n" +
- " */\n" +
- "public class UA {\n" +
- " void foo() {\n" +
- " Object[] items = \n" +
- " new String[] {\n" +
- " \"Mark unublishable\", \n" +
- " null, \n" +
- " \"Properties...\"}\n" +
- " .;\n" +
- " items.}\n" +
- "}\n";
-
- String testName = "<complete on array initializer>";
- String completeBehind =
- "new String[] {\n" +
- " \"Mark unublishable\", \n" +
- " null, \n" +
- " \"Properties...\"}\n" +
- " .";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:new String[]{\"Mark unublishable\", null, \"Properties...\"}.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class UA {\n" +
- " public UA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object[] items = <CompleteOnMemberAccess:new String[]{\"Mark unublishable\", null, \"Properties...\"}.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testUA_1FHISJJ_2() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FHISJJ\n" +
- " */\n" +
- "public class UA {\n" +
- " void foo() {\n" +
- " Object[] items = \n" +
- " new String[] {\n" +
- " \"Mark unublishable\", \n" +
- " null, \n" +
- " \"Properties...\"}\n" +
- " .;\n" +
- " items.}\n" +
- "}\n";
-
- String testName = "<complete on method/field of array>";
- String completeBehind = "items.";
- String expectedCompletionNodeToString = "<CompleteOnName:items.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "items.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class UA {\n" +
- " public UA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object[] items;\n" +
- " <CompleteOnName:items.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testUB_1FSBZ02() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FSBZ02\n" +
- " */\n" +
- "class UB {\n" +
- " void bar() {\n" +
- " }\n" +
- " class UBMember {\n" +
- " void bar2() {\n" +
- " }\n" +
- " void foo() {\n" +
- " b\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on keyword>";
- String completeBehind = "b";
- String expectedCompletionNodeToString = "<CompleteOnName:b>";
- String completionIdentifier = "b";
- String expectedReplacedSource = "b";
- int cursorLocation = str.indexOf("b\n") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class UB {\n" +
- " class UBMember {\n" +
- " UBMember() {\n" +
- " }\n" +
- " void bar2() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:b>;\n" +
- " }\n" +
- " }\n" +
- " UB() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testV_1FGGUOO_1() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGGUOO\n" +
- " */\n" +
- "public class V i java\n" +
- " .io\n" +
- " .Serializable {\n" +
- "}\n";
-
- String testName = "<complete on implements keyword>";
- String completeBehind = "i";
- String expectedCompletionNodeToString = "<CompleteOnKeyword:i>";
- String completionIdentifier = "i";
- String expectedReplacedSource = "i";
- int cursorLocation = str.indexOf("i java") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class V extends <CompleteOnKeyword:i> {\n" +
- " {\n" +
- " }\n" +
- " public V() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testV_1FGGUOO_2() {
- String str =
- "package x.y.z; \n" +
- "/**\n" +
- " * 1FGGUOO\n" +
- " */\n" +
- "public class V implements java.io.Serializable {\n" +
- "}\n";
-
- String testName = "<complete on package>";
- String completeBehind = "y";
- String expectedCompletionNodeToString = "<CompleteOnPackage:x.y>";
- String completionIdentifier = "y";
- String expectedReplacedSource =
- "x.y.z";
- int cursorLocation = str.indexOf("y") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package <CompleteOnPackage:x.y>;\n" +
- "public class V implements java.io.Serializable {\n" +
- " public V() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testVA_1FHISJJ_1() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FHISJJ\n" +
- " */\n" +
- "public class VA {\n" +
- " void foo() {\n" +
- " Object item = new String() {\n" +
- " public boolean equals() {\n" +
- " return false;\n" +
- " }\n" +
- " }\n" +
- " .;\n" +
- " item.}\n" +
- "}\n";
-
- String testName = "<complete on anonymous type declaration>";
- String completeBehind =
- "new String() {\n" +
- " public boolean equals() {\n" +
- " return false;\n" +
- " }\n" +
- " }\n" +
- " .";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:new String() {\n" +
- " public boolean equals() {\n" +
- " return false;\n" +
- " }\n" +
- "}.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class VA {\n" +
- " public VA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object item = <CompleteOnMemberAccess:new String() {\n" +
- " public boolean equals() {\n" +
- " return false;\n" +
- " }\n" +
- "}.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testVA_1FHISJJ_2() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FHISJJ\n" +
- " */\n" +
- "public class VA {\n" +
- " void foo() {\n" +
- " Object item = new String() {\n" +
- " public boolean equals() {\n" +
- " return false;\n" +
- " }\n" +
- " }\n" +
- " .;\n" +
- " item.}\n" +
- "}\n";
-
- String testName = "<complete on local variable>";
- String completeBehind = "item.";
- String expectedCompletionNodeToString = "<CompleteOnName:item.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "item.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class VA {\n" +
- " public VA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object item;\n" +
- " <CompleteOnName:item.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testVB_1() {
- String str =
- "package p; \n" +
- "public class VB {\n" +
- " void foo() {\n" +
- " new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " }\n" +
- " .;\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on local variable name into anonymous declaration>";
- String completeBehind = "v";
- String expectedCompletionNodeToString = "<CompleteOnName:v>";
- String completionIdentifier = "v";
- String expectedReplacedSource = "v";
- int cursorLocation = str.indexOf("v }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class VB {\n" +
- " public VB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111;\n" +
- " <CompleteOnName:v>;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-// TODO excluded test (completion on field access on anonymous inner class with syntax error)
-public void _testVB_2() {
- String str =
- "package p; \n" +
- "public class VB {\n" +
- " void foo() {\n" +
- " new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " }.\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on anonymous type declaration>";
- String completeBehind =
- "new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " }.";
- String expectedCompletionNodeToString =
- "<CompleteOnMemberAccess:new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " }\n" +
- "}.>";
- String completionIdentifier = "";
- String expectedReplacedSource =
- "new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " }.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class VB {\n" +
- " public VB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " }\n" +
- "}.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testVB_3() {
- String str =
- "package p; \n" +
- "public class VB {\n" +
- " void foo() {\n" +
- " new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " }\n" +
- " .;\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on constructor>";
- String completeBehind = "new java.io.File(";
- String expectedCompletionNodeToString = "<CompleteOnAllocationExpression:new java.io.File()>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class VB {\n" +
- " public VB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnAllocationExpression:new java.io.File()>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-// TODO excluded test (completion on field access on anonymous inner class with syntax error)
-public void _testVB_4() {
- String str =
- "package p; \n" +
- "public class VB {\n" +
- " void foo() {\n" +
- " new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " }\n" +
- " .;\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on anonymous type declaration with dummy spaces>";
- String completeBehind =
- "new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " }\n" +
- " .";
- String expectedCompletionNodeToString =
- "<CompleteOnName:new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " }\n" +
- "}.>";
- String completionIdentifier = "";
- String expectedReplacedSource =
- "new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " }\n" +
- " .";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class VB {\n" +
- " public VB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " }\n" +
- "}.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-// TODO excluded test (completion on field access on anonymous inner class with syntax error)
-public void _testVB_5() {
- String str =
- "package p; \n" +
- "public class VB {\n" +
- " void foo() {\n" +
- " new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " }.;\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on anonymous type declaration with trailing semi-colon>";
- String completeBehind =
- "new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " }.";
- String expectedCompletionNodeToString =
- "<CompleteOnMemberAccess:new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " }\n" +
- "}.>";
- String completionIdentifier = "";
- String expectedReplacedSource =
- "new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " Vector v11111 = new Vector();\n" +
- " v }\n" +
- " }.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class VB {\n" +
- " public VB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:new java.io.File(\"error\") {\n" +
- " protected void runTest() {\n" +
- " }\n" +
- "}.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testW_1FGGUS4() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGGUS4\n" +
- " */\n" +
- "public class W {\n" +
- " public static final int LA = \n" +
- " 1; \n" +
- " public static final int LAB = \n" +
- " 2; \n" +
- " public static final int LABO = \n" +
- " 4; \n" +
- " public int produceDebugAttributes = \n" +
- " LABO; \n" +
- "}\n";
-
- String testName = "<complete on field initializer>";
- String completeBehind = "L";
- String expectedCompletionNodeToString = "<CompleteOnName:L>";
- String completionIdentifier = "L";
- String expectedReplacedSource = "LABO";
- int cursorLocation = str.indexOf("LABO;") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class W {\n" +
- " public static final int LA;\n" +
- " public static final int LAB;\n" +
- " public static final int LABO;\n" +
- " public int produceDebugAttributes = <CompleteOnName:L>;\n" +
- " public W() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testWA_1() {
- String str =
- "package p; \n" +
- "public class WA {\n" +
- " void foo() {\n" +
- " int value = 10;\n" +
- " v int[] tab = new int[value];\n" +
- " }\n";
-
- String testName = "<complete on array size value>";
- String completeBehind = "v";
- String expectedCompletionNodeToString = "<CompleteOnName:v>";
- String completionIdentifier = "v";
- String expectedReplacedSource = "value";
- int cursorLocation = str.indexOf("value];") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class WA {\n" +
- " public WA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int value;\n" +
- " int[] tab = new int[<CompleteOnName:v>];\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testWA_2() {
- String str =
- "package p; \n" +
- "public class WA {\n" +
- " void foo() {\n" +
- " int value = 10;\n" +
- " v int[] tab = new int[value];\n" +
- " }\n";
-
- String testName = "<complete on corrupter local variable declaration>";
- String completeBehind = "v";
- String expectedCompletionNodeToString = "<CompleteOnName:v>";
- String completionIdentifier = "v";
- String expectedReplacedSource = "v";
- int cursorLocation = str.indexOf("v int[]") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class WA {\n" +
- " public WA() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int value;\n" +
- " <CompleteOnName:v>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testWB_1FI313C() {
- String str =
- "package p; \n" +
- "/*\n" +
- " * 1FI313C\n" +
- " */\n" +
- "class WBHelper {\n" +
- " public int fieldPublic;\n" +
- " protected int fieldProtected;\n" +
- " private int fieldPrivate;\n" +
- " int fieldDefault;\n" +
- " static void staticFoo() {\n" +
- " }\n" +
- " static int i = d;\n" +
- " int neuneu1() {\n" +
- " }\n" +
- " void neuneu2() {\n" +
- " }\n" +
- "}\n" +
- "public class WB\n" +
- " extends WBHelper {\n" +
- " void foo() {\n" +
- " BIJOUR[] b = \n" +
- " new java.lang.Number[]; \n" +
- " java.lang.Short s;\n" +
- " b[1].}\n" +
- " B() {\n" +
- " }\n" +
- " B(int) {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field of array element>";
- String completeBehind = "b[1].";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:b[1].>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "class WBHelper {\n" +
- " public int fieldPublic;\n" +
- " protected int fieldProtected;\n" +
- " private int fieldPrivate;\n" +
- " int fieldDefault;\n" +
- " static int i;\n" +
- " WBHelper() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " static void staticFoo() {\n" +
- " }\n" +
- " int neuneu1() {\n" +
- " }\n" +
- " void neuneu2() {\n" +
- " }\n" +
- "}\n" +
- "public class WB extends WBHelper {\n" +
- " public WB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " BIJOUR[] b;\n" +
- " java.lang.Short s;\n" +
- " <CompleteOnMemberAccess:b[1].>;\n" +
- " }\n" +
- " B() {\n" +
- " }\n" +
- " B() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testX_1FGGV8C_1() {
- String str =
- "package p; \n" +
- "import p2.Y; \n" +
- "/**\n" +
- " * 1FGGV8C and 1FGPE8E\n" +
- " */\n" +
- "public class X {\n" +
- " public static final float Vars; \n" +
- " public static final float Lines; \n" +
- " public static final float Source; \n" +
- " public static final float UnreachableCode; \n" +
- " public static final float produceDebugAttributes; \n" +
- " void foo() {\n" +
- " int locale, \n" +
- " errorThreshold, \n" +
- " preserveAllLocalVariables; \n" +
- " return new Y[] {\n" +
- " new Y(\n" +
- " \"debug.vars\", \n" +
- " this, \n" +
- " locale, \n" +
- " (produceDebugAttributes\n" +
- " & Vars)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new Y(\n" +
- " \"debug.lines\", \n" +
- " this, \n" +
- " locale, \n" +
- " (produceDebugAttributes\n" +
- " & Lines)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new Y(\n" +
- " \"debug.source\", \n" +
- " this, \n" +
- " locale, \n" +
- " (produceDebugAttributes\n" +
- " & Source)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new Y(\n" +
- " \"debug.preserveAllLocals\", \n" +
- " this, \n" +
- " locale, \n" +
- " preserveAllLocalVariables\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new Y(\n" +
- " \"optionalError.unReachableCode\", \n" +
- " this, \n" +
- " locale, \n" +
- " (errorThreshold\n" +
- " & UnreachableCode)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1)\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on argument of anonymous type declaration>";
- String completeBehind = "t";
- String expectedCompletionNodeToString = "<CompleteOnName:t>";
- String completionIdentifier = "t";
- String expectedReplacedSource = "this";
- int cursorLocation = str.indexOf("this, ") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "import p2.Y;\n" +
- "public class X {\n" +
- " public static final float Vars;\n" +
- " public static final float Lines;\n" +
- " public static final float Source;\n" +
- " public static final float UnreachableCode;\n" +
- " public static final float produceDebugAttributes;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int locale;\n" +
- " int errorThreshold;\n" +
- " int preserveAllLocalVariables;\n" +
- " new Y(\"debug.vars\", <CompleteOnName:t>);\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testX_1FGGV8C_2() {
- String str =
- "package p; \n" +
- "import p2.YZA; \n" +
- "/**\n" +
- " * 1FGGV8C and 1FGPE8E\n" +
- " */\n" +
- "public class X {\n" +
- " public static final float Vars; \n" +
- " public static final float Lines; \n" +
- " public static final float Source; \n" +
- " public static final float UnreachableCode; \n" +
- " public static final float produceDebugAttributes; \n" +
- " void foo() {\n" +
- " int locale, \n" +
- " errorThreshold, \n" +
- " preserveAllLocalVariables; \n" +
- " return new YZA[] {\n" +
- " new YZA(\n" +
- " \"debug.vars\", \n" +
- " this, \n" +
- " locale, \n" +
- " (produceDebugAttributes\n" +
- " & Vars)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new YZA(\n" +
- " \"debug.lines\", \n" +
- " this, \n" +
- " locale, \n" +
- " (produceDebugAttributes\n" +
- " & Lines)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new YZA(\n" +
- " \"debug.source\", \n" +
- " this, \n" +
- " locale, \n" +
- " (produceDebugAttributes\n" +
- " & Source)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new YZA(\n" +
- " \"debug.preserveAllLocals\", \n" +
- " this, \n" +
- " locale, \n" +
- " preserveAllLocalVariables\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new YZA(\n" +
- " \"optionalError.unReachableCode\", \n" +
- " this, \n" +
- " locale, \n" +
- " (errorThreshold\n" +
- " & UnreachableCode)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1)\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on anonymous type declaration into a return statement>";
- String completeBehind = "Y";
- String expectedCompletionNodeToString = "<CompleteOnType:Y>";
- String completionIdentifier = "Y";
- String expectedReplacedSource = "YZA";
- int cursorLocation = str.indexOf("YZA[]") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "import p2.YZA;\n" +
- "public class X {\n" +
- " public static final float Vars;\n" +
- " public static final float Lines;\n" +
- " public static final float Source;\n" +
- " public static final float UnreachableCode;\n" +
- " public static final float produceDebugAttributes;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int locale;\n" +
- " int errorThreshold;\n" +
- " int preserveAllLocalVariables;\n" +
- " return new <CompleteOnType:Y>();\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testX_1FGGV8C_3() {
- String str =
- "package p; \n" +
- "import p2.YZA; \n" +
- "/**\n" +
- " * 1FGGV8C and 1FGPE8E\n" +
- " */\n" +
- "public class X {\n" +
- " public static final float Vars; \n" +
- " public static final float Lines; \n" +
- " public static final float Source; \n" +
- " public static final float UnreachableCode; \n" +
- " public static final float produceDebugAttributes; \n" +
- " void foo() {\n" +
- " int locale, \n" +
- " errorThreshold, \n" +
- " preserveAllLocalVariables; \n" +
- " return new YZA[] {\n" +
- " new YZA(\n" +
- " \"debug.vars\", \n" +
- " this, \n" +
- " locale, \n" +
- " (produceDebugAttributes\n" +
- " & Vars)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new YZA(\n" +
- " \"debug.lines\", \n" +
- " this, \n" +
- " locale, \n" +
- " (produceDebugAttributes\n" +
- " & Lines)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new YZA(\n" +
- " \"debug.source\", \n" +
- " this, \n" +
- " locale, \n" +
- " (produceDebugAttributes\n" +
- " & Source)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new YZA(\n" +
- " \"debug.preserveAllLocals\", \n" +
- " this, \n" +
- " locale, \n" +
- " preserveAllLocalVariables\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new YZA(\n" +
- " \"optionalError.unReachableCode\", \n" +
- " this, \n" +
- " locale, \n" +
- " (errorThreshold\n" +
- " & UnreachableCode)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1)\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on anonymous type declaration nested into an array initializer>";
- String completeBehind = "Y";
- String expectedCompletionNodeToString = "<CompleteOnType:Y>";
- String completionIdentifier = "Y";
- String expectedReplacedSource = "YZA";
- int cursorLocation = str.indexOf("YZA(") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "import p2.YZA;\n" +
- "public class X {\n" +
- " public static final float Vars;\n" +
- " public static final float Lines;\n" +
- " public static final float Source;\n" +
- " public static final float UnreachableCode;\n" +
- " public static final float produceDebugAttributes;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int locale;\n" +
- " int errorThreshold;\n" +
- " int preserveAllLocalVariables;\n" +
- " new YZA[]{new <CompleteOnType:Y>()};\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testX_1FGGV8C_4() {
- String str =
- "package p; \n" +
- "import p2.Y; \n" +
- "/**\n" +
- " * 1FGGV8C and 1FGPE8E\n" +
- " */\n" +
- "public class X {\n" +
- " public static final float Vars; \n" +
- " public static final float Lines; \n" +
- " public static final float Source; \n" +
- " public static final float UnreachableCode; \n" +
- " public static final float produceDebugAttributes; \n" +
- " void foo() {\n" +
- " int locale, \n" +
- " errorThreshold, \n" +
- " preserveAllLocalVariables; \n" +
- " return new Y[] {\n" +
- " new Y(\n" +
- " \"debug.vars\", \n" +
- " this, \n" +
- " locale, \n" +
- " (produceDebugAttributes\n" +
- " & Vars)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new Y(\n" +
- " \"debug.lines\", \n" +
- " this, \n" +
- " locale, \n" +
- " (produceDebugAttributes\n" +
- " & Lines)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new Y(\n" +
- " \"debug.source\", \n" +
- " this, \n" +
- " locale, \n" +
- " (produceDebugAttributes\n" +
- " & Source)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new Y(\n" +
- " \"debug.preserveAllLocals\", \n" +
- " this, \n" +
- " locale, \n" +
- " preserveAllLocalVariables\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new Y(\n" +
- " \"optionalError.unReachableCode\", \n" +
- " this, \n" +
- " locale, \n" +
- " (errorThreshold\n" +
- " & UnreachableCode)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1)\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field into array intializer>";
- String completeBehind = "n";
- String expectedCompletionNodeToString = "<CompleteOnName:n>";
- String completionIdentifier = "n";
- String expectedReplacedSource = "new";
- int cursorLocation = str.indexOf("new Y(") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "import p2.Y;\n" +
- "public class X {\n" +
- " public static final float Vars;\n" +
- " public static final float Lines;\n" +
- " public static final float Source;\n" +
- " public static final float UnreachableCode;\n" +
- " public static final float produceDebugAttributes;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int locale;\n" +
- " int errorThreshold;\n" +
- " int preserveAllLocalVariables;\n" +
- " new Y[]{<CompleteOnName:n>};\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testX_1FGPE8E() {
- String str =
- "package p; \n" +
- "import p2.Y; \n" +
- "/**\n" +
- " * 1FGGV8C and 1FGPE8E\n" +
- " */\n" +
- "public class X {\n" +
- " public static final float Vars; \n" +
- " public static final float Lines; \n" +
- " public static final float Source; \n" +
- " public static final float UnreachableCode; \n" +
- " public static final float produceDebugAttributes; \n" +
- " void foo() {\n" +
- " int locale, \n" +
- " errorThreshold, \n" +
- " preserveAllLocalVariables; \n" +
- " return new Y[] {\n" +
- " new Y(\n" +
- " \"debug.vars\", \n" +
- " this, \n" +
- " locale, \n" +
- " (produceDebugAttributes\n" +
- " & Vars)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new Y(\n" +
- " \"debug.lines\", \n" +
- " this, \n" +
- " locale, \n" +
- " (produceDebugAttributes\n" +
- " & Lines)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new Y(\n" +
- " \"debug.source\", \n" +
- " this, \n" +
- " locale, \n" +
- " (produceDebugAttributes\n" +
- " & Source)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new Y(\n" +
- " \"debug.preserveAllLocals\", \n" +
- " this, \n" +
- " locale, \n" +
- " preserveAllLocalVariables\n" +
- " ? 0\n" +
- " : 1), \n" +
- " new Y(\n" +
- " \"optionalError.unReachableCode\", \n" +
- " this, \n" +
- " locale, \n" +
- " (errorThreshold\n" +
- " & UnreachableCode)\n" +
- " != 0\n" +
- " ? 0\n" +
- " : 1)\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field into return statement>";
- String completeBehind = "n";
- String expectedCompletionNodeToString = "<CompleteOnName:n>";
- String completionIdentifier = "n";
- String expectedReplacedSource = "new";
- int cursorLocation = str.indexOf("new Y[]") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "import p2.Y;\n" +
- "public class X {\n" +
- " public static final float Vars;\n" +
- " public static final float Lines;\n" +
- " public static final float Source;\n" +
- " public static final float UnreachableCode;\n" +
- " public static final float produceDebugAttributes;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int locale;\n" +
- " int errorThreshold;\n" +
- " int preserveAllLocalVariables;\n" +
- " return <CompleteOnName:n>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-// Disabled since javadoc completion has been implemented
-public void _testXA_1FGGUQF_1FHSL8H_1() {
- String str =
- "// int\n" +
- "package p; \n" +
- "/**\n" +
- " * 1FGGUQF and 1FHSL8H\n" +
- " */\n" +
- "/**\n" +
- " * int\n" +
- " */\n" +
- "/*\n" +
- " * int\n" +
- " */\n" +
- "// int\n" +
- "/**\n" +
- "int.\n" +
- " * Internal API used to resolve a compilation unit minimally for code assist engine\n" +
- " */\n" +
- "/**\n" +
- " * int\n" +
- " */\n" +
- "public class XA {\n" +
- " // int\n" +
- " /* int */\n" +
- " /** int */\n" +
- " /**\n" +
- " int.\n" +
- " * Internal API used to resolve a compilation unit minimally for code assist engine\n" +
- " */\n" +
- " void /* int */\n" +
- " foo() {\n" +
- " // int\n" +
- " /* int */\n" +
- " /** int */\n" +
- " }\n" +
- " /**\n" +
- " int.\n" +
- " * Internal API used to resolve a compilation unit minimally for code assist engine\n" +
- " */\n" +
- " int field /* int */\n" +
- " ;\n" +
- " /*\n" +
- " int\n" +
- " */\n" +
- " static {\n" +
- " // int\n" +
- " }\n" +
- "}\n" +
- "// int\n" +
- "/* int */\n" +
- "/** int */\n";
-
- String testName = "<complete on comment>";
- String completeBehind = "int.";
- String expectedCompletionNodeToString = NONE;
- String completionIdentifier = "";
- String expectedReplacedSource = NONE;
- int cursorLocation = str.indexOf("int.\n") + completeBehind.length() - 1;
- String expectedUnitDisplayString = null;
-
- try {
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
- assertTrue("failed to detect invalid cursor location", false);
- } catch(InvalidCursorLocation e){
- assertEquals("invalid cursor location: ", e.irritant, InvalidCursorLocation.NO_COMPLETION_INSIDE_COMMENT);
- }
-}
-public void testXA_1FGGUQF_1FHSL8H_2() {
- String str =
- "// int\n" +
- "package p; \n" +
- "/**\n" +
- " * 1FGGUQF and 1FHSL8H\n" +
- " */\n" +
- "/**\n" +
- " * int\n" +
- " */\n" +
- "/*\n" +
- " * int\n" +
- " */\n" +
- "// int\n" +
- "/**\n" +
- "int.\n" +
- " * Internal API used to resolve a compilation unit minimally for code assist engine\n" +
- " */\n" +
- "/**\n" +
- " * int\n" +
- " */\n" +
- "public class XA {\n" +
- " // int\n" +
- " /* int */\n" +
- " /** int */\n" +
- " /**\n" +
- " int.\n" +
- " * Internal API used to resolve a compilation unit minimally for code assist engine\n" +
- " */\n" +
- " void /* int */\n" +
- " foo() {\n" +
- " // int\n" +
- " /* int */\n" +
- " /** int */\n" +
- " }\n" +
- " /**\n" +
- " int.\n" +
- " * Internal API used to resolve a compilation unit minimally for code assist engine\n" +
- " */\n" +
- " int field /* int */\n" +
- " ;\n" +
- " /*\n" +
- " int\n" +
- " */\n" +
- " static {\n" +
- " // int\n" +
- " }\n" +
- "}\n" +
- "// int\n" +
- "/* int */\n" +
- "/** int */\n";
-
- String testName = "<complete on comment>";
- String completeBehind = "i";
- String expectedCompletionNodeToString = NONE;
- String completionIdentifier = "";
- String expectedReplacedSource = NONE;
- int cursorLocation = str.indexOf("int\n") + completeBehind.length() - 1;
- String expectedUnitDisplayString = null;
-
- try {
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
- assertTrue("failed to detect invalid cursor location", false);
- } catch(InvalidCursorLocation e){
- assertEquals("invalid cursor location: ", e.irritant, InvalidCursorLocation.NO_COMPLETION_INSIDE_COMMENT);
- }
-}
-public void testXA_1FGGUQF_1FHSL8H_3() {
- String str =
- "// int\n" +
- "package p; \n" +
- "/**\n" +
- " * 1FGGUQF and 1FHSL8H\n" +
- " */\n" +
- "/**\n" +
- " * int\n" +
- " */\n" +
- "/*\n" +
- " * int\n" +
- " */\n" +
- "// int\n" +
- "/**\n" +
- "int.\n" +
- " * Internal API used to resolve a compilation unit minimally for code assist engine\n" +
- " */\n" +
- "/**\n" +
- " * int\n" +
- " */\n" +
- "public class XA {\n" +
- " // int\n" +
- " /* int */\n" +
- " /** int */\n" +
- " /**\n" +
- " int.\n" +
- " * Internal API used to resolve a compilation unit minimally for code assist engine\n" +
- " */\n" +
- " void /* int */ foo() {\n" +
- " // int\n" +
- " /* int */\n" +
- " /** int */\n" +
- " }\n" +
- " /**\n" +
- " int.\n" +
- " * Internal API used to resolve a compilation unit minimally for code assist engine\n" +
- " */\n" +
- " int field /* int */\n" +
- " ;\n" +
- " /*\n" +
- " int\n" +
- " */\n" +
- " static {\n" +
- " // int\n" +
- " }\n" +
- "}\n" +
- "// int\n" +
- "/* int */\n" +
- "/** int */\n";
-
- String testName = "<complete on comment>";
- String completeBehind = "i";
- String expectedCompletionNodeToString = NONE;
- String completionIdentifier = "";
- String expectedReplacedSource = NONE;
- int cursorLocation = str.indexOf("int */") + completeBehind.length() - 1;
- String expectedUnitDisplayString = null;
-
- try {
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
- assertTrue("failed to detect invalid cursor location", false);
- } catch(InvalidCursorLocation e){
- assertEquals("invalid cursor location: ", e.irritant, InvalidCursorLocation.NO_COMPLETION_INSIDE_COMMENT);
- }
-}
-public void testXA_1FGGUQF_1FHSL8H_4() {
- String str =
- "// int\n" +
- "package p; \n" +
- "/**\n" +
- " * 1FGGUQF and 1FHSL8H\n" +
- " */\n" +
- "/**\n" +
- " * int\n" +
- " */\n" +
- "/*\n" +
- " * int\n" +
- " */\n" +
- "// int\n" +
- "/**\n" +
- "int.\n" +
- " * Internal API used to resolve a compilation unit minimally for code assist engine\n" +
- " */\n" +
- "/**\n" +
- " * int\n" +
- " */\n" +
- "public class XA {\n" +
- " // int\n" +
- " /* int */\n" +
- " /** int */\n" +
- " /**\n" +
- " int.\n" +
- " * Internal API used to resolve a compilation unit minimally for code assist engine\n" +
- " */\n" +
- " void /* int */ foo() {\n" +
- " // int\n" +
- " /* int */\n" +
- " /** int */\n" +
- " }\n" +
- " /**\n" +
- " int.\n" +
- " * Internal API used to resolve a compilation unit minimally for code assist engine\n" +
- " */\n" +
- " int field /* int */\n" +
- " ;\n" +
- " /*\n" +
- " int\n" +
- " */\n" +
- " static {\n" +
- " // int\n" +
- " }\n" +
- "}\n" +
- "// int\n" +
- "/* int */\n" +
- "/** int */\n";
-
- String testName = "<complete on comment>";
- String completeBehind = "i";
- String expectedCompletionNodeToString = NONE;
- String completionIdentifier = "";
- String expectedReplacedSource = NONE;
- int cursorLocation = str.indexOf("int */ foo()") + completeBehind.length() - 1;
- String expectedUnitDisplayString = null;
-
- try {
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
- assertTrue("failed to detect invalid cursor location", false);
- } catch(InvalidCursorLocation e){
- assertEquals("invalid cursor location: ", e.irritant, InvalidCursorLocation.NO_COMPLETION_INSIDE_COMMENT);
- }
-}
-public void testXB_1FIYM5I_1() {
- String str =
- "package p; \n" +
- "/*\n" +
- " * 1FIYM5I\n" +
- " */\n" +
- "public class XB\n" +
- " extends java.io.File {\n" +
- " void foo() {\n" +
- " XB xb = new XB();\n" +
- " this.separator.;\n" +
- " this.bar().;\n" +
- " }\n" +
- " String bar() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field of explicit this access>";
- String completeBehind = "this.s";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:this.s>";
- String completionIdentifier = "s";
- String expectedReplacedSource = "this.separator";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class XB extends java.io.File {\n" +
- " public XB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " XB xb;\n" +
- " <CompleteOnMemberAccess:this.s>;\n" +
- " }\n" +
- " String bar() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testXB_1FIYM5I_2() {
- String str =
- "package p; \n" +
- "/*\n" +
- " * 1FIYM5I\n" +
- " */\n" +
- "public class XB\n" +
- " extends java.io.File {\n" +
- " void foo() {\n" +
- " XB xb = new XB();\n" +
- " this.separator.;\n" +
- " this.bar().;\n" +
- " }\n" +
- " String bar() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field of explicitly accessed field>";
- String completeBehind = "this.separator.";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:this.separator.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class XB extends java.io.File {\n" +
- " public XB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " XB xb;\n" +
- " <CompleteOnMemberAccess:this.separator.>;\n" +
- " }\n" +
- " String bar() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testXB_1FIYM5I_3() {
- String str =
- "package p; \n" +
- "/*\n" +
- " * 1FIYM5I\n" +
- " */\n" +
- "public class XB\n" +
- " extends java.io.File {\n" +
- " void foo() {\n" +
- " XB xb = new XB();\n" +
- " this.separator.;\n" +
- " this.bar().;\n" +
- " }\n" +
- " String bar() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field of explicit this access>";
- String completeBehind = "this.b";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:this.b>";
- String completionIdentifier = "b";
- String expectedReplacedSource = "this.bar";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class XB extends java.io.File {\n" +
- " public XB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " XB xb;\n" +
- " <CompleteOnMemberAccess:this.b>;\n" +
- " }\n" +
- " String bar() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testXB_1FIYM5I_4() {
- String str =
- "package p; \n" +
- "/*\n" +
- " * 1FIYM5I\n" +
- " */\n" +
- "public class XB\n" +
- " extends java.io.File {\n" +
- " void foo() {\n" +
- " XB xb = new XB();\n" +
- " this.separator.;\n" +
- " this.bar().;\n" +
- " }\n" +
- " String bar() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field of explicitly accessed method>";
- String completeBehind = "this.bar().";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:this.bar().>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class XB extends java.io.File {\n" +
- " public XB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " XB xb;\n" +
- " <CompleteOnMemberAccess:this.bar().>;\n" +
- " }\n" +
- " String bar() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testY_1FGPESI() {
- String str =
- "package p; \n" +
- "import p2.; \n" +
- "/**\n" +
- " * 1FGPESI\n" +
- " */\n" +
- "public class Y {\n" +
- "}\n";
-
- String testName = "<complete on imports>";
- String completeBehind = "p2.";
- String expectedCompletionNodeToString = "<CompleteOnImport:p2.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "p2.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "import <CompleteOnImport:p2.>;\n" +
- "public class Y {\n" +
- " public Y() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testYA_1FGRIUH() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGRIUH\n" +
- " */\n" +
- "public class YA\n" +
- " extends YASecondTopLevel {\n" +
- " void eFoo() {\n" +
- " }\n" +
- " class YAMember {\n" +
- " void eFoo() {\n" +
- " }\n" +
- " void eBar() {\n" +
- " e }\n" +
- " }\n" +
- "}\n" +
- "class YASecondTopLevel {\n" +
- " public boolean equals(YA yaya) {\n" +
- " return true;\n" +
- " }\n" +
- " public eFoo() {\n" +
- " }\n" +
- " public void eFooBar() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete on method/field>";
- String completeBehind = "e";
- String expectedCompletionNodeToString = "<CompleteOnName:e>";
- String completionIdentifier = "e";
- String expectedReplacedSource = "e";
- int cursorLocation = str.indexOf("e }") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class YA extends YASecondTopLevel {\n" +
- " class YAMember {\n" +
- " YAMember() {\n" +
- " }\n" +
- " void eFoo() {\n" +
- " }\n" +
- " void eBar() {\n" +
- " <CompleteOnName:e>;\n" +
- " }\n" +
- " }\n" +
- " public YA() {\n" +
- " }\n" +
- " void eFoo() {\n" +
- " }\n" +
- "}\n" +
- "class YASecondTopLevel {\n" +
- " YASecondTopLevel() {\n" +
- " }\n" +
- " public boolean equals(YA yaya) {\n" +
- " }\n" +
- " public eFoo() {\n" +
- " }\n" +
- " public void eFooBar() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testYB_1FJ4D46_1() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FJ4D46\n" +
- " */\n" +
- "public class YB {\n" +
- " void foo() {\n" +
- " new String(\"asdf\".getBytes()).}\n" +
- "}\n";
-
- String testName = "<complete on method/field of object creation>";
- String completeBehind = "new String(\"asdf\".getBytes()).";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:new String(\"asdf\".getBytes()).>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class YB {\n" +
- " public YB() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:new String(\"asdf\".getBytes()).>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testZ_1FGPF3D_1() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGPF3D\n" +
- " */\n" +
- "public class Z imp Pro.Sev, \n" +
- " Bla.Blo {\n" +
- "}\n";
-
- String testName = "<complete on implements keyword>";
- String completeBehind = "imp";
- String expectedCompletionNodeToString = "<CompleteOnKeyword:imp>";
- String completionIdentifier = "imp";
- String expectedReplacedSource = "imp";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class Z extends <CompleteOnKeyword:imp> {\n" +
- " {\n" +
- " }\n" +
- " public Z() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testZ_1FGPF3D_2() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FGPF3D\n" +
- " */\n" +
- "public class Z implements Pro.Sev, \n" +
- " Bla.Blo {\n" +
- "}\n";
-
- String testName = "<complete on implented interface>";
- String completeBehind = "P";
- String expectedCompletionNodeToString = "<CompleteOnInterface:P>";
- String completionIdentifier = "P";
- String expectedReplacedSource = "Pro";
- int cursorLocation = str.indexOf("Pro.Sev") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class Z implements <CompleteOnInterface:P>, Bla.Blo {\n" +
- " public Z() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testZA_1() {
- String str =
- "package p; \n" +
- "import java.util.Vector;\n";
-
- String testName = "<complete on import keyword>";
- String completeBehind = "i";
- String expectedCompletionNodeToString = "<CompleteOnKeyword:i>";
- String completionIdentifier = "i";
- String expectedReplacedSource = "import";
- int cursorLocation = str.indexOf("import") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "import <CompleteOnKeyword:i>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testZA_2() {
- String str =
- "package p; \n" +
- "import java.util.Vector;\n";
-
- String testName = "<complete on imported package>";
- String completeBehind = "jav";
- String expectedCompletionNodeToString = "<CompleteOnImport:jav>";
- String completionIdentifier = "jav";
- String expectedReplacedSource = "java.util.Vector";
- int cursorLocation = str.indexOf("java.util.Vector") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "import <CompleteOnImport:jav>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testZA_3() {
- String str =
- "package p; \n" +
- "import java.util.Vector;\n";
-
- String testName = "<complete on imported type>";
- String completeBehind = "java.util.V";
- String expectedCompletionNodeToString = "<CompleteOnImport:java.util.V>";
- String completionIdentifier = "V";
- String expectedReplacedSource = "java.util.Vector";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "import <CompleteOnImport:java.util.V>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testZB_1FJ4D46_1() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FJ4D46\n" +
- " */\n" +
- "import java.util.zip.CRC32;\n" +
- "import java.io.*;\n" +
- "public class ZB {\n" +
- " public static void main(\n" +
- " java.lang.String[] args) {\n" +
- " File file = \n" +
- " new File(\"d:\\\\314\"); \n" +
- " CRC32 crc = new CRC32();\n" +
- " file.}\n" +
- "}\n";
-
- String testName = "<complete on method/field of local variable>";
- String completeBehind = "file.";
- String expectedCompletionNodeToString = "<CompleteOnName:file.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "file.";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "import java.util.zip.CRC32;\n" +
- "import java.io.*;\n" +
- "public class ZB {\n" +
- " public ZB() {\n" +
- " }\n" +
- " public static void main(java.lang.String[] args) {\n" +
- " File file;\n" +
- " CRC32 crc;\n" +
- " <CompleteOnName:file.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void testZB_1FJ4D46_2() {
- String str =
- "package p; \n" +
- "/**\n" +
- " * 1FJ4D46\n" +
- " */\n" +
- "import java.util.zip.CRC32;\n" +
- "import java.io.*;\n" +
- "public class ZB {\n" +
- " public static void main(\n" +
- " java.lang.String[] args) {\n" +
- " File file = \n" +
- " new File(\"d:\\\\314\"); \n" +
- " CRC32 crc = new CRC32();\n" +
- " file.}\n" +
- "}\n";
-
- String testName = "<complete on local variable type>";
- String completeBehind = "CRC";
- String expectedCompletionNodeToString = "<CompleteOnName:CRC>";
- String completionIdentifier = "CRC";
- String expectedReplacedSource = "CRC32";
- int cursorLocation = str.indexOf("CRC32 crc") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "import java.util.zip.CRC32;\n" +
- "import java.io.*;\n" +
- "public class ZB {\n" +
- " public ZB() {\n" +
- " }\n" +
- " public static void main(java.lang.String[] args) {\n" +
- " File file;\n" +
- " <CompleteOnName:CRC>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * Complete in initializer
- */
-public void test001(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " int v1;\n" +
- " {\n" +
- " Obj\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete in initializer>";
- String completeBehind = "Obj";
- String expectedCompletionNodeToString = "<CompleteOnName:Obj>";
- String completionIdentifier = "Obj";
- String expectedReplacedSource = "Obj";
- int cursorLocation = str.indexOf("Obj") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int v1;\n" +
- " {\n" +
- " <CompleteOnName:Obj>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * Complete after initializer
- */
-public void test002(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " int v1;\n" +
- " {\n" +
- " int v2\n" +
- " }\n" +
- " Obj" +
- " }\n" +
- "}\n";
-
- String testName = "<complete after initializer>";
- String completeBehind = "Obj";
- String expectedCompletionNodeToString = "<CompleteOnName:Obj>";
- String completionIdentifier = "Obj";
- String expectedReplacedSource = "Obj";
- int cursorLocation = str.indexOf("Obj") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int v1;\n" +
- " <CompleteOnName:Obj>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * Complete in initializer
- */
-public void test003(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " int v1;\n" +
- " {\n" +
- " this.\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete in initializer>";
- String completeBehind = "this.";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:this.>";
- String completionIdentifier = "";
- String expectedReplacedSource = "this.";
- int cursorLocation = str.indexOf("this.") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int v1;\n" +
- " {\n" +
- " <CompleteOnMemberAccess:this.>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-/**
- * Complete in switch
- */
-public void test004(){
- String str =
- "public class X {\n" +
- " final static int ZZZ = 1;\n"+
- " void foo(){\n" +
- " switch(2)\n" +
- " case 0 + ZZZ :\n" +
- " case 1 + ZZZ :\n" +
- " bar(ZZZ)\n" +
- " }\n" +
- " void bar(int y) {}\n"+
- "}\n";
-
- String testName = "<complete in switch>";
- String completeBehind = "ZZZ";
- String expectedCompletionNodeToString = "<CompleteOnName:ZZZ>";
- String completionIdentifier = "ZZZ";
- String expectedReplacedSource = "ZZZ";
- int cursorLocation = str.lastIndexOf("ZZZ") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "public class X {\n" +
- " static final int ZZZ;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " bar(<CompleteOnName:ZZZ>);\n" +
- " }\n" +
- " void bar(int y) {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * Complete in method type.
- */
-public void test005(){
- String str =
- "public class X {\n" +
- " clon foo(){\n" +
- " }\n" +
- "}\n";
-
- String testName = "<complete in method type>";
- String completeBehind = "clon";
- String expectedCompletionNodeToString = "<CompleteOnType:clon>";
- String completionIdentifier = "clon";
- String expectedReplacedSource = "clon";
- int cursorLocation = str.lastIndexOf("clon") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " <CompleteOnType:clon>\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * Complete in method type.
- */
-public void test006(){
- String str =
- "public class X {\n" +
- " clon\n" +
- " foo();\n" +
- "}\n";
-
- String testName = "<complete in method type>";
- String completeBehind = "clon";
- String expectedCompletionNodeToString = "<CompleteOnType:clon>;";
- String completionIdentifier = "clon";
- String expectedReplacedSource = "clon";
- int cursorLocation = str.lastIndexOf("clon") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:clon>;\n" +
- " public X() {\n" +
- " }\n" +
- " foo();\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * Complete in field type.
- */
-public void test007(){
- String str =
- "public class X {\n" +
- " clon x;\n" +
- "}\n";
-
- String testName = "<complete in field type>";
- String completeBehind = "clon";
- String expectedCompletionNodeToString = "<CompleteOnType:clon>;";
- String completionIdentifier = "clon";
- String expectedReplacedSource = "clon";
- int cursorLocation = str.lastIndexOf("clon") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:clon>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * Complete in field type.
- */
-public void test008(){
- String str =
- "public class X {\n" +
- " clon\n" +
- " x;\n" +
- "}\n";
-
- String testName = "<complete in field type>";
- String completeBehind = "clon";
- String expectedCompletionNodeToString = "<CompleteOnType:clon>;";
- String completionIdentifier = "clon";
- String expectedReplacedSource = "clon";
- int cursorLocation = str.lastIndexOf("clon") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:clon>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * Complete in field type.
- */
-public void test009(){
- String str =
- "public class X {\n" +
- " clon\n" +
- " x y;\n" +
- "}\n";
-
- String testName = "<complete in field tpye>";
- String completeBehind = "clon";
- String expectedCompletionNodeToString = "<CompleteOnType:clon>;";
- String completionIdentifier = "clon";
- String expectedReplacedSource = "clon";
- int cursorLocation = str.lastIndexOf("clon") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:clon>;\n" +
- " x y;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * Complete in method type.
- */
-public void test010(){
- String str =
- "public class X {\n" +
- " clon\n" +
- " x y(){}\n" +
- "}\n";
-
- String testName = "<complete in method type>";
- String completeBehind = "clon";
- String expectedCompletionNodeToString = "<CompleteOnType:clon>;";
- String completionIdentifier = "clon";
- String expectedReplacedSource = "clon";
- int cursorLocation = str.lastIndexOf("clon") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:clon>;\n" +
- " public X() {\n" +
- " }\n" +
- " x y() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=25233
- */
-public void test011(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " new Object[]{\n" +
- " bar(zzz)\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- String testName = "<bug 25233>";
- String completeBehind = "zzz";
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- int cursorLocation = str.lastIndexOf("zzz") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " bar(<CompleteOnName:zzz>);\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=27370
- */
-public void test012(){
- String str =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " Object o = new ZZZ\n" +
- "}\n";
-
- String testName = "<bug 27370>";
- String completeBehind = "ZZZ";
- String expectedCompletionNodeToString = "<CompleteOnType:ZZZ>";
- String completionIdentifier = "ZZZ";
- String expectedReplacedSource = "ZZZ";
- int cursorLocation = str.lastIndexOf("ZZZ") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "public class X {\n" +
- " Object o = new <CompleteOnType:ZZZ>();\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=27735
- */
-public void test013(){
- String str =
- "public class Bar {\n" +
- " #\n" +
- " Bar foo1 = new Bar(){};\n" +
- " {int i;}\n" +
- " synchronized void foo3() {}\n" +
- " zzz\n" +
- "}\n";
-
- String testName = "<bug 27735>";
- String completeBehind = "zzz";
- String expectedCompletionNodeToString = "<CompleteOnType:zzz>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- int cursorLocation = str.lastIndexOf("zzz") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "public class Bar {\n" +
- " Bar foo1;\n" +
- " {\n" +
- " }\n" +
- " <CompleteOnType:zzz>;\n" +
- " public Bar() {\n" +
- " }\n" +
- " synchronized void foo3() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=27941
- */
-public void test014(){
- String str =
- "public class Bar {\n" +
- " void foo() {\n" +
- " String s = \"a\" + \"b\";\n" +
- " zzz\n" +
- " }\n" +
- "}\n";
-
- String testName = "<bug 27941>";
- String completeBehind = "zzz";
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- int cursorLocation = str.lastIndexOf("zzz") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "public class Bar {\n" +
- " public Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " String s;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=39502
- */
-public void test015(){
- String str =
- "public class Bar {\n" +
- " void foo() {\n" +
- " Object o = new Object[]{};\n" +
- " foo();\n" +
- " }\n" +
- "}\n";
-
- String testName = "<bug 39502>";
- String completeBehind = "foo(";
- String expectedCompletionNodeToString = "<CompleteOnMessageSend:foo()>";
- String completionIdentifier = "";
- String expectedReplacedSource = "foo(";
- int cursorLocation = str.lastIndexOf("foo(") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "public class Bar {\n" +
- " public Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " <CompleteOnMessageSend:foo()>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/**
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=39502
- */
-public void test016(){
- String str =
- "public class Bar {\n" +
- " void foo() {\n" +
- " Object o = new Object[0];\n" +
- " foo();\n" +
- " }\n" +
- "}\n";
-
- String testName = "<bug 39502>";
- String completeBehind = "foo(";
- String expectedCompletionNodeToString = "<CompleteOnMessageSend:foo()>";
- String completionIdentifier = "";
- String expectedReplacedSource = "foo(";
- int cursorLocation = str.lastIndexOf("foo(") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "public class Bar {\n" +
- " public Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " <CompleteOnMessageSend:foo()>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-public void test017(){
- String str =
- "public class Bar {\n" +
- " String s;\n" +
- " /**/\n" +
- "}\n";
-
- String testName = "";
- String completeBehind = "/**/";
- String expectedCompletionNodeToString = "<CompleteOnType:>";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- int cursorLocation = str.lastIndexOf("/**/") + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "public class Bar {\n" +
- " String s;\n" +
- " <CompleteOnType:>;\n" +
- " public Bar() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-public void testRECOVERY001() {
- String str =
- "var foo;\n" +
- "if (f) {\n";
-
- String testName = "<complete on name inside if>";
- String completeBehind = "(f";
- String expectedCompletionNodeToString = "<CompleteOnName:f>";
- String completionIdentifier = "f";
- String expectedReplacedSource = "f";
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- String expectedUnitDisplayString =
- "var foo;\n" +
- "if (<CompleteOnName:f>)\n" +
- "\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionParserTest2.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionParserTest2.java
deleted file mode 100644
index 866e47b..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionParserTest2.java
+++ /dev/null
@@ -1,9671 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-public class CompletionParserTest2 extends AbstractCompletionTest {
-public CompletionParserTest2(String testName) {
- super(testName);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(CompletionParserTest2.class);
-}
-public void test0001(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " Object o = zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o = <CompleteOnName:zzz>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-public void test0002(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o = zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o = <CompleteOnName:zzz>;\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0003(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o = zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o = <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0004(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " Object o = zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o = <CompleteOnName:zzz>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-public void test0005(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " Object o = zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " Object o = <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0006(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " Object o = zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "Object o = <CompleteOnName:zzz>;";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o = <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0007(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " Object o = new zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:zzz>";
- String expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o = new <CompleteOnType:zzz>();\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-public void test0008(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o = new zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnType:zzz>";
- expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o = new <CompleteOnType:zzz>();\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0009(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o = new zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnType:zzz>";
- expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o = new <CompleteOnType:zzz>();\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0010(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " Object o = new zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:zzz>";
- String expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o = new <CompleteOnType:zzz>();\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-public void test0011(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " Object o = new zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnType:zzz>";
- expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " Object o = new <CompleteOnType:zzz>();\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0012(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " Object o = new zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnType:zzz>";
- expectedParentNodeToString = "Object o = new <CompleteOnType:zzz>();";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o = new <CompleteOnType:zzz>();\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0013(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " Object o = yyy;\n" +
- " zzz\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:zzz>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o;\n" +
- " <CompleteOnType:zzz>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-public void test0014(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o = yyy;\n" +
- " zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0015(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o = yyy;\n" +
- " zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0016(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " Object o = yyy;\n" +
- " zzz\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:zzz>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o;\n" +
- " <CompleteOnType:zzz>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-public void test0017(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " Object o = yyy;\n" +
- " zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " Object o;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0018(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " Object o = yyy;\n" +
- " zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0019(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " Object o = bar(zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "bar(<CompleteOnName:zzz>)";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o = bar(<CompleteOnName:zzz>);\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-public void test0020(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o = bar(zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "bar(<CompleteOnName:zzz>)";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o = bar(<CompleteOnName:zzz>);\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0021(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o = bar(zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "bar(<CompleteOnName:zzz>)";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o = bar(<CompleteOnName:zzz>);\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0022(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " Object o = bar(zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "bar(<CompleteOnName:zzz>)";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o = bar(<CompleteOnName:zzz>);\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-public void test0023(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " Object o = bar(zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "bar(<CompleteOnName:zzz>)";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " Object o = bar(<CompleteOnName:zzz>);\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0024(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " Object o = bar(zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "bar(<CompleteOnName:zzz>)";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o = bar(<CompleteOnName:zzz>);\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0025(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " Object o = new X(zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new X(<CompleteOnName:zzz>)";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o = new X(<CompleteOnName:zzz>);\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-
-public void test0026(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o = new X(zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X(<CompleteOnName:zzz>)";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o = new X(<CompleteOnName:zzz>);\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0027(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o = new X(zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X(<CompleteOnName:zzz>)";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o = new X(<CompleteOnName:zzz>);\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0028(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " Object o = new X(zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new X(<CompleteOnName:zzz>)";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o = new X(<CompleteOnName:zzz>);\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-
-public void test0029(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " Object o = new X(zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X(<CompleteOnName:zzz>)";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " Object o = new X(<CompleteOnName:zzz>);\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0030(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " Object o = new X(zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X(<CompleteOnName:zzz>)";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o = new X(<CompleteOnName:zzz>);\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0031(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " Object o = {zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o;\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0032(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o = {zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0033(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o = {zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0034(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " Object o = {zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o;\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0035(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " Object o = {zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " Object o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0036(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " Object o = {zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0037(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " Object[] o = {zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object[] o = {<CompleteOnName:zzz>};\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-
-public void test0038(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object[] o = {zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object[] o = {<CompleteOnName:zzz>};\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0039(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object[] o = {zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object[] o = {<CompleteOnName:zzz>};\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0040(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " Object[] o = {zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object[] o = {<CompleteOnName:zzz>};\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-
-public void test0041(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " Object[] o = {zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " Object[] o = {<CompleteOnName:zzz>};\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0042(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " Object[] o = {zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "Object[] o = {<CompleteOnName:zzz>};";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object[] o = {<CompleteOnName:zzz>};\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0043(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " Object[] o = new X[zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object[] o = new X[<CompleteOnName:zzz>];\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-
-
-public void test0044(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object[] o = new X[zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object[] o = new X[<CompleteOnName:zzz>];\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-
-public void test0045(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object[] o = new X[zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object[] o = new X[<CompleteOnName:zzz>];\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-
-public void test0046(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " Object[] o = new X[zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object[] o = new X[<CompleteOnName:zzz>];\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-
-
-public void test0047(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " Object[] o = new X[zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " Object[] o = new X[<CompleteOnName:zzz>];\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-
-public void test0048(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " Object[] o = new X[zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object[] o = new X[<CompleteOnName:zzz>];\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0049(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " Object[] o = new X[]{zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object[] o = new X[]{<CompleteOnName:zzz>};\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-public void test0050(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object[] o = new X[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object[] o = new X[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0051(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object[] o = new X[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " new X[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object[] o = new X[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0052(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " Object[] o = new X[]{zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object[] o = new X[]{<CompleteOnName:zzz>};\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-public void test0053(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " Object[] o = new X[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " Object[] o = new X[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0054(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " Object[] o = new X[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " new X[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object[] o = new X[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0055(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " Object[] o = zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object[] o = <CompleteOnName:zzz>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-public void test0056(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object[] o = zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object[] o = <CompleteOnName:zzz>;\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0057(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object[] o = zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object[] o = <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0058(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " Object[] o = zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object[] o = <CompleteOnName:zzz>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-public void test0059(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " Object[] o = zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " Object[] o = <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0060(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " Object[] o = zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "Object[] o = <CompleteOnName:zzz>;";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object[] o = <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0061(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " Object o = new X[zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o = new X[<CompleteOnName:zzz>];\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-public void test0062(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o = new X[zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o = new X[<CompleteOnName:zzz>];\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0063(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o = new X[zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o = new X[<CompleteOnName:zzz>];\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0064(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " Object o = new X[zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new X[<CompleteOnName:zzz>]";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o = new X[<CompleteOnName:zzz>];\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-public void test0065(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " Object o = new X[zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " Object o = new X[<CompleteOnName:zzz>];\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0066(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " Object o = new X[zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[<CompleteOnName:zzz>]";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o = new X[<CompleteOnName:zzz>];\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0067(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " Object o = new X[]{zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o;\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0068(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o = new X[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o = new X[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0069(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o = new X[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " new X[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o = new X[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0070(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " Object o = new X[]{zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o;\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0071(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " Object o = new X[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " Object o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0072(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " Object o = new X[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " new X[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0073(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " int o = new int[zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new int[<CompleteOnName:zzz>]";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " int o = new int[<CompleteOnName:zzz>];\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-
-public void test0074(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " int o = new int[zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new int[<CompleteOnName:zzz>]";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " int o = new int[<CompleteOnName:zzz>];\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0075(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " int o = new int[zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new int[<CompleteOnName:zzz>]";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int o = new int[<CompleteOnName:zzz>];\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0076(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " int o = new int[zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new int[<CompleteOnName:zzz>]";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " int o = new int[<CompleteOnName:zzz>];\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-
-public void test0077(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " int o = new int[zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new int[<CompleteOnName:zzz>]";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " int o = new int[<CompleteOnName:zzz>];\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0078(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " int o = new int[zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new int[<CompleteOnName:zzz>]";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int o = new int[<CompleteOnName:zzz>];\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0079(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " int o = new int[]{zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " int o;\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " int o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0080(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " int o = new int[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new int[]{<CompleteOnName:zzz>}";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " int o = new int[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0081(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " int o = new int[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new int[]{<CompleteOnName:zzz>}";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " new int[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new int[]{<CompleteOnName:zzz>}";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int o = new int[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0082(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " int o = new int[]{zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " int o;\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " int o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0083(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " int o = new int[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " int o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0084(){
-
-
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " int o = new int[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new int[]{<CompleteOnName:zzz>}";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " new int[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0085(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " X o = new X[]{zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " X o;\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " X o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0086(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " X o = new X[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " X o = new X[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0087(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " X o = new X[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " new X[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " X o = new X[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0088(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " X o = new X[]{zzz;\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " X o;\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " X o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0089(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " X o = new X[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " X o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0090(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " X o = new X[]{zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "new X[]{<CompleteOnName:zzz>}";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " new X[]{<CompleteOnName:zzz>};\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " X o;\n" +
- " {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0091(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " Object o = \"yyy;\n" +
- " zzz\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:zzz>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o;\n" +
- " <CompleteOnType:zzz>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-
-public void test0092(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o = \"yyy;\n" +
- " zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " Object o;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0093(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o = \"yyy;\n" +
- " zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0094(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " #\n" +
- " Object o = \"yyy;\n" +
- " zzz\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:zzz>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " Object o;\n" +
- " <CompleteOnType:zzz>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-
-
-public void test0095(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " Object o = \"yyy;\n" +
- " zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " Object o;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-
-public void test0096(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " #\n" +
- " Object o = \"yyy;\n" +
- " zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " {\n" +
- " {\n" +
- " Object o;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0097(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o;\n" +
- " o = zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "o = <CompleteOnName:zzz>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " o = <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0098(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o;\n" +
- " o = zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "o = <CompleteOnName:zzz>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " o = <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0099(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o;\n" +
- " o = new zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnType:zzz>";
- expectedParentNodeToString = "o = new <CompleteOnType:zzz>()";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " o = new <CompleteOnType:zzz>();\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0100(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o;\n" +
- " o = new zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnType:zzz>";
- expectedParentNodeToString = "o = new <CompleteOnType:zzz>()";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " o = new <CompleteOnType:zzz>();\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0101(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o;\n" +
- " o = yyy;\n" +
- " zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0102(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o;\n" +
- " o = yyy;\n" +
- " zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0103(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o;\n" +
- " o = \"yyy;\n" +
- " zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0104(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " Object o;\n" +
- " o = \"yyy;\n" +
- " zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-
-public void test0105(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " int x = 1 + zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "(1 + <CompleteOnName:zzz>)";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int x = (1 + <CompleteOnName:zzz>);\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0106(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " int x = 1 + (zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "(1 + <CompleteOnName:zzz>)";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int x = (1 + <CompleteOnName:zzz>);\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0107(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " int x = 0;\n" +
- " int y = 1 + x;\n" +
- " zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int x;\n" +
- " int y;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0108(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " int x = -zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "(- <CompleteOnName:zzz>)";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int x = (- <CompleteOnName:zzz>);\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0109(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " int x = -(zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "(- <CompleteOnName:zzz>)";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int x = (- <CompleteOnName:zzz>);\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0110(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " int x = 0;\n" +
- " int y = -x;\n" +
- " zzz;\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int x;\n" +
- " int y;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0111(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " if(1 == zzz) {}\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "(1 == <CompleteOnName:zzz>)";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " (1 == <CompleteOnName:zzz>);\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0112(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " if(1 == (zzz)) {}\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "(1 == <CompleteOnName:zzz>)";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " (1 == <CompleteOnName:zzz>);\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0113(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(Object x){\n" +
- " if(x instanceof ZZZ) {}\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "ZZZ";
- int cursorLocation = str.indexOf("ZZZ") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo(Object x) {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnType:ZZZ>";
- expectedParentNodeToString = "(x instanceof <CompleteOnType:ZZZ>)";
- completionIdentifier = "ZZZ";
- expectedReplacedSource = "ZZZ";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo(Object x) {\n" +
- " (x instanceof <CompleteOnType:ZZZ>);\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0114(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " boolean a, b, c;\n" +
- " c = a == b ? zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "c = <CompleteOnName:zzz>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " boolean a;\n" +
- " boolean b;\n" +
- " boolean c;\n" +
- " c = <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0115(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " boolean a, b;\n" +
- " a == b ? zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " boolean a;\n" +
- " boolean b;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0116(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " boolean a, b, c;\n" +
- " c = a == b ? a : zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "c = ((a == b) ? a : <CompleteOnName:zzz>)";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " boolean a;\n" +
- " boolean b;\n" +
- " boolean c;\n" +
- " c = ((a == b) ? a : <CompleteOnName:zzz>);\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0117(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " boolean a, b, c;\n" +
- " c = a == b ? a : (zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "c = <CompleteOnName:zzz>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " boolean a;\n" +
- " boolean b;\n" +
- " boolean c;\n" +
- " c = <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0118(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " boolean a, b, c;\n" +
- " c = a# == b ? a : zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " boolean a;\n" +
- " boolean b;\n" +
- " boolean c;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0119(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " switch(1) {\n" +
- " case zzz\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString =
- "switch (1) {\n" +
- "case <CompleteOnName:zzz> : ;\n" +
- "}";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " switch (1) {\n" +
- " case <CompleteOnName:zzz> : ;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0120(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " switch(1) {\n" +
- " case Something :\n" +
- " case zzz\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString =
- "switch (1) {\n" +
- "case Something : ;\n" +
- "case <CompleteOnName:zzz> : ;\n" +
- "}";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " switch (1) {\n" +
- " case Something : ;\n" +
- " case <CompleteOnName:zzz> : ;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0121(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " tab[zzz]\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "tab[<CompleteOnName:zzz>]";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " tab[<CompleteOnName:zzz>];\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0122(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " tab[].zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnClassLiteralAccess:tab[].zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "tab[].zzz";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnClassLiteralAccess:tab[].zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0123(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " tab[0].zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnMemberAccess:tab[0].zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:tab[0].zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0124(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " foo()[zzz]\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "foo()[<CompleteOnName:zzz>]";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " foo()[<CompleteOnName:zzz>];\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0125(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " foo()[].zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0126(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " foo()[1].zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnMemberAccess:foo()[1].zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:foo()[1].zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0127(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " if (zzz() == null) bar = null;\n" +
- " }\n" +
- " Object o = new O();\n" +
- "}\n";
-
- String completeBehind = "O";
- int cursorLocation = str.lastIndexOf("O") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:O>";
- String expectedParentNodeToString = "Object o = new <CompleteOnType:O>();";
- String completionIdentifier = "O";
- String expectedReplacedSource = "O";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " Object o = new <CompleteOnType:O>();\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-public void test0128(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " new Object() {\n" +
- " void bar() {\n" +
- " a[zzz\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "a[<CompleteOnName:zzz>]";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new Object() {\n" +
- " void bar() {\n" +
- " a[<CompleteOnName:zzz>];\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0129(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " Object local;\n" +
- " double bar;\n" +
- " for(;;) {\n" +
- " bar = (double)0;\n" +
- " }\n" +
- " zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "zzz";
- expectedReplacedSource = "zzz";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object local;\n" +
- " double bar;\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=42856
- */
-public void test0130(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " A.B c = null;\n" +
- " zzz();\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz(";
- int cursorLocation = str.indexOf("zzz(") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnMessageSend:zzz()>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "";
- expectedReplacedSource = "zzz(";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " A.B c;\n" +
- " <CompleteOnMessageSend:zzz()>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=42856
- */
-public void test0131(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " try {\n" +
- " } catch(A.B e) {\n" +
- " zzz();\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "zzz(";
- int cursorLocation = str.indexOf("zzz(") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnMessageSend:zzz()>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "";
- expectedReplacedSource = "zzz(";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " A.B e;\n" +
- " <CompleteOnMessageSend:zzz()>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=44647
- */
-public void test0132(){
- String str =
- "public class A\n" +
- "{\n" +
- " public A(final String str1, final String str2)\n" +
- " {\n" +
- " \n" +
- " }\n" +
- " \n" +
- " private A[] methodA(final String str1, final String str2)\n" +
- " {\n" +
- " return new A[]\n" +
- " {\n" +
- " new A(str1, str2)\n" +
- " {\n" +
- " //initialiser!\n" +
- " {\n" +
- " methodA(\"1\", \"2\");\n" +
- " }\n" +
- " },\n" +
- " new A(\"hello\".c) //<--------code complete to \"hello\".concat()\n" +
- " };\n" +
- " \n" +
- " }\n" +
- "}\n";
-
-
- String completeBehind = "\"2\");";
- int cursorLocation = str.indexOf("\"2\");") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class A {\n" +
- " public A(final String str1, final String str2) {\n" +
- " }\n" +
- " private A[] methodA(final String str1, final String str2) {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "";
- expectedReplacedSource = "";
- expectedUnitDisplayString =
- "public class A {\n" +
- " public A(final String str1, final String str2) {\n" +
- " }\n" +
- " private A[] methodA(final String str1, final String str2) {\n" +
- " new A(str1, str2) {\n" +
- " {\n" +
- " <CompleteOnName:>;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=46470
- */
-public void test0133(){
- String str =
- "public class X {\n" +
- " int x;\n" +
- " void foo() {\n" +
- " switch(x){\n" +
- " case 0:\n" +
- " break;\n" +
- " }\n" +
- " bar\n" +
- " }\n" +
- "}\n";
-
-
- String completeBehind = "bar";
- int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " int x;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:bar>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "bar";
- expectedReplacedSource = "bar";
- expectedUnitDisplayString =
- "public class X {\n" +
- " int x;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:bar>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=43212
- */
-public void test0134(){
- String str =
- "public class X {\n" +
- " Object o = new Object() {\n" +
- " void foo() {\n" +
- " try {\n" +
- " } catch(Exception e) {\n" +
- " e.\n" +
- " }\n" +
- " }\n" +
- " };\n" +
- "}\n";
-
-
- String completeBehind = "e.";
- int cursorLocation = str.indexOf("e.") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<CompleteOnName:e.>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "";
- String expectedReplacedSource = "e.";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " Object o = new Object() {\n" +
- " void foo() {\n" +
- " {\n" +
- " Exception e;\n" +
- " <CompleteOnName:e.>;\n" +
- " }\n" +
- " }\n" +
- " };\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=43212
- */
-public void test0135(){
- String str =
- "public class X {\n" +
- " void bar(){\n" +
- " #\n" +
- " class Inner {\n" +
- " void foo() {\n" +
- " try {\n" +
- " } catch(Exception e) {\n" +
- " e.\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
-
- String completeBehind = "e.";
- int cursorLocation = str.indexOf("e.") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:e.>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "";
- expectedReplacedSource = "e.";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void bar() {\n" +
- " class Inner {\n" +
- " Inner() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " Exception e;\n" +
- " <CompleteOnName:e.>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48070
- */
-public void test0136(){
- String str =
- "public class X {\n" +
- " void bar(){\n" +
- " }\n" +
- "}\n";
-
-
- String completeBehind = "ba";
- int cursorLocation = str.indexOf("ba") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<CompletionOnMethodName:void ba()>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ba";
- String expectedReplacedSource = "bar()";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " <CompletionOnMethodName:void ba()>\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=53624
- */
-public void test0137(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " new Object(){\n" +
- " void bar(){\n" +
- " super.zzz();\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
-
- String completeBehind = "zzz(";
- int cursorLocation = str.indexOf("zzz(") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnMessageSend:super.zzz()>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "";
- expectedReplacedSource = "zzz(";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new Object() {\n" +
- " void bar() {\n" +
- " <CompleteOnMessageSend:super.zzz()>;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=41395
- */
-public void test0138(){
- String str =
- "public class X{\n" +
- " public void foo() {\n" +
- " new Y() {\n" +
- " public void bar() {\n" +
- " switch (zzz){\n" +
- " case 1 :\n" +
- " };\n" +
- " }\n" +
- " new Z() {\n" +
- " public void toto() { \n" +
- " }\n" +
- " });\n" +
- " });\n" +
- " }\n" +
- "}\n" +
- "\n";
-
-
- String completeBehind = "to";
- int cursorLocation = str.indexOf("to") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnFieldName:void to>;";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "to";
- expectedReplacedSource = "toto";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " new Y() {\n" +
- " public void bar() {\n" +
- " new Z() {\n" +
- " <CompleteOnFieldName:void to>;\n" +
- " {\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0139(){
- String str =
- "public class X extends Z. # {\n" +
- "}";
-
-
- String completeBehind = "Z.";
- int cursorLocation = str.indexOf("Z.") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<CompleteOnClass:Z.>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "";
- String expectedReplacedSource = "Z.";
- String expectedUnitDisplayString =
- "public class X extends <CompleteOnClass:Z.> {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n"
- ;
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=32061
- */
-public void test0140(){
- String str =
- "public class X {\n" +
- " public void baz() {\n" +
- " new Object() {\n" +
- " public void bar() {\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- " private Object var = new Object() {\n" +
- " public void foo(Object e) {\n" +
- " e.\n" +
- " }\n" +
- " };\n" +
- "}";
-
-
- String completeBehind = "e.";
- int cursorLocation = str.indexOf("e.") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<CompleteOnName:e.>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "";
- String expectedReplacedSource = "e.";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " private Object var = new Object() {\n" +
- " public void foo(Object e) {\n" +
- " <CompleteOnName:e.>;\n" +
- " }\n" +
- " };\n" +
- " public X() {\n" +
- " }\n" +
- " public void baz() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=32061
- */
-public void test0141(){
- String str =
- "public class X {\n" +
- " Object var1 = new Object() {};\n" +
- " void bar() {\n" +
- " new Object() {};\n" +
- " bar();\n" +
- " }\n" +
- " Object var2 = new \n" +
- "}";
-
-
- String completeBehind = "var2 = new ";
- int cursorLocation = str.indexOf("var2 = new ") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<CompleteOnType:>";
- String expectedParentNodeToString = "Object var2 = new <CompleteOnType:>();";
- String completionIdentifier = "";
- String expectedReplacedSource = "";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " Object var1;\n" +
- " Object var2 = new <CompleteOnType:>();\n" +
- " public X() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=39499
- */
-public void test0142(){
- String str =
- "public class X{\n" +
- " public void foo() {\n" +
- " bar(new Object(){\n" +
- " public void toto() {\n" +
- " if(a instanceof Object) {}\n" +
- " }\n" +
- " });\n" +
- " }\n" +
- "}\n" +
- "\n";
-
-
- String completeBehind = "instanceof";
- int cursorLocation = str.indexOf("instanceof") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnKeyword:instanceof>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "instanceof";
- expectedReplacedSource = "instanceof";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " new Object() {\n" +
- " public void toto() {\n" +
- " <CompleteOnKeyword:instanceof>;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702
- */
-public void test0143(){
- String str =
- "public class X{\n" +
- " public void foo() {\n" +
- " Object o =(int) tmp;\n" +
- " bar\n" +
- " }\n" +
- "}\n" +
- "\n";
-
-
- String completeBehind = "bar";
- int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:bar>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "bar";
- expectedReplacedSource = "bar";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " Object o;\n" +
- " <CompleteOnName:bar>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702
- */
-public void test0144(){
- String str =
- "public class X{\n" +
- " public void foo() {\n" +
- " Object o =(int[]) tmp;\n" +
- " bar\n" +
- " }\n" +
- "}\n" +
- "\n";
-
-
- String completeBehind = "bar";
- int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:bar>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "bar";
- expectedReplacedSource = "bar";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " Object o;\n" +
- " <CompleteOnName:bar>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702
- */
-public void test0145(){
- String str =
- "public class X{\n" +
- " public void foo() {\n" +
- " Object o =(X) tmp;\n" +
- " bar\n" +
- " }\n" +
- "}\n" +
- "\n";
-
-
- String completeBehind = "bar";
- int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:bar>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "bar";
- expectedReplacedSource = "bar";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " Object o;\n" +
- " <CompleteOnName:bar>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=71702
- */
-public void test0146(){
- String str =
- "public class X{\n" +
- " public void foo() {\n" +
- " Object o =(X[]) tmp;\n" +
- " bar\n" +
- " }\n" +
- "}\n" +
- "\n";
-
-
- String completeBehind = "bar";
- int cursorLocation = str.indexOf("bar") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:bar>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "bar";
- expectedReplacedSource = "bar";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " Object o;\n" +
- " <CompleteOnName:bar>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=72352
- */
-public void test0147(){
- String str =
- "public class Test {\n" +
- " Object m;\n" +
- " String[] values = (String[]) m;\n" +
- " lo\n" +
- " }";
-
- String completeBehind = "lo";
- int cursorLocation = str.indexOf("lo") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<CompleteOnType:lo>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "lo";
- String expectedReplacedSource = "lo";
- String expectedUnitDisplayString =
- "public class Test {\n" +
- " Object m;\n" +
- " String[] values;\n" +
- " <CompleteOnType:lo>;\n" +
- " public Test() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=83236
- */
-public void test0148(){
- String str =
- "public class Test {\n" +
- " Boolean\n" +
- " * some text <b>bold<i>both</i></b>\n" +
- " */\n" +
- " public void foo(String s) {\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "Boolean";
- int cursorLocation = str.indexOf("Boolean") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<CompleteOnType:Boolean>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "Boolean";
- String expectedReplacedSource = "Boolean";
- String expectedUnitDisplayString =
- "public class Test {\n" +
- " <CompleteOnType:Boolean>;\n" +
- " some text;\n" +
- " bold<i> both;\n" +
- " public Test() {\n" +
- " }\n" +
- " public void foo(String s) {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=91371
- */
-public void test0149(){
- String str =
- "public class X{\n" +
- " public void foo() {\n" +
- " new Object(){\n" +
- " void bar(){\n" +
- " if((titi & (ZZ\n" +
- "}\n" +
- "\n";
-
-
- String completeBehind = "ZZ";
- int cursorLocation = str.indexOf("ZZ") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ZZ";
- String expectedReplacedSource = "ZZ";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:ZZ>";
- expectedParentNodeToString = "(titi & <CompleteOnName:ZZ>)";
- completionIdentifier = "ZZ";
- expectedReplacedSource = "ZZ";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " new Object() {\n" +
- " void bar() {\n" +
- " (titi & <CompleteOnName:ZZ>);\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=91371
- */
-public void test0150(){
- String str =
- "public class X{\n" +
- " public void foo() {\n" +
- " if((titi & (ZZ\n" +
- "}\n" +
- "\n";
-
-
- String completeBehind = "ZZ";
- int cursorLocation = str.indexOf("ZZ") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ZZ";
- String expectedReplacedSource = "ZZ";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:ZZ>";
- expectedParentNodeToString = "(titi & <CompleteOnName:ZZ>)";
- completionIdentifier = "ZZ";
- expectedReplacedSource = "ZZ";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " (titi & <CompleteOnName:ZZ>);\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=92451
- */
-public void test0151(){
- String str =
- "public class X {\n" +
- " public static void main(String[] args) {\n" +
- " java.util.List elements = null;\n" +
- " new Test(Test.toStrings((Test[])elements.toArray(new Test[0])));\n" +
- " //code assist fails on this line\n" +
- " }\n" +
- "}\n";
-
-
- String completeBehind = "";
- int cursorLocation = str.indexOf(" //code assis") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "";
- expectedReplacedSource = "";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " java.util.List elements;\n" +
- " <CompleteOnName:>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=98115
- */
-public void test0152(){
- String str =
- "public class X {\n" +
- " Object var = new Object() {\n" +
- " void bar() {\n" +
- " int i = 0;\n" +
- " }\n" +
- " void foo() {\n" +
- " zzz\n" +
- " }\n" +
- " };\n" +
- "}\n";
-
-
- String completeBehind = "zzz";
- int cursorLocation = str.indexOf("zzz") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<CompleteOnName:zzz>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "zzz";
- String expectedReplacedSource = "zzz";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " Object var = new Object() {\n" +
- " void bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:zzz>;\n" +
- " }\n" +
- " };\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072
- */
-public void test0153(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " label1 : for(;;) {\n" +
- " break lab\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
-
- String completeBehind = "lab";
- int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "break <CompleteOnLabel:lab>;";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "lab";
- expectedReplacedSource = "lab";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " break <CompleteOnLabel:lab>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072
- */
-public void test0154(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " label1 : for(;;) {\n" +
- " break lab\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
-
- String completeBehind = "lab";
- int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "break <CompleteOnLabel:lab>;";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "lab";
- expectedReplacedSource = "lab";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " break <CompleteOnLabel:lab>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072
- */
-public void test0155(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " label1 : for(;;) {\n" +
- " continue lab\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
-
- String completeBehind = "lab";
- int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "lab";
- expectedReplacedSource = "lab";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " continue <CompleteOnLabel:lab>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072
- */
-public void test0156(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " label1 : for(;;) {\n" +
- " continue lab\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
-
- String completeBehind = "lab";
- int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "lab";
- expectedReplacedSource = "lab";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " continue <CompleteOnLabel:lab>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072
- */
-public void test0157(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " label1 : for(;;) {\n" +
- " class X {\n" +
- " void foo() {\n" +
- " label2 : for(;;) foo();\n" +
- " }\n" +
- " }\n" +
- " continue lab\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
-
- String completeBehind = "lab";
- int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "lab";
- expectedReplacedSource = "lab";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " class X {\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " continue <CompleteOnLabel:lab>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=22072
- */
-public void test0158(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " label1 : for(;;) {\n" +
- " class X {\n" +
- " void foo() {\n" +
- " label2 : for(;;) {\n" +
- " continue lab\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
-
- String completeBehind = "lab";
- int cursorLocation = str.lastIndexOf("lab") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "continue <CompleteOnLabel:lab>;";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "lab";
- expectedReplacedSource = "lab";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " class X {\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " continue <CompleteOnLabel:lab>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-public void test0159() {
-
- String str =
- "public class X {\n" +
- " String s = \"ZZZZZ\";\n" +
- "}\n";
-
- String completeBehind = "ZZZ";
- String expectedCompletionNodeToString = "<CompletionOnString:\"ZZZ\">";
- String completionIdentifier = "ZZZ";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " String s = <CompletionOnString:\"ZZZ\">;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "\"ZZZZZ\"";
- String testName = "<complete inside a string literal>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void test0160() {
-
- String str =
- "public class X {\n" +
- " String s = \\u0022ZZ\\u005AZZ\\u0022;\n" +
- "}\n";
-
- String completeBehind = "ZZ\\u005A";
- String expectedCompletionNodeToString = "<CompletionOnString:\"ZZZ\">";
- String completionIdentifier = "ZZZ";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " String s = <CompletionOnString:\"ZZZ\">;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "\\u0022ZZ\\u005AZZ\\u0022";
- String testName = "<complete inside a string literal>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void test0161() {
-
- String str =
- "public class X {\n" +
- " String s = \"AAAAA\" + \"ZZZZZ\";\n" +
- "}\n";
-
- String completeBehind = "ZZZ";
- String expectedCompletionNodeToString = "<CompletionOnString:\"ZZZ\">";
- String completionIdentifier = "ZZZ";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " String s = (\"AAAAA\" + <CompletionOnString:\"ZZZ\">);\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "\"ZZZZZ\"";
- String testName = "<complete inside a string literal>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void test0162() {
-
- String str =
- "public class X {\n" +
- " String s = \"ZZZZZ\n" +
- "}\n";
-
- String completeBehind = "ZZZ";
- String expectedCompletionNodeToString = "<CompletionOnString:\"ZZZ\">";
- String completionIdentifier = "ZZZ";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " String s = <CompletionOnString:\"ZZZ\">;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "\"ZZZZZ";
- String testName = "<complete inside a string literal>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void test0163() {
-
- String str =
- "public class X {\n" +
- " String s = \"ZZZZZ";
-
- String completeBehind = "ZZZ";
- String expectedCompletionNodeToString = "<CompletionOnString:\"ZZZ\">";
- String completionIdentifier = "ZZZ";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " String s = <CompletionOnString:\"ZZZ\">;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "\"ZZZZZ";
- String testName = "<complete inside a string literal>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void test0164() {
-
- String str =
- "public class X {\n" +
- " String s = \"\\u005AZZZZ\\u000D\\u0022" +
- "}\n";
-
- String completeBehind = "\\u005AZZ";
- String expectedCompletionNodeToString = "<CompletionOnString:\"ZZZ\">";
- String completionIdentifier = "ZZZ";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " String s = <CompletionOnString:\"ZZZ\">;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "\"\\u005AZZZZ";
- String testName = "<complete inside a string literal>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=122755
-public void test0165() {
-
- String str =
- "public class X {\n" +
- " void foo() {" +
- " /**" +
- " *" +
- " */." +
- " }" +
- "}\n";
-
- String completeBehind = "/.";
- int cursorLocation = str.lastIndexOf("/.") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "";
- expectedReplacedSource = "";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=137623
-public void test0166() {
-
- String str =
- "public class X {\n" +
- " public boolean foo() {\n" +
- " if(this.equals(null))\n" +
- " {\n" +
- " (zzz==int.\n" +
- " }\n" +
- " }" +
- "}\n";
-
- String completeBehind = "int.";
- int cursorLocation = str.lastIndexOf("int.") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public boolean foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnClassLiteralAccess:int.>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "";
- expectedReplacedSource = "int.";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public boolean foo() {\n" +
- " <CompleteOnClassLiteralAccess:int.>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584
-public void test0167() {
-
- String str =
- "public class X {\n" +
- " public boolean foo() {\n" +
- " try {\n" +
- " throwing();\n" +
- " }\n" +
- " catch (IllegalAccessException e) {\n" +
- " bar();\n" +
- " }\n" +
- " catch (IZZ) {\n" +
- " }\n" +
- " }" +
- "}\n";
-
- String completeBehind = "IZZ";
- int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public boolean foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnException:IZZ>";
- expectedParentNodeToString =
- "try \n" +
- " {\n" +
- " throwing();\n" +
- " }\n" +
- "catch (IllegalAccessException e) {\n" +
- " }\n" +
- "catch (<CompleteOnException:IZZ> ) {\n" +
- " }";
- completionIdentifier = "IZZ";
- expectedReplacedSource = "IZZ";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public boolean foo() {\n" +
- " try \n" +
- " {\n" +
- " throwing();\n" +
- " }\n" +
- " catch (IllegalAccessException e) {\n" +
- " }\n" +
- " catch (<CompleteOnException:IZZ> ) {\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584
-public void test0168() {
-
- String str =
- "public class X {\n" +
- " public boolean foo() {\n" +
- " try {\n" +
- " throwing();\n" +
- " }\n" +
- " catch (IllegalAccessException e) {\n" +
- " bar();\n" +
- " }\n" +
- " catch (IZZ\n" +
- " }" +
- "}\n";
-
- String completeBehind = "IZZ";
- int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public boolean foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnException:IZZ>";
- expectedParentNodeToString =
- "try \n" +
- " {\n" +
- " throwing();\n" +
- " }\n" +
- "catch (IllegalAccessException e) {\n" +
- " }\n" +
- "catch (<CompleteOnException:IZZ> ) {\n" +
- " }";
- completionIdentifier = "IZZ";
- expectedReplacedSource = "IZZ";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public boolean foo() {\n" +
- " try \n" +
- " {\n" +
- " throwing();\n" +
- " }\n" +
- " catch (IllegalAccessException e) {\n" +
- " }\n" +
- " catch (<CompleteOnException:IZZ> ) {\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584
-public void test0169() {
-
- String str =
- "public class X {\n" +
- " public boolean foo() {\n" +
- " try {\n" +
- " throwing();\n" +
- " }\n" +
- " catch (IllegalAccessException e) {\n" +
- " bar()\n" +
- " }\n" +
- " catch (IZZ) {\n" +
- " }\n" +
- " }" +
- "}\n";
-
- String completeBehind = "IZZ";
- int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public boolean foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnException:IZZ>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "IZZ";
- expectedReplacedSource = "IZZ";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public boolean foo() {\n" +
- " <CompleteOnException:IZZ>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584
-public void test0170() {
-
- String str =
- "public class X {\n" +
- " public boolean foo() {\n" +
- " #\n" +
- " try {\n" +
- " throwing();\n" +
- " }\n" +
- " catch (IllegalAccessException e) {\n" +
- " bar();\n" +
- " }\n" +
- " catch (IZZ) {\n" +
- " }\n" +
- " }" +
- "}\n";
-
- String completeBehind = "IZZ";
- int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public boolean foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnException:IZZ>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "IZZ";
- expectedReplacedSource = "IZZ";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public boolean foo() {\n" +
- " <CompleteOnException:IZZ>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=157584
-public void test0171() {
-
- String str =
- "public class X {\n" +
- " public boolean foo() {\n" +
- " try {\n" +
- " throwing();\n" +
- " }\n" +
- " catch (IZZ) {\n" +
- " }\n" +
- " }" +
- "}\n";
-
- String completeBehind = "IZZ";
- int cursorLocation = str.lastIndexOf("IZZ") + completeBehind.length() - 1;
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public boolean foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnException:IZZ>";
- expectedParentNodeToString =
- "try \n" +
- " {\n" +
- " throwing();\n" +
- " }\n" +
- "catch (<CompleteOnException:IZZ> ) {\n" +
- " }"
-;
- completionIdentifier = "IZZ";
- expectedReplacedSource = "IZZ";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public boolean foo() {\n" +
- " try \n" +
- " {\n" +
- " throwing();\n" +
- " }\n" +
- " catch (<CompleteOnException:IZZ> ) {\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionParserTestKeyword.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionParserTestKeyword.java
deleted file mode 100644
index 5a4cc80..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionParserTestKeyword.java
+++ /dev/null
@@ -1,15538 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-public class CompletionParserTestKeyword extends AbstractCompletionTest {
-public CompletionParserTestKeyword(String testName) {
- super(testName);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(CompletionParserTestKeyword.class);
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0001(){
- String str =
- "abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0002(){
- String str =
- "abst zzz";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0003(){
- String str =
- "package p;\n" +
- "abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0004(){
- String str =
- "package p;\n" +
- "abst zzz";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0005(){
- String str =
- "package p;\n" +
- "import yyy;\n" +
- "abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0006(){
- String str =
- "package p;\n" +
- "import yyy;\n" +
- "abst zzz";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0007(){
- String str =
- "package p;\n" +
- "import yyy;\n" +
- "public abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0008(){
- String str =
- "package p;\n" +
- "import yyy;\n" +
- "public abst zzz";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0009(){
- String str =
- "package p;\n" +
- "import yyy;\n" +
- "abstract abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0010(){
- String str =
- "package p;\n" +
- "import yyy;\n" +
- "abstract abst zzz";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0011(){
- String str =
- "package p;\n" +
- "import \n" +
- "abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnImport:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import <CompleteOnImport:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0012(){
- String str =
- "package p;\n" +
- "import yyy;\n" +
- "public class X {}\n" +
- "abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0013(){
- String str =
- "package p;\n" +
- "import yyy;\n" +
- "public class X {}\n" +
- "abst zzz";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0014(){
- String str =
- "package p;\n" +
- "import yyy;\n" +
- "final abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0015(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " abst\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " <CompleteOnType:abst>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0016(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " abst zzz\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:abst>;";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " <CompleteOnType:abst>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0017(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " public abst zzz\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:abst>;";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " <CompleteOnType:abst>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0018(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " final abst\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " <CompleteOnType:abst>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0019(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " abstract abst\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " <CompleteOnType:abst>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0020(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " static abst\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " <CompleteOnType:abst>;\n" +
- " public X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0021(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " abst\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:abst>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "abst";
- expectedReplacedSource = "abst";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:abst>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0022(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " abst zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:abst>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "abst";
- expectedReplacedSource = "abst";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:abst>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'break' keyword.
- */
-public void test0023(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " bre\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "bre";
- int cursorLocation = str.lastIndexOf("bre") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:bre>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "bre";
- expectedReplacedSource = "bre";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:bre>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'break' keyword.
- */
-public void test0024(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " for(int i; i < 10; i++) {\n" +
- " bre\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "bre";
- int cursorLocation = str.lastIndexOf("bre") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:bre>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "bre";
- expectedReplacedSource = "bre";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " {\n" +
- " <CompleteOnName:bre>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'case' keyword.
- */
-public void test0025(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " cas\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "cas";
- int cursorLocation = str.lastIndexOf("cas") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:cas>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cas";
- expectedReplacedSource = "cas";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:cas>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'case' keyword.
- */
-public void test0026(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " switch(0) {\n" +
- " cas\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "cas";
- int cursorLocation = str.lastIndexOf("cas") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnKeyword:cas>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cas";
- expectedReplacedSource = "cas";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnKeyword:cas>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'catch' keyword.
- */
-public void test0027(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " cat\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "cat";
- int cursorLocation = str.lastIndexOf("cat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:cat>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cat";
- expectedReplacedSource = "cat";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:cat>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'catch' keyword.
- */
-public void test0028(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " try {\n" +
- " } cat\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "cat";
- int cursorLocation = str.lastIndexOf("cat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnKeyword:cat>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cat";
- expectedReplacedSource = "cat";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnKeyword:cat>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0029(){
- String str =
- "cla";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:cla>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:cla>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0030(){
- String str =
- "public cla";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:cla>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:cla>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0031(){
- String str =
- "public final cla";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:cla>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:cla>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0032(){
- String str =
- "public final cla X";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:cla>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:cla>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0033(){
- String str =
- "public class X {\n" +
- " cla\n" +
- "}";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:cla>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:cla>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0034(){
- String str =
- "public class X {\n" +
- " public cla\n" +
- "}";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:cla>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:cla>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0035(){
- String str =
- "public class X {\n" +
- " public final cla\n" +
- "}";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:cla>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:cla>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0036(){
- String str =
- "public class X {\n" +
- " public final cla Y\n" +
- "}";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:cla>;";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:cla>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0037(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " cla\n" +
- " }\n" +
- "}";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:cla>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cla";
- expectedReplacedSource = "cla";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:cla>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0038(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " final cla\n" +
- " }\n" +
- "}";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:cla>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cla";
- expectedReplacedSource = "cla";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:cla>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0039(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " final cla Y\n" +
- " }\n" +
- "}";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:cla>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cla";
- expectedReplacedSource = "cla";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:cla>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'continue' keyword.
- */
-public void test0040(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " con\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "con";
- int cursorLocation = str.lastIndexOf("con") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:con>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "con";
- expectedReplacedSource = "con";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:con>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'continue' keyword.
- */
-public void test0041(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " for(int i; i < 5; i++) {\n" +
- " con\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "con";
- int cursorLocation = str.lastIndexOf("con") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:con>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "con";
- expectedReplacedSource = "con";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " {\n" +
- " <CompleteOnName:con>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'default' keyword.
- */
-public void test0042(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " def\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "def";
- int cursorLocation = str.lastIndexOf("def") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:def>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "def";
- expectedReplacedSource = "def";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:def>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'default' keyword.
- */
-public void test0043(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " switch(0) {\n" +
- " case 1 : break;\n" +
- " def\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "def";
- int cursorLocation = str.lastIndexOf("def") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:def>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "def";
- expectedReplacedSource = "def";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " <CompleteOnName:def>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'do' keyword.
- */
-public void test0044(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " do\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "do";
- int cursorLocation = str.lastIndexOf("do") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:do>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "do";
- expectedReplacedSource = "do";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:do>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'else' keyword.
- */
-public void test0045(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " els\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "els";
- int cursorLocation = str.lastIndexOf("els") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:els>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "els";
- expectedReplacedSource = "els";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:els>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'else' keyword.
- */
-public void test0046(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " if(true) {\n" +
- " } els\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "els";
- int cursorLocation = str.lastIndexOf("els") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:els>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "els";
- expectedReplacedSource = "els";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:els>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0047(){
- String str =
- "ext";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:ext>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:ext>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0048(){
- String str =
- "X ext";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0049(){
- String str =
- "ext Y";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:ext>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:ext>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0050(){
- String str =
- "class X ext";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:ext>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:ext> {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0051(){
- String str =
- "class X ext Y";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:ext>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:ext> {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0052(){
- String str =
- "class X ext Y {";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:ext>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:ext> {\n" +
- " {\n" +
- " }\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0053(){
- String str =
- "class X extends Y ext";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:ext>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:ext> {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0054(){
- String str =
- "class X implements Y ext";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "class X implements Y {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'finally' keyword.
- */
-public void test0055(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " fin" +
- " }\n" +
- "}\n";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:fin>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "fin";
- expectedReplacedSource = "fin";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:fin>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'finally' keyword.
- */
-public void test0056(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " try {" +
- " } fin" +
- " }\n" +
- "}\n";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnKeyword:fin>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "fin";
- expectedReplacedSource = "fin";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnKeyword:fin>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'for' keyword.
- */
-public void test0057(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " for" +
- " }\n" +
- "}\n";
-
- String completeBehind = "for";
- int cursorLocation = str.lastIndexOf("for") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:for>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "for";
- expectedReplacedSource = "for";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:for>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'if' keyword.
- */
-public void test0058(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " if" +
- " }\n" +
- "}\n";
-
- String completeBehind = "if";
- int cursorLocation = str.lastIndexOf("if") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:if>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "if";
- expectedReplacedSource = "if";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:if>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'switch' keyword.
- */
-public void test0059(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " swi" +
- " }\n" +
- "}\n";
-
- String completeBehind = "swi";
- int cursorLocation = str.lastIndexOf("swi") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:swi>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "swi";
- expectedReplacedSource = "swi";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:swi>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0060(){
- String str =
- "impl";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impl>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:impl>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0061(){
- String str =
- "X impl";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0062(){
- String str =
- "impl Y";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impl>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:impl>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0063(){
- String str =
- "class X impl";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impl>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:impl> {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0064(){
- String str =
- "class X impl Y";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impl>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:impl> {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0065(){
- String str =
- "class X impl Y {";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impl>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:impl> {\n" +
- " {\n" +
- " }\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0066(){
- String str =
- "class X extends Y impl";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impl>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:impl> {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0067(){
- String str =
- "class X implements Y impl";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "class X implements Y {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'import' keyword.
- */
-public void test0068(){
- String str =
- "impo";
-
- String completeBehind = "impo";
- int cursorLocation = str.lastIndexOf("impo") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impo>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impo";
- String expectedReplacedSource = "impo";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:impo>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'import' keyword.
- */
-public void test0069(){
- String str =
- "package p;\n" +
- "impo";
-
- String completeBehind = "impo";
- int cursorLocation = str.lastIndexOf("impo") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impo>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impo";
- String expectedReplacedSource = "impo";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import <CompleteOnKeyword:impo>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'import' keyword.
- */
-public void test0070(){
- String str =
- "package p;\n" +
- "import p2.Y;\n" +
- "impo";
-
- String completeBehind = "impo";
- int cursorLocation = str.lastIndexOf("impo") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impo>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impo";
- String expectedReplacedSource = "impo";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import p2.Y;\n" +
- "import <CompleteOnKeyword:impo>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'import' keyword.
- */
-public void test0071(){
- String str =
- "impo p2.Y";
-
- String completeBehind = "impo";
- int cursorLocation = str.lastIndexOf("impo") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impo>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impo";
- String expectedReplacedSource = "impo";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:impo>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0072(){
- String str =
- "int";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:int>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0073(){
- String str =
- "public int";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:int>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0074(){
- String str =
- "public abstract int";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:int>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0075(){
- String str =
- "public abstract int X";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:int>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0076(){
- String str =
- "public class X {\n" +
- " int\n" +
- "}";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:int>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0077(){
- String str =
- "public class X {\n" +
- " public int\n" +
- "}";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:int>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0078(){
- String str =
- "public class X {\n" +
- " public abstract int\n" +
- "}";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:int>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0079(){
- String str =
- "public class X {\n" +
- " public abstract int Y\n" +
- "}";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:int>;";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:int>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0080(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " int\n" +
- " }\n" +
- "}";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:int>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "int";
- expectedReplacedSource = "int";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:int>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0081(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " abstract int\n" +
- " }\n" +
- "}";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:int>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "int";
- expectedReplacedSource = "int";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:int>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0082(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " abstract int Y\n" +
- " }\n" +
- "}";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:int>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "int";
- expectedReplacedSource = "int";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:int>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0083(){
- String str =
- "public final int";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:int>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0084(){
- String str =
- "public final int X";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:int>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'package' keyword.
- */
-public void test0085(){
- String str =
- "pac";
-
- String completeBehind = "pac";
- int cursorLocation = str.lastIndexOf("pac") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pac>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pac";
- String expectedReplacedSource = "pac";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pac>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'package' keyword.
- */
-public void test0086(){
- String str =
- "pac p";
-
- String completeBehind = "pac";
- int cursorLocation = str.lastIndexOf("pac") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pac>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pac";
- String expectedReplacedSource = "pac";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pac>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'package' keyword.
- */
-public void test0087(){
- String str =
- "package p;" +
- "pac";
-
- String completeBehind = "pac";
- int cursorLocation = str.lastIndexOf("pac") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pac>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pac";
- String expectedReplacedSource = "pac";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import <CompleteOnKeyword:pac>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'package' keyword.
- */
-public void test0088(){
- String str =
- "import p;" +
- "pac";
-
- String completeBehind = "pac";
- int cursorLocation = str.lastIndexOf("pac") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pac>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pac";
- String expectedReplacedSource = "pac";
- String expectedUnitDisplayString =
- "import p;\n" +
- "import <CompleteOnKeyword:pac>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'package' keyword.
- */
-public void test0089(){
- String str =
- "class X {}" +
- "pac";
-
- String completeBehind = "pac";
- int cursorLocation = str.lastIndexOf("pac") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pac>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pac";
- String expectedReplacedSource = "pac";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pac>;\n" +
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'return' keyword.
- */
-public void test0090(){
- String str =
- "public class X {\n" +
- " int foo() {\n" +
- " ret\n" +
- " }\n" +
- "}";
-
- String completeBehind = "ret";
- int cursorLocation = str.lastIndexOf("ret") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:ret>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "ret";
- expectedReplacedSource = "ret";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " <CompleteOnName:ret>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'throw' keyword.
- */
-public void test0091(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " thr\n" +
- " }\n" +
- "}";
-
- String completeBehind = "thr";
- int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:thr>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "thr";
- expectedReplacedSource = "thr";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:thr>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'try' keyword.
- */
-public void test0092(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " try\n" +
- " }\n" +
- "}";
-
- String completeBehind = "try";
- int cursorLocation = str.lastIndexOf("try") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:try>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "try";
- expectedReplacedSource = "try";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:try>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'try' keyword.
- */
-public void test0093(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " if(try\n" +
- " }\n" +
- "}";
-
- String completeBehind = "try";
- int cursorLocation = str.lastIndexOf("try") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:try>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "try";
- expectedReplacedSource = "try";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:try>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'do' keyword.
- */
-public void test0094(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " if(do\n" +
- " }\n" +
- "}";
-
- String completeBehind = "do";
- int cursorLocation = str.lastIndexOf("do") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:do>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "do";
- expectedReplacedSource = "do";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:do>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'for' keyword.
- */
-public void test0095(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " if(for\n" +
- " }\n" +
- "}";
-
- String completeBehind = "for";
- int cursorLocation = str.lastIndexOf("for") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:for>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "for";
- expectedReplacedSource = "for";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:for>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'if' keyword.
- */
-public void test0096(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " if(if\n" +
- " }\n" +
- "}";
-
- String completeBehind = "if";
- int cursorLocation = str.lastIndexOf("if") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:if>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "if";
- expectedReplacedSource = "if";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:if>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'switch' keyword.
- */
-public void test0097(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " if(swi\n" +
- " }\n" +
- "}";
-
- String completeBehind = "swi";
- int cursorLocation = str.lastIndexOf("swi") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:swi>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "swi";
- expectedReplacedSource = "swi";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:swi>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'new' keyword.
- */
-public void test0098(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " new\n" +
- " }\n" +
- "}";
-
- String completeBehind = "new";
- int cursorLocation = str.lastIndexOf("new") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:new>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "new";
- expectedReplacedSource = "new";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:new>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'new' keyword.
- */
-public void test0099(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " new X\n" +
- " }\n" +
- "}";
-
- String completeBehind = "new";
- int cursorLocation = str.lastIndexOf("new") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:new>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "new";
- expectedReplacedSource = "new";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:new>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'new' keyword.
- */
-public void test0100(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " new X()\n" +
- " }\n" +
- "}";
-
- String completeBehind = "new";
- int cursorLocation = str.lastIndexOf("new") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:new>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "new";
- expectedReplacedSource = "new";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:new>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'throws' keyword.
- */
-public void test0101(){
- String str =
- "public class X {\n" +
- " void foo() thr\n" +
- " }\n" +
- "}";
-
- String completeBehind = "thr";
- int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:thr>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "thr";
- String expectedReplacedSource = "thr";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() throws <CompleteOnKeyword:thr> {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'throws' keyword.
- */
-public void test0102(){
- String str =
- "public class X {\n" +
- " void foo() thr {\n" +
- " }\n" +
- "}";
-
- String completeBehind = "thr";
- int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:thr>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "thr";
- String expectedReplacedSource = "thr";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() throws <CompleteOnKeyword:thr> {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'throws' keyword.
- */
-public void test0103(){
- String str =
- "public class X {\n" +
- " void foo() thr E {\n" +
- " }\n" +
- "}";
-
- String completeBehind = "thr";
- int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:thr>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "thr";
- String expectedReplacedSource = "thr";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() throws <CompleteOnKeyword:thr> {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'throws' keyword.
- */
-public void test0104(){
- String str =
- "public class X {\n" +
- " void foo() throws E thr\n" +
- " }\n" +
- "}";
-
- String completeBehind = "thr";
- int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "thr";
- String expectedReplacedSource = "thr";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() throws E {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'throws' keyword.
- */
-public void test0105(){
- String str =
- "public class X {\n" +
- " X() thr\n" +
- " }\n" +
- "}";
-
- String completeBehind = "thr";
- int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:thr>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "thr";
- String expectedReplacedSource = "thr";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " X() throws <CompleteOnKeyword:thr> {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'throws' keyword.
- */
-public void test0106(){
- String str =
- "public class X {\n" +
- " int foo()[] thr\n" +
- " }\n" +
- "}";
-
- String completeBehind = "thr";
- int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:thr>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "thr";
- String expectedReplacedSource = "thr";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " int[] foo() throws <CompleteOnKeyword:thr> {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'while' keyword.
- */
-public void test0107(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " whi\n" +
- " }\n" +
- "}";
-
- String completeBehind = "whi";
- int cursorLocation = str.lastIndexOf("whi") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:whi>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "whi";
- expectedReplacedSource = "whi";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:whi>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'while' keyword.
- */
-public void test0108(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " if(whi\n" +
- " }\n" +
- "}";
-
- String completeBehind = "whi";
- int cursorLocation = str.lastIndexOf("whi") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:whi>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "whi";
- expectedReplacedSource = "whi";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:whi>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'assert' keyword.
- */
-public void test0109(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " ass\n" +
- " }\n" +
- "}";
-
- String completeBehind = "ass";
- int cursorLocation = str.lastIndexOf("ass") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:ass>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "ass";
- expectedReplacedSource = "ass";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:ass>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'assert' keyword.
- */
-public void test0110(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " if(ass\n" +
- " }\n" +
- "}";
-
- String completeBehind = "ass";
- int cursorLocation = str.lastIndexOf("ass") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:ass>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "ass";
- expectedReplacedSource = "ass";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:ass>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0111(){
- String str =
- "fin";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:fin>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0112(){
- String str =
- "public fin";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:fin>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0113(){
- String str =
- "fin zzz";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:fin>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0114(){
- String str =
- "final fin";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:fin>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0115(){
- String str =
- "abstract fin";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:fin>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0116(){
- String str =
- "public fin class X {}";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:fin>;\n" +
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0117(){
- String str =
- "public class X {\n" +
- " fin\n" +
- "}";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:fin>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0118(){
- String str =
- "public class X {\n" +
- " public fin\n" +
- "}";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:fin>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0119(){
- String str =
- "public class X {\n" +
- " fin zzz\n" +
- "}";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:fin>;";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:fin>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0120(){
- String str =
- "public class X {\n" +
- " final fin\n" +
- "}";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:fin>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0121(){
- String str =
- "public class X {\n" +
- " abstract fin\n" +
- "}";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:fin>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'native' keyword.
- */
-public void test0122(){
- String str =
- "public class X {\n" +
- " nat\n" +
- "}";
-
- String completeBehind = "nat";
- int cursorLocation = str.lastIndexOf("nat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:nat>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "nat";
- String expectedReplacedSource = "nat";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:nat>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'native' keyword.
- */
-public void test0123(){
- String str =
- "public class X {\n" +
- " public nat\n" +
- "}";
-
- String completeBehind = "nat";
- int cursorLocation = str.lastIndexOf("nat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:nat>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "nat";
- String expectedReplacedSource = "nat";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:nat>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'native' keyword.
- */
-public void test0124(){
- String str =
- "public class X {\n" +
- " transient nat\n" +
- "}";
-
- String completeBehind = "nat";
- int cursorLocation = str.lastIndexOf("nat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:nat>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "nat";
- String expectedReplacedSource = "nat";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:nat>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'native' keyword.
- */
-public void test0125(){
- String str =
- "public class X {\n" +
- " transient nat\n" +
- "}";
-
- String completeBehind = "nat";
- int cursorLocation = str.lastIndexOf("nat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:nat>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "nat";
- String expectedReplacedSource = "nat";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:nat>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'native' keyword.
- */
-public void test0126(){
- String str =
- "public class X {\n" +
- " volatile nat\n" +
- "}";
-
- String completeBehind = "nat";
- int cursorLocation = str.lastIndexOf("nat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:nat>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "nat";
- String expectedReplacedSource = "nat";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:nat>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'strictfp' keyword.
- */
-public void test0127(){
- String str =
- "public class X {\n" +
- " str\n" +
- "}";
-
- String completeBehind = "str";
- int cursorLocation = str.lastIndexOf("str") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:str>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "str";
- String expectedReplacedSource = "str";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:str>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'strictfp' keyword.
- */
-public void test0128(){
- String str =
- "public class X {\n" +
- " public str\n" +
- "}";
-
- String completeBehind = "str";
- int cursorLocation = str.lastIndexOf("str") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:str>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "str";
- String expectedReplacedSource = "str";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:str>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'strictfp' keyword.
- */
-public void test0129(){
- String str =
- "public class X {\n" +
- " transient str\n" +
- "}";
-
- String completeBehind = "str";
- int cursorLocation = str.lastIndexOf("str") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:str>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "str";
- String expectedReplacedSource = "str";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:str>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'strictfp' keyword.
- */
-public void test0130(){
- String str =
- "public class X {\n" +
- " transient str\n" +
- "}";
-
- String completeBehind = "str";
- int cursorLocation = str.lastIndexOf("str") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:str>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "str";
- String expectedReplacedSource = "str";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:str>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'strictfp' keyword.
- */
-public void test0131(){
- String str =
- "public class X {\n" +
- " volatile str\n" +
- "}";
-
- String completeBehind = "str";
- int cursorLocation = str.lastIndexOf("str") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:str>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "str";
- String expectedReplacedSource = "str";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:str>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'volatile' keyword.
- */
-public void test0132(){
- String str =
- "public class X {\n" +
- " vol\n" +
- "}";
-
- String completeBehind = "vol";
- int cursorLocation = str.lastIndexOf("vol") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:vol>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "vol";
- String expectedReplacedSource = "vol";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:vol>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'volatile' keyword.
- */
-public void test0133(){
- String str =
- "public class X {\n" +
- " public vol\n" +
- "}";
-
- String completeBehind = "vol";
- int cursorLocation = str.lastIndexOf("vol") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:vol>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "vol";
- String expectedReplacedSource = "vol";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:vol>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'volatile' keyword.
- */
-public void test0134(){
- String str =
- "public class X {\n" +
- " transient vol\n" +
- "}";
-
- String completeBehind = "vol";
- int cursorLocation = str.lastIndexOf("vol") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:vol>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "vol";
- String expectedReplacedSource = "vol";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:vol>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'volatile' keyword.
- */
-public void test0135(){
- String str =
- "public class X {\n" +
- " volatile vol\n" +
- "}";
-
- String completeBehind = "vol";
- int cursorLocation = str.lastIndexOf("vol") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:vol>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "vol";
- String expectedReplacedSource = "vol";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:vol>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'volatile' keyword.
- */
-public void test0136(){
- String str =
- "public class X {\n" +
- " native vol\n" +
- "}";
-
- String completeBehind = "vol";
- int cursorLocation = str.lastIndexOf("vol") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:vol>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "vol";
- String expectedReplacedSource = "vol";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:vol>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'transient' keyword.
- */
-public void test0137(){
- String str =
- "public class X {\n" +
- " tra\n" +
- "}";
-
- String completeBehind = "tra";
- int cursorLocation = str.lastIndexOf("tra") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:tra>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "tra";
- String expectedReplacedSource = "tra";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:tra>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'transient' keyword.
- */
-public void test0138(){
- String str =
- "public class X {\n" +
- " public tra\n" +
- "}";
-
- String completeBehind = "tra";
- int cursorLocation = str.lastIndexOf("tra") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:tra>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "tra";
- String expectedReplacedSource = "tra";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:tra>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'transient' keyword.
- */
-public void test0139(){
- String str =
- "public class X {\n" +
- " transient tra\n" +
- "}";
-
- String completeBehind = "tra";
- int cursorLocation = str.lastIndexOf("tra") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:tra>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "tra";
- String expectedReplacedSource = "tra";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:tra>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'transient' keyword.
- */
-public void test0140(){
- String str =
- "public class X {\n" +
- " volatile tra\n" +
- "}";
-
- String completeBehind = "tra";
- int cursorLocation = str.lastIndexOf("tra") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:tra>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "tra";
- String expectedReplacedSource = "tra";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:tra>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'transient' keyword.
- */
-public void test0141(){
- String str =
- "public class X {\n" +
- " native tra\n" +
- "}";
-
- String completeBehind = "tra";
- int cursorLocation = str.lastIndexOf("tra") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:tra>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "tra";
- String expectedReplacedSource = "tra";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:tra>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'synchronized' keyword.
- */
-public void test0142(){
- String str =
- "public class X {\n" +
- " syn\n" +
- "}";
-
- String completeBehind = "syn";
- int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:syn>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "syn";
- String expectedReplacedSource = "syn";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:syn>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'synchronized' keyword.
- */
-public void test0143(){
- String str =
- "public class X {\n" +
- " public syn\n" +
- "}";
-
- String completeBehind = "syn";
- int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:syn>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "syn";
- String expectedReplacedSource = "syn";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:syn>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'synchronized' keyword.
- */
-public void test0144(){
- String str =
- "public class X {\n" +
- " transient syn\n" +
- "}";
-
- String completeBehind = "syn";
- int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:syn>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "syn";
- String expectedReplacedSource = "syn";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:syn>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'synchronized' keyword.
- */
-public void test0145(){
- String str =
- "public class X {\n" +
- " transient syn\n" +
- "}";
-
- String completeBehind = "syn";
- int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:syn>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "syn";
- String expectedReplacedSource = "syn";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:syn>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'synchronized' keyword.
- */
-public void test0146(){
- String str =
- "public class X {\n" +
- " volatile syn\n" +
- "}";
-
- String completeBehind = "syn";
- int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:syn>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "syn";
- String expectedReplacedSource = "syn";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:syn>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'synchronized' keyword.
- */
-public void test0147(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " syn\n" +
- " }\n" +
- "}";
-
- String completeBehind = "syn";
- int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:syn>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "syn";
- expectedReplacedSource = "syn";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:syn>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'synchronized' keyword.
- */
-public void test0148(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " if(syn\n" +
- " }\n" +
- "}";
-
- String completeBehind = "syn";
- int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:syn>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "syn";
- expectedReplacedSource = "syn";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:syn>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'static' keyword.
- */
-public void test0149(){
- String str =
- "public class X {\n" +
- " sta\n" +
- "}";
-
- String completeBehind = "sta";
- int cursorLocation = str.lastIndexOf("sta") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:sta>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "sta";
- String expectedReplacedSource = "sta";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:sta>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'static' keyword.
- */
-public void test0150(){
- String str =
- "public class X {\n" +
- " public sta\n" +
- "}";
-
- String completeBehind = "sta";
- int cursorLocation = str.lastIndexOf("sta") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:sta>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "sta";
- String expectedReplacedSource = "sta";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:sta>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0151(){
- String str =
- "pub";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pub>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0152(){
- String str =
- "final pub";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pub>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0153(){
- String str =
- "public pub";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pub>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0154(){
- String str =
- "private pub";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pub>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0155(){
- String str =
- "public class X{}\n" +
- "pub";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pub>;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0156(){
- String str =
- "public class X{\n" +
- " pub\n" +
- "}";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pub>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0157(){
- String str =
- "public class X{\n" +
- " public pub\n" +
- "}";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pub>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0158(){
- String str =
- "public class X{\n" +
- " private pub\n" +
- "}";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pub>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0159(){
- String str =
- "public class X{\n" +
- " protected pub\n" +
- "}";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pub>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0160(){
- String str =
- "public class X{\n" +
- " abstract pub\n" +
- "}";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pub>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0161(){
- String str =
- "pro";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0162(){
- String str =
- "final pro";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pro>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0163(){
- String str =
- "public pro";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pro>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0164(){
- String str =
- "private pro";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pro>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0165(){
- String str =
- "public class X{}\n" +
- "pro";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pro>;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0166(){
- String str =
- "public class X{\n" +
- " pro\n" +
- "}";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pro>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0167(){
- String str =
- "public class X{\n" +
- " public pro\n" +
- "}";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pro>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0168(){
- String str =
- "public class X{\n" +
- " private pro\n" +
- "}";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pro>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0169(){
- String str =
- "public class X{\n" +
- " protected pro\n" +
- "}";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pro>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0170(){
- String str =
- "public class X{\n" +
- " abstract pro\n" +
- "}";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pro>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0171(){
- String str =
- "pri";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0172(){
- String str =
- "final pri";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pri>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0173(){
- String str =
- "public pri";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pri>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0174(){
- String str =
- "private pri";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pri>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0175(){
- String str =
- "public class X{}\n" +
- "pri";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pri>;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0176(){
- String str =
- "public class X{\n" +
- " pri\n" +
- "}";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pri>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0177(){
- String str =
- "public class X{\n" +
- " public pri\n" +
- "}";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pri>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0178(){
- String str =
- "public class X{\n" +
- " private pri\n" +
- "}";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pri>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0179(){
- String str =
- "public class X{\n" +
- " protected pri\n" +
- "}";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pri>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0180(){
- String str =
- "public class X{\n" +
- " abstract pri\n" +
- "}";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pri>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'super' keyword.
- */
-public void test0181(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " sup\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "sup";
- int cursorLocation = str.lastIndexOf("sup") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:sup>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "sup";
- expectedReplacedSource = "sup";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:sup>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'this' keyword.
- */
-public void test0182(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " thi\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "thi";
- int cursorLocation = str.lastIndexOf("thi") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:thi>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "thi";
- expectedReplacedSource = "thi";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:thi>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'true' keyword.
- */
-public void test0183(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " tru\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "tru";
- int cursorLocation = str.lastIndexOf("tru") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:tru>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "tru";
- expectedReplacedSource = "tru";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:tru>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'false' keyword.
- */
-public void test0184(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " fal\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "fal";
- int cursorLocation = str.lastIndexOf("fal") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:fal>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "fal";
- expectedReplacedSource = "fal";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:fal>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'null' keyword.
- */
-public void test0185(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " nul\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "nul";
- int cursorLocation = str.lastIndexOf("nul") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:nul>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "nul";
- expectedReplacedSource = "nul";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:nul>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'instanceof' keyword.
- */
-public void test0186(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " if(zzz ins\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "ins";
- int cursorLocation = str.lastIndexOf("ins") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnKeyword:ins>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "ins";
- expectedReplacedSource = "ins";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnKeyword:ins>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'instanceof' keyword.
- */
-public void test0187(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " ins\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "ins";
- int cursorLocation = str.lastIndexOf("ins") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:ins>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "ins";
- expectedReplacedSource = "ins";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:ins>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'instanceof' keyword.
- */
-public void test0188(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " if(zzz zzz ins\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "ins";
- int cursorLocation = str.lastIndexOf("ins") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:ins>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "ins";
- expectedReplacedSource = "ins";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " zzz zzz;\n" +
- " <CompleteOnName:ins>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'while' keyword.
- */
-public void test0189(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " do{\n" +
- " } whi\n" +
- " }\n" +
- "}";
-
- String completeBehind = "whi";
- int cursorLocation = str.lastIndexOf("whi") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnKeyword:whi>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "whi";
- expectedReplacedSource = "whi";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnKeyword:whi>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'catch' keyword.
- */
-public void test0190(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " try {\n" +
- " } catch(E e) {\n" +
- " } cat\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "cat";
- int cursorLocation = str.lastIndexOf("cat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:cat>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cat";
- expectedReplacedSource = "cat";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:cat>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'finally' keyword.
- */
-public void test0191(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " try {" +
- " } catch(E e) {" +
- " } fin" +
- " }\n" +
- "}\n";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:fin>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "fin";
- expectedReplacedSource = "fin";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:fin>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'finally' keyword.
- */
-public void test0192(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " try {" +
- " } finally {" +
- " } fin" +
- " }\n" +
- "}\n";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:fin>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "fin";
- expectedReplacedSource = "fin";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:fin>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'this' keyword.
- */
-public void test0193(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " X.thi\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "thi";
- int cursorLocation = str.lastIndexOf("thi") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:X.thi>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "thi";
- expectedReplacedSource = "X.thi";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:X.thi>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-/*
- * Test for 'abstract' keyword.
- */
-public void test0194(){
- String str =
- "#\n" +
- "abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0195(){
- String str =
- "#\n" +
- "abst zzz";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0196(){
- String str =
- "#\n" +
- "package p;\n" +
- "abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0197(){
- String str =
- "#\n" +
- "package p;\n" +
- "abst zzz";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0198(){
- String str =
- "#\n" +
- "package p;\n" +
- "import yyy;\n" +
- "abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0199(){
- String str =
- "#\n" +
- "package p;\n" +
- "import yyy;\n" +
- "abst zzz";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0200(){
- String str =
- "#\n" +
- "package p;\n" +
- "import yyy;\n" +
- "public abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0201(){
- String str =
- "#\n" +
- "package p;\n" +
- "import yyy;\n" +
- "public abst zzz";
-
- String completeBehind = "abst";
- int cursorLocation = str.indexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0202(){
- String str =
- "#\n" +
- "package p;\n" +
- "import yyy;\n" +
- "abstract abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0203(){
- String str =
- "#\n" +
- "package p;\n" +
- "import yyy;\n" +
- "abstract abst zzz";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0204(){
- String str =
- "#\n" +
- "package p;\n" +
- "import \n" +
- "abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnImport:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import <CompleteOnImport:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0205(){
- String str =
- "#\n" +
- "package p;\n" +
- "import yyy;\n" +
- "public class X {}\n" +
- "abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0206(){
- String str =
- "#\n" +
- "package p;\n" +
- "import yyy;\n" +
- "public class X {}\n" +
- "abst zzz";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0207(){
- String str =
- "#\n" +
- "package p;\n" +
- "import yyy;\n" +
- "final abst";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import yyy;\n" +
- "import <CompleteOnKeyword:abst>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0208(){
- String str =
- "#\n" +
- "package p;\n" +
- "public class X {\n" +
- " abst\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " <CompleteOnType:abst>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0209(){
- String str =
- "#\n" +
- "package p;\n" +
- "public class X {\n" +
- " abst zzz\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:abst>;";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " <CompleteOnType:abst>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0210(){
- String str =
- "#\n" +
- "package p;\n" +
- "public class X {\n" +
- " public abst zzz\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:abst>;";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " <CompleteOnType:abst>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0211(){
- String str =
- "#\n" +
- "package p;\n" +
- "public class X {\n" +
- " final abst\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " <CompleteOnType:abst>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0212(){
- String str =
- "#\n" +
- "package p;\n" +
- "public class X {\n" +
- " abstract abst\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " <CompleteOnType:abst>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0213(){
- String str =
- "#\n" +
- "package p;\n" +
- "public class X {\n" +
- " static abst\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:abst>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "abst";
- String expectedReplacedSource = "abst";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " <CompleteOnType:abst>;\n" +
- " public X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0214(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " abst\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:abst>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "abst";
- expectedReplacedSource = "abst";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:abst>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'abstract' keyword.
- */
-public void test0216(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " abst zzz\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "abst";
- int cursorLocation = str.lastIndexOf("abst") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:abst>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "abst";
- expectedReplacedSource = "abst";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:abst>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'break' keyword.
- */
-public void test0217(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " bre\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "bre";
- int cursorLocation = str.lastIndexOf("bre") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:bre>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "bre";
- expectedReplacedSource = "bre";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:bre>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'break' keyword.
- */
-public void test0218(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " for(int i; i < 10; i++) {\n" +
- " bre\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "bre";
- int cursorLocation = str.lastIndexOf("bre") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:bre>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "bre";
- expectedReplacedSource = "bre";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " {\n" +
- " <CompleteOnName:bre>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'case' keyword.
- */
-public void test0219(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " cas\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "cas";
- int cursorLocation = str.lastIndexOf("cas") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:cas>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cas";
- expectedReplacedSource = "cas";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:cas>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'case' keyword.
- */
-public void test0220(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " switch(0) {\n" +
- " cas\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "cas";
- int cursorLocation = str.lastIndexOf("cas") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnKeyword:cas>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cas";
- expectedReplacedSource = "cas";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " <CompleteOnKeyword:cas>;\n" +
- " }\n"+
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'catch' keyword.
- */
-public void test0221(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " cat\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "cat";
- int cursorLocation = str.lastIndexOf("cat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:cat>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cat";
- expectedReplacedSource = "cat";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:cat>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'catch' keyword.
- */
-public void test0222(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " try {\n" +
- " } cat\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "cat";
- int cursorLocation = str.lastIndexOf("cat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnKeyword:cat>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cat";
- expectedReplacedSource = "cat";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnKeyword:cat>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0223(){
- String str =
- "#\n" +
- "cla";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:cla>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:cla>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0224(){
- String str =
- "#\n" +
- "public cla";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:cla>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:cla>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0225(){
- String str =
- "#\n" +
- "public final cla";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:cla>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:cla>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0226(){
- String str =
- "#\n" +
- "public final cla X";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:cla>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:cla>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0227(){
- String str =
- "#\n" +
- "public class X {\n" +
- " cla\n" +
- "}";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:cla>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:cla>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0228(){
- String str =
- "#\n" +
- "public class X {\n" +
- " public cla\n" +
- "}";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:cla>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:cla>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0229(){
- String str =
- "#\n" +
- "public class X {\n" +
- " public final cla\n" +
- "}";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:cla>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:cla>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0230(){
- String str =
- "#\n" +
- "public class X {\n" +
- " public final cla Y\n" +
- "}";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:cla>;";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "cla";
- String expectedReplacedSource = "cla";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:cla>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0231(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " cla\n" +
- " }\n" +
- "}";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:cla>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cla";
- expectedReplacedSource = "cla";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:cla>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0232(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " final cla\n" +
- " }\n" +
- "}";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:cla>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cla";
- expectedReplacedSource = "cla";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:cla>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'class' keyword.
- */
-public void test0233(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " final cla Y\n" +
- " }\n" +
- "}";
-
- String completeBehind = "cla";
- int cursorLocation = str.lastIndexOf("cla") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:cla>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cla";
- expectedReplacedSource = "cla";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:cla>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'continue' keyword.
- */
-public void test0234(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " con\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "con";
- int cursorLocation = str.lastIndexOf("con") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:con>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "con";
- expectedReplacedSource = "con";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:con>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'continue' keyword.
- */
-public void test0235(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " for(int i; i < 5; i++) {\n" +
- " con\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "con";
- int cursorLocation = str.lastIndexOf("con") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:con>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "con";
- expectedReplacedSource = "con";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " {\n" +
- " <CompleteOnName:con>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'default' keyword.
- */
-public void test0236(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " def\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "def";
- int cursorLocation = str.lastIndexOf("def") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:def>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "def";
- expectedReplacedSource = "def";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:def>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'default' keyword.
- */
-public void test0237(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " switch(0) {\n" +
- " case 1 : break;\n" +
- " def\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "def";
- int cursorLocation = str.lastIndexOf("def") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:def>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "def";
- expectedReplacedSource = "def";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " <CompleteOnName:def>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'do' keyword.
- */
-public void test0238(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " do\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "do";
- int cursorLocation = str.lastIndexOf("do") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:do>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "do";
- expectedReplacedSource = "do";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:do>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'else' keyword.
- */
-public void test0239(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " els\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "els";
- int cursorLocation = str.lastIndexOf("els") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:els>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "els";
- expectedReplacedSource = "els";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:els>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'else' keyword.
- */
-public void test0240(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " if(true) {\n" +
- " } els\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "els";
- int cursorLocation = str.lastIndexOf("els") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:els>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "els";
- expectedReplacedSource = "els";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:els>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0241(){
- String str =
- "#\n" +
- "ext";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:ext>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:ext>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0242(){
- String str =
- "#\n" +
- "X ext";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0243(){
- String str =
- "#\n" +
- "ext Y";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:ext>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:ext>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0244(){
- String str =
- "#\n" +
- "class X ext";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:ext>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:ext> {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0245(){
- String str =
- "#\n" +
- "class X ext Y";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:ext>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:ext> {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0246(){
- String str =
- "#\n" +
- "class X ext Y {";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:ext>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:ext> {\n" +
- " {\n" +
- " }\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0247(){
- String str =
- "#\n" +
- "class X extends Y ext";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:ext>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:ext> {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'extends' keyword.
- */
-public void test0248(){
- String str =
- "#\n" +
- "class X implements Y ext";
-
- String completeBehind = "ext";
- int cursorLocation = str.lastIndexOf("ext") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "ext";
- String expectedReplacedSource = "ext";
- String expectedUnitDisplayString =
- "class X implements Y {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'finally' keyword.
- */
-public void test0249(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " fin" +
- " }\n" +
- "}\n";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:fin>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "fin";
- expectedReplacedSource = "fin";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:fin>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'finally' keyword.
- */
-public void test0250(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " try {" +
- " } fin" +
- " }\n" +
- "}\n";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnKeyword:fin>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "fin";
- expectedReplacedSource = "fin";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnKeyword:fin>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'for' keyword.
- */
-public void test0251(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " for" +
- " }\n" +
- "}\n";
-
- String completeBehind = "for";
- int cursorLocation = str.lastIndexOf("for") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:for>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "for";
- expectedReplacedSource = "for";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:for>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'if' keyword.
- */
-public void test0252(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " if" +
- " }\n" +
- "}\n";
-
- String completeBehind = "if";
- int cursorLocation = str.lastIndexOf("if") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:if>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "if";
- expectedReplacedSource = "if";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:if>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'switch' keyword.
- */
-public void test0253(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " swi" +
- " }\n" +
- "}\n";
-
- String completeBehind = "swi";
- int cursorLocation = str.lastIndexOf("swi") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:swi>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "swi";
- expectedReplacedSource = "swi";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:swi>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0254(){
- String str =
- "#\n" +
- "impl";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impl>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:impl>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0255(){
- String str =
- "#\n" +
- "X impl";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0256(){
- String str =
- "#\n" +
- "impl Y";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impl>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:impl>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0257(){
- String str =
- "#\n" +
- "class X impl";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impl>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:impl> {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0258(){
- String str =
- "#\n" +
- "class X impl Y";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impl>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:impl> {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0259(){
- String str =
- "#\n" +
- "class X impl Y {";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impl>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:impl> {\n" +
- " {\n" +
- " }\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0260(){
- String str =
- "#\n" +
- "class X extends Y impl";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impl>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnKeyword:impl> {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'implements' keyword.
- */
-public void test0261(){
- String str =
- "#\n" +
- "class X implements Y impl";
-
- String completeBehind = "impl";
- int cursorLocation = str.lastIndexOf("impl") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impl";
- String expectedReplacedSource = "impl";
- String expectedUnitDisplayString =
- "class X implements Y {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'import' keyword.
- */
-public void test0262(){
- String str =
- "#\n" +
- "impo";
-
- String completeBehind = "impo";
- int cursorLocation = str.lastIndexOf("impo") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impo>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impo";
- String expectedReplacedSource = "impo";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:impo>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'import' keyword.
- */
-public void test0263(){
- String str =
- "#\n" +
- "package p;\n" +
- "impo";
-
- String completeBehind = "impo";
- int cursorLocation = str.lastIndexOf("impo") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impo>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impo";
- String expectedReplacedSource = "impo";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import <CompleteOnKeyword:impo>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'import' keyword.
- */
-public void test0264(){
- String str =
- "#\n" +
- "package p;\n" +
- "import p2.Y;\n" +
- "impo";
-
- String completeBehind = "impo";
- int cursorLocation = str.lastIndexOf("impo") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impo>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impo";
- String expectedReplacedSource = "impo";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import p2.Y;\n" +
- "import <CompleteOnKeyword:impo>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'import' keyword.
- */
-public void test0265(){
- String str =
- "#\n" +
- "impo p2.Y";
-
- String completeBehind = "impo";
- int cursorLocation = str.lastIndexOf("impo") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:impo>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "impo";
- String expectedReplacedSource = "impo";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:impo>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0266(){
- String str =
- "#\n" +
- "int";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:int>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0267(){
- String str =
- "#\n" +
- "public int";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:int>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0268(){
- String str =
- "#\n" +
- "public abstract int";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:int>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0269(){
- String str =
- "#\n" +
- "public abstract int X";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:int>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0270(){
- String str =
- "#\n" +
- "public class X {\n" +
- " int\n" +
- "}";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:int>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0271(){
- String str =
- "#\n" +
- "public class X {\n" +
- " public int\n" +
- "}";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:int>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0272(){
- String str =
- "#\n" +
- "public class X {\n" +
- " public abstract int\n" +
- "}";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:int>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0273(){
- String str =
- "#\n" +
- "public class X {\n" +
- " public abstract int Y\n" +
- "}";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:int>;";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:int>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0274(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " int\n" +
- " }\n" +
- "}";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:int>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "int";
- expectedReplacedSource = "int";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:int>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0275(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " abstract int\n" +
- " }\n" +
- "}";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:int>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "int";
- expectedReplacedSource = "int";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:int>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0276(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " abstract int Y\n" +
- " }\n" +
- "}";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:int>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "int";
- expectedReplacedSource = "int";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:int>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0277(){
- String str =
- "#\n" +
- "public final int";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:int>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'interface' keyword.
- */
-public void test0278(){
- String str =
- "#\n" +
- "public final int X";
-
- String completeBehind = "int";
- int cursorLocation = str.lastIndexOf("int") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:int>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "int";
- String expectedReplacedSource = "int";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:int>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'package' keyword.
- */
-public void test0279(){
- String str =
- "#\n" +
- "pac";
-
- String completeBehind = "pac";
- int cursorLocation = str.lastIndexOf("pac") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pac>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pac";
- String expectedReplacedSource = "pac";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pac>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'package' keyword.
- */
-public void test0280(){
- String str =
- "#\n" +
- "pac p";
-
- String completeBehind = "pac";
- int cursorLocation = str.lastIndexOf("pac") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pac>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pac";
- String expectedReplacedSource = "pac";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pac>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'package' keyword.
- */
-public void test0281(){
- String str =
- "#\n" +
- "package p;" +
- "pac";
-
- String completeBehind = "pac";
- int cursorLocation = str.lastIndexOf("pac") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pac>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pac";
- String expectedReplacedSource = "pac";
- String expectedUnitDisplayString =
- "package p;\n" +
- "import <CompleteOnKeyword:pac>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'package' keyword.
- */
-public void test0282(){
- String str =
- "#\n" +
- "import p;" +
- "pac";
-
- String completeBehind = "pac";
- int cursorLocation = str.lastIndexOf("pac") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pac>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pac";
- String expectedReplacedSource = "pac";
- String expectedUnitDisplayString =
- "import p;\n" +
- "import <CompleteOnKeyword:pac>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'package' keyword.
- */
-public void test0283(){
- String str =
- "#\n" +
- "class X {}" +
- "pac";
-
- String completeBehind = "pac";
- int cursorLocation = str.lastIndexOf("pac") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pac>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pac";
- String expectedReplacedSource = "pac";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pac>;\n" +
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'return' keyword.
- */
-public void test0284(){
- String str =
- "public class X {\n" +
- " int foo() {\n" +
- " #\n" +
- " ret\n" +
- " }\n" +
- "}";
-
- String completeBehind = "ret";
- int cursorLocation = str.lastIndexOf("ret") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:ret>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "ret";
- expectedReplacedSource = "ret";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " <CompleteOnName:ret>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'throw' keyword.
- */
-public void test0285(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " thr\n" +
- " }\n" +
- "}";
-
- String completeBehind = "thr";
- int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:thr>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "thr";
- expectedReplacedSource = "thr";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:thr>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'try' keyword.
- */
-public void test0286(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " try\n" +
- " }\n" +
- "}";
-
- String completeBehind = "try";
- int cursorLocation = str.lastIndexOf("try") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:try>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "try";
- expectedReplacedSource = "try";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:try>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'try' keyword.
- */
-public void test0287(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " if(try\n" +
- " }\n" +
- "}";
-
- String completeBehind = "try";
- int cursorLocation = str.lastIndexOf("try") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:try>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "try";
- expectedReplacedSource = "try";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:try>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'do' keyword.
- */
-public void test0288(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " if(do\n" +
- " }\n" +
- "}";
-
- String completeBehind = "do";
- int cursorLocation = str.lastIndexOf("do") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:do>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "do";
- expectedReplacedSource = "do";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:do>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'for' keyword.
- */
-public void test0289(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " if(for\n" +
- " }\n" +
- "}";
-
- String completeBehind = "for";
- int cursorLocation = str.lastIndexOf("for") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:for>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "for";
- expectedReplacedSource = "for";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:for>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'if' keyword.
- */
-public void test0290(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " if(if\n" +
- " }\n" +
- "}";
-
- String completeBehind = "if";
- int cursorLocation = str.lastIndexOf("if") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:if>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "if";
- expectedReplacedSource = "if";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:if>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'switch' keyword.
- */
-public void test0291(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " if(swi\n" +
- " }\n" +
- "}";
-
- String completeBehind = "swi";
- int cursorLocation = str.lastIndexOf("swi") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:swi>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "swi";
- expectedReplacedSource = "swi";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:swi>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'new' keyword.
- */
-public void test0292(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " new\n" +
- " }\n" +
- "}";
-
- String completeBehind = "new";
- int cursorLocation = str.lastIndexOf("new") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:new>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "new";
- expectedReplacedSource = "new";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:new>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'new' keyword.
- */
-public void test0293(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " new X\n" +
- " }\n" +
- "}";
-
- String completeBehind = "new";
- int cursorLocation = str.lastIndexOf("new") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:new>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "new";
- expectedReplacedSource = "new";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:new>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'new' keyword.
- */
-public void test0294(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " new X()\n" +
- " }\n" +
- "}";
-
- String completeBehind = "new";
- int cursorLocation = str.lastIndexOf("new") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:new>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "new";
- expectedReplacedSource = "new";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:new>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'throws' keyword.
- */
-public void test0295(){
- String str =
- "#\n" +
- "public class X {\n" +
- " void foo() thr\n" +
- " }\n" +
- "}";
-
- String completeBehind = "thr";
- int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:thr>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "thr";
- String expectedReplacedSource = "thr";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() throws <CompleteOnKeyword:thr> {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'throws' keyword.
- */
-public void test0296(){
- String str =
- "#\n" +
- "public class X {\n" +
- " void foo() thr {\n" +
- " }\n" +
- "}";
-
- String completeBehind = "thr";
- int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:thr>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "thr";
- String expectedReplacedSource = "thr";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() throws <CompleteOnKeyword:thr> {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'throws' keyword.
- */
-public void test0297(){
- String str =
- "#\n" +
- "public class X {\n" +
- " void foo() thr E {\n" +
- " }\n" +
- "}";
-
- String completeBehind = "thr";
- int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:thr>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "thr";
- String expectedReplacedSource = "thr";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() throws <CompleteOnKeyword:thr> {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'throws' keyword.
- */
-public void test0298(){
- String str =
- "#\n" +
- "public class X {\n" +
- " void foo() throws E thr\n" +
- " }\n" +
- "}";
-
- String completeBehind = "thr";
- int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "thr";
- String expectedReplacedSource = "thr";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() throws E {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'throws' keyword.
- */
-public void test0299(){
- String str =
- "#\n" +
- "public class X {\n" +
- " X() thr\n" +
- " }\n" +
- "}";
-
- String completeBehind = "thr";
- int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:thr>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "thr";
- String expectedReplacedSource = "thr";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " X() throws <CompleteOnKeyword:thr> {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'throws' keyword.
- */
-public void test0300(){
- String str =
- "#\n" +
- "public class X {\n" +
- " int foo()[] thr\n" +
- " }\n" +
- "}";
-
- String completeBehind = "thr";
- int cursorLocation = str.lastIndexOf("thr") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:thr>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "thr";
- String expectedReplacedSource = "thr";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " int[] foo() throws <CompleteOnKeyword:thr> {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'while' keyword.
- */
-public void test0301(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " whi\n" +
- " }\n" +
- "}";
-
- String completeBehind = "whi";
- int cursorLocation = str.lastIndexOf("whi") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:whi>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "whi";
- expectedReplacedSource = "whi";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:whi>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'while' keyword.
- */
-public void test0302(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " if(whi\n" +
- " }\n" +
- "}";
-
- String completeBehind = "whi";
- int cursorLocation = str.lastIndexOf("whi") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:whi>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "whi";
- expectedReplacedSource = "whi";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:whi>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'assert' keyword.
- */
-public void test0303(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " ass\n" +
- " }\n" +
- "}";
-
- String completeBehind = "ass";
- int cursorLocation = str.lastIndexOf("ass") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:ass>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "ass";
- expectedReplacedSource = "ass";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:ass>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'assert' keyword.
- */
-public void test0304(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " if(ass\n" +
- " }\n" +
- "}";
-
- String completeBehind = "ass";
- int cursorLocation = str.lastIndexOf("ass") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:ass>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "ass";
- expectedReplacedSource = "ass";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:ass>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0305(){
- String str =
- "#\n" +
- "fin";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:fin>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0306(){
- String str =
- "#\n" +
- "public fin";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:fin>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0307(){
- String str =
- "#\n" +
- "fin zzz";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:fin>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0308(){
- String str =
- "#\n" +
- "final fin";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:fin>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0309(){
- String str =
- "#\n" +
- "abstract fin";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:fin>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0310(){
- String str =
- "#\n" +
- "public fin class X {}";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:fin>;\n" +
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0311(){
- String str =
- "#\n" +
- "public class X {\n" +
- " fin\n" +
- "}";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:fin>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0312(){
- String str =
- "#\n" +
- "public class X {\n" +
- " public fin\n" +
- "}";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:fin>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0313(){
- String str =
- "#\n" +
- "public class X {\n" +
- " fin zzz\n" +
- "}";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:fin>;";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:fin>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0314(){
- String str =
- "#\n" +
- "public class X {\n" +
- " final fin\n" +
- "}";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:fin>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'final' keyword.
- */
-public void test0315(){
- String str =
- "#\n" +
- "public class X {\n" +
- " abstract fin\n" +
- "}";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:fin>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "fin";
- String expectedReplacedSource = "fin";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:fin>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'native' keyword.
- */
-public void test0316(){
- String str =
- "#\n" +
- "public class X {\n" +
- " nat\n" +
- "}";
-
- String completeBehind = "nat";
- int cursorLocation = str.lastIndexOf("nat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:nat>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "nat";
- String expectedReplacedSource = "nat";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:nat>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'native' keyword.
- */
-public void test0317(){
- String str =
- "#\n" +
- "public class X {\n" +
- " public nat\n" +
- "}";
-
- String completeBehind = "nat";
- int cursorLocation = str.lastIndexOf("nat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:nat>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "nat";
- String expectedReplacedSource = "nat";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:nat>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'native' keyword.
- */
-public void test0318(){
- String str =
- "#\n" +
- "public class X {\n" +
- " transient nat\n" +
- "}";
-
- String completeBehind = "nat";
- int cursorLocation = str.lastIndexOf("nat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:nat>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "nat";
- String expectedReplacedSource = "nat";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:nat>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'native' keyword.
- */
-public void test0319(){
- String str =
- "#\n" +
- "public class X {\n" +
- " transient nat\n" +
- "}";
-
- String completeBehind = "nat";
- int cursorLocation = str.lastIndexOf("nat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:nat>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "nat";
- String expectedReplacedSource = "nat";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:nat>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'native' keyword.
- */
-public void test0320(){
- String str =
- "#\n" +
- "public class X {\n" +
- " volatile nat\n" +
- "}";
-
- String completeBehind = "nat";
- int cursorLocation = str.lastIndexOf("nat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:nat>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "nat";
- String expectedReplacedSource = "nat";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:nat>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'strictfp' keyword.
- */
-public void test0321(){
- String str =
- "#\n" +
- "public class X {\n" +
- " str\n" +
- "}";
-
- String completeBehind = "str";
- int cursorLocation = str.lastIndexOf("str") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:str>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "str";
- String expectedReplacedSource = "str";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:str>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'strictfp' keyword.
- */
-public void test0322(){
- String str =
- "#\n" +
- "public class X {\n" +
- " public str\n" +
- "}";
-
- String completeBehind = "str";
- int cursorLocation = str.lastIndexOf("str") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:str>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "str";
- String expectedReplacedSource = "str";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:str>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'strictfp' keyword.
- */
-public void test0323(){
- String str =
- "#\n" +
- "public class X {\n" +
- " transient str\n" +
- "}";
-
- String completeBehind = "str";
- int cursorLocation = str.lastIndexOf("str") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:str>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "str";
- String expectedReplacedSource = "str";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:str>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'strictfp' keyword.
- */
-public void test0324(){
- String str =
- "#\n" +
- "public class X {\n" +
- " transient str\n" +
- "}";
-
- String completeBehind = "str";
- int cursorLocation = str.lastIndexOf("str") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:str>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "str";
- String expectedReplacedSource = "str";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:str>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'strictfp' keyword.
- */
-public void test0325(){
- String str =
- "#\n" +
- "public class X {\n" +
- " volatile str\n" +
- "}";
-
- String completeBehind = "str";
- int cursorLocation = str.lastIndexOf("str") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:str>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "str";
- String expectedReplacedSource = "str";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:str>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'volatile' keyword.
- */
-public void test0326(){
- String str =
- "#\n" +
- "public class X {\n" +
- " vol\n" +
- "}";
-
- String completeBehind = "vol";
- int cursorLocation = str.lastIndexOf("vol") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:vol>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "vol";
- String expectedReplacedSource = "vol";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:vol>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'volatile' keyword.
- */
-public void test0327(){
- String str =
- "#\n" +
- "public class X {\n" +
- " public vol\n" +
- "}";
-
- String completeBehind = "vol";
- int cursorLocation = str.lastIndexOf("vol") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:vol>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "vol";
- String expectedReplacedSource = "vol";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:vol>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'volatile' keyword.
- */
-public void test0328(){
- String str =
- "#\n" +
- "public class X {\n" +
- " transient vol\n" +
- "}";
-
- String completeBehind = "vol";
- int cursorLocation = str.lastIndexOf("vol") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:vol>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "vol";
- String expectedReplacedSource = "vol";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:vol>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'volatile' keyword.
- */
-public void test0329(){
- String str =
- "#\n" +
- "public class X {\n" +
- " volatile vol\n" +
- "}";
-
- String completeBehind = "vol";
- int cursorLocation = str.lastIndexOf("vol") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:vol>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "vol";
- String expectedReplacedSource = "vol";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:vol>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'volatile' keyword.
- */
-public void test0330(){
- String str =
- "#\n" +
- "public class X {\n" +
- " native vol\n" +
- "}";
-
- String completeBehind = "vol";
- int cursorLocation = str.lastIndexOf("vol") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:vol>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "vol";
- String expectedReplacedSource = "vol";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:vol>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'transient' keyword.
- */
-public void test0331(){
- String str =
- "#\n" +
- "public class X {\n" +
- " tra\n" +
- "}";
-
- String completeBehind = "tra";
- int cursorLocation = str.lastIndexOf("tra") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:tra>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "tra";
- String expectedReplacedSource = "tra";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:tra>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'transient' keyword.
- */
-public void test0332(){
- String str =
- "#\n" +
- "public class X {\n" +
- " public tra\n" +
- "}";
-
- String completeBehind = "tra";
- int cursorLocation = str.lastIndexOf("tra") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:tra>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "tra";
- String expectedReplacedSource = "tra";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:tra>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'transient' keyword.
- */
-public void test0333(){
- String str =
- "#\n" +
- "public class X {\n" +
- " transient tra\n" +
- "}";
-
- String completeBehind = "tra";
- int cursorLocation = str.lastIndexOf("tra") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:tra>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "tra";
- String expectedReplacedSource = "tra";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:tra>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'transient' keyword.
- */
-public void test0334(){
- String str =
- "#\n" +
- "public class X {\n" +
- " volatile tra\n" +
- "}";
-
- String completeBehind = "tra";
- int cursorLocation = str.lastIndexOf("tra") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:tra>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "tra";
- String expectedReplacedSource = "tra";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:tra>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'transient' keyword.
- */
-public void test0335(){
- String str =
- "#\n" +
- "public class X {\n" +
- " native tra\n" +
- "}";
-
- String completeBehind = "tra";
- int cursorLocation = str.lastIndexOf("tra") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:tra>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "tra";
- String expectedReplacedSource = "tra";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:tra>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'synchronized' keyword.
- */
-public void test0336(){
- String str =
- "#\n" +
- "public class X {\n" +
- " syn\n" +
- "}";
-
- String completeBehind = "syn";
- int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:syn>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "syn";
- String expectedReplacedSource = "syn";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:syn>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'synchronized' keyword.
- */
-public void test0337(){
- String str =
- "#\n" +
- "public class X {\n" +
- " public syn\n" +
- "}";
-
- String completeBehind = "syn";
- int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:syn>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "syn";
- String expectedReplacedSource = "syn";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:syn>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'synchronized' keyword.
- */
-public void test0338(){
- String str =
- "#\n" +
- "public class X {\n" +
- " transient syn\n" +
- "}";
-
- String completeBehind = "syn";
- int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:syn>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "syn";
- String expectedReplacedSource = "syn";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:syn>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'synchronized' keyword.
- */
-public void test0339(){
- String str =
- "#\n" +
- "public class X {\n" +
- " transient syn\n" +
- "}";
-
- String completeBehind = "syn";
- int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:syn>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "syn";
- String expectedReplacedSource = "syn";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:syn>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'synchronized' keyword.
- */
-public void test0340(){
- String str =
- "#\n" +
- "public class X {\n" +
- " volatile syn\n" +
- "}";
-
- String completeBehind = "syn";
- int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:syn>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "syn";
- String expectedReplacedSource = "syn";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:syn>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'synchronized' keyword.
- */
-public void test0341(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " syn\n" +
- " }\n" +
- "}";
-
- String completeBehind = "syn";
- int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:syn>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "syn";
- expectedReplacedSource = "syn";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:syn>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'synchronized' keyword.
- */
-public void test0342(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " if(syn\n" +
- " }\n" +
- "}";
-
- String completeBehind = "syn";
- int cursorLocation = str.lastIndexOf("syn") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:syn>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "syn";
- expectedReplacedSource = "syn";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:syn>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'static' keyword.
- */
-public void test0343(){
- String str =
- "#\n" +
- "public class X {\n" +
- " sta\n" +
- "}";
-
- String completeBehind = "sta";
- int cursorLocation = str.lastIndexOf("sta") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:sta>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "sta";
- String expectedReplacedSource = "sta";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:sta>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'static' keyword.
- */
-public void test0344(){
- String str =
- "#\n" +
- "public class X {\n" +
- " public sta\n" +
- "}";
-
- String completeBehind = "sta";
- int cursorLocation = str.lastIndexOf("sta") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:sta>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "sta";
- String expectedReplacedSource = "sta";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:sta>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0345(){
- String str =
- "#\n" +
- "pub";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pub>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0346(){
- String str =
- "#\n" +
- "final pub";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pub>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0347(){
- String str =
- "#\n" +
- "public pub";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pub>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0348(){
- String str =
- "#\n" +
- "private pub";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pub>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0349(){
- String str =
- "#\n" +
- "public class X{}\n" +
- "pub";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pub>;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0350(){
- String str =
- "#\n" +
- "public class X{\n" +
- " pub\n" +
- "}";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pub>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0351(){
- String str =
- "#\n" +
- "public class X{\n" +
- " public pub\n" +
- "}";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pub>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0352(){
- String str =
- "#\n" +
- "public class X{\n" +
- " private pub\n" +
- "}";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pub>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0353(){
- String str =
- "#\n" +
- "public class X{\n" +
- " protected pub\n" +
- "}";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pub>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'public' keyword.
- */
-public void test0354(){
- String str =
- "#\n" +
- "public class X{\n" +
- " abstract pub\n" +
- "}";
-
- String completeBehind = "pub";
- int cursorLocation = str.lastIndexOf("pub") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pub>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pub";
- String expectedReplacedSource = "pub";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pub>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0355(){
- String str =
- "#\n" +
- "pro";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0356(){
- String str =
- "#\n" +
- "final pro";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pro>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0357(){
- String str =
- "#\n" +
- "public pro";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pro>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0358(){
- String str =
- "#\n" +
- "private pro";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pro>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0359(){
- String str =
- "#\n" +
- "public class X{}\n" +
- "pro";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pro>;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0360(){
- String str =
- "#\n" +
- "public class X{\n" +
- " pro\n" +
- "}";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pro>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0361(){
- String str =
- "#\n" +
- "public class X{\n" +
- " public pro\n" +
- "}";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pro>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0362(){
- String str =
- "#\n" +
- "public class X{\n" +
- " private pro\n" +
- "}";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pro>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0363(){
- String str =
- "#\n" +
- "public class X{\n" +
- " protected pro\n" +
- "}";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pro>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'protected' keyword.
- */
-public void test0364(){
- String str =
- "#\n" +
- "public class X{\n" +
- " abstract pro\n" +
- "}";
-
- String completeBehind = "pro";
- int cursorLocation = str.lastIndexOf("pro") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pro>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pro";
- String expectedReplacedSource = "pro";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pro>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0365(){
- String str =
- "#\n" +
- "pri";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0366(){
- String str =
- "#\n" +
- "final pri";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pri>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0367(){
- String str =
- "#\n" +
- "public pri";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pri>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0368(){
- String str =
- "#\n" +
- "private pri";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pri>;\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0369(){
- String str =
- "#\n" +
- "public class X{}\n" +
- "pri";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnKeyword:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "import <CompleteOnKeyword:pri>;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0370(){
- String str =
- "#\n" +
- "public class X{\n" +
- " pri\n" +
- "}";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pri>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0371(){
- String str =
- "#\n" +
- "public class X{\n" +
- " public pri\n" +
- "}";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pri>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0372(){
- String str =
- "#\n" +
- "public class X{\n" +
- " private pri\n" +
- "}";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pri>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0373(){
- String str =
- "#\n" +
- "public class X{\n" +
- " protected pri\n" +
- "}";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pri>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'private' keyword.
- */
-public void test0374(){
- String str =
- "#\n" +
- "public class X{\n" +
- " abstract pri\n" +
- "}";
-
- String completeBehind = "pri";
- int cursorLocation = str.lastIndexOf("pri") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<CompleteOnType:pri>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "pri";
- String expectedReplacedSource = "pri";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " <CompleteOnType:pri>;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-}
-/*
- * Test for 'super' keyword.
- */
-public void test0375(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " sup\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "sup";
- int cursorLocation = str.lastIndexOf("sup") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:sup>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "sup";
- expectedReplacedSource = "sup";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:sup>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'this' keyword.
- */
-public void test0376(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " thi\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "thi";
- int cursorLocation = str.lastIndexOf("thi") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:thi>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "thi";
- expectedReplacedSource = "thi";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:thi>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'true' keyword.
- */
-public void test0377(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " tru\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "tru";
- int cursorLocation = str.lastIndexOf("tru") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:tru>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "tru";
- expectedReplacedSource = "tru";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:tru>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'false' keyword.
- */
-public void test0378(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " fal\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "fal";
- int cursorLocation = str.lastIndexOf("fal") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:fal>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "fal";
- expectedReplacedSource = "fal";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:fal>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'null' keyword.
- */
-public void test0379(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " nul\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "nul";
- int cursorLocation = str.lastIndexOf("nul") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:nul>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "nul";
- expectedReplacedSource = "nul";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:nul>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'instanceof' keyword.
- */
-public void test0380(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " if(zzz ins\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "ins";
- int cursorLocation = str.lastIndexOf("ins") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnKeyword:ins>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "ins";
- expectedReplacedSource = "ins";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnKeyword:ins>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'instanceof' keyword.
- */
-public void test0381(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " ins\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "ins";
- int cursorLocation = str.lastIndexOf("ins") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:ins>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "ins";
- expectedReplacedSource = "ins";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:ins>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'instanceof' keyword.
- */
-public void test0382(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " if(zzz zzz ins\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "ins";
- int cursorLocation = str.lastIndexOf("ins") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:ins>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "ins";
- expectedReplacedSource = "ins";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " zzz zzz;\n" +
- " <CompleteOnName:ins>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'while' keyword.
- */
-public void test0384(){
- String str =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " do{\n" +
- " } whi\n" +
- " }\n" +
- "}";
-
- String completeBehind = "whi";
- int cursorLocation = str.lastIndexOf("whi") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnKeyword:whi>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "whi";
- expectedReplacedSource = "whi";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnKeyword:whi>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'catch' keyword.
- */
-public void test0385(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " try {\n" +
- " } catch(E e) {\n" +
- " } cat\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "cat";
- int cursorLocation = str.lastIndexOf("cat") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:cat>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "cat";
- expectedReplacedSource = "cat";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:cat>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'finally' keyword.
- */
-public void test0386(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " try {" +
- " } catch(E e) {" +
- " } fin" +
- " }\n" +
- "}\n";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:fin>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "fin";
- expectedReplacedSource = "fin";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:fin>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'finally' keyword.
- */
-public void test0387(){
- String str =
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " try {" +
- " } finally {" +
- " } fin" +
- " }\n" +
- "}\n";
-
- String completeBehind = "fin";
- int cursorLocation = str.lastIndexOf("fin") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:fin>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "fin";
- expectedReplacedSource = "fin";
- expectedUnitDisplayString =
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:fin>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-/*
- * Test for 'this' keyword.
- */
-public void test0388(){
- String str =
- "public class X {\n" +
- " void foo(){\n" +
- " #\n" +
- " X.thi\n" +
- " }\n" +
- "}\n";
-
- String completeBehind = "thi";
- int cursorLocation = str.lastIndexOf("thi") + completeBehind.length() - 1;
-
- String expectedCompletionNodeToString = "<NONE>";
- String expectedParentNodeToString = "<NONE>";
- String completionIdentifier = "<NONE>";
- String expectedReplacedSource = "<NONE>";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "diet ast");
-
- expectedCompletionNodeToString = "<CompleteOnName:X.thi>";
- expectedParentNodeToString = "<NONE>";
- completionIdentifier = "thi";
- expectedReplacedSource = "X.thi";
- expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:X.thi>;\n" +
- " }\n" +
- "}\n";
-
- checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedParentNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- "full ast");
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionRecoveryTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionRecoveryTest.java
deleted file mode 100644
index b0ce013..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionRecoveryTest.java
+++ /dev/null
@@ -1,1031 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-public class CompletionRecoveryTest extends AbstractCompletionTest {
-public CompletionRecoveryTest(String testName){
- super(testName);
-}
-static {
-// TESTS_NUMBERS = new int[] { 22 };
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(CompletionRecoveryTest.class);
-}
-/*
- * Complete on variable behind ill-formed declaration
- */
-public void test01() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends IOException { \n" +
- " int foo(){ \n" +
- " String str = ; \n" +
- " str. \n";
-
- String completeBehind = "str.";
- String expectedCompletionNodeToString = "<CompleteOnName:str.>";
- String completionIdentifier = "";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends IOException {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " String str;\n" +
- " <CompleteOnName:str.>;\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "str.";
- String testName = "<complete on variable behind ill-formed declaration>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on variable behind ill-formed declaration and nested block
- */
-public void test02() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends IOException { \n" +
- " int foo(){ \n" +
- " String str = ; \n" +
- " { \n" +
- " int i; \n" +
- " str. \n";
-
- String completeBehind = "str.";
- String expectedCompletionNodeToString = "<CompleteOnName:str.>";
- String completionIdentifier = "";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends IOException {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " String str;\n" +
- " {\n" +
- " int i;\n" +
- " <CompleteOnName:str.>;\n" +
- " }\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "str.";
- String testName = "<complete on variable behind ill-formed declaration and nested block>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on variable behind ill-formed declaration and inside local type field initialization
- */
-public void test03() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends IOException { \n" +
- " int foo(){ \n" +
- " final String str = ; \n" +
- " class L { \n" +
- " int i = str \n";
-
- String completeBehind = "i = str";
- String expectedCompletionNodeToString = "<CompleteOnName:str>";
- String completionIdentifier = "str";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends IOException {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " final String str;\n" +
- " class L {\n" +
- " int i = <CompleteOnName:str>;\n" +
- " L() {\n" +
- " super();\n" + // could be optimized out
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "str";
- String testName = "<complete on variable behind ill-formed declaration and inside local type field initialization>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on variable behind closed scope
- */
-public void test04() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends \n" +
- " int foo(String str) \n" +
- " String variable = ; \n" +
- " { \n" +
- " String variableNotInScope; \n" +
- " } \n" +
- " foo(varia \n";
-
- String completeBehind = "foo(var";
- String expectedCompletionNodeToString = "<CompleteOnName:var>";
- String completionIdentifier = "var";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo(String str) {\n" +
- " String variable;\n" +
- " foo(<CompleteOnName:var>);\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "varia";
- String testName = "<complete on variable behind closed scope>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on variable str with sibling method stringAppend()
- */
-public void test05() {
-
- String str =
- "import java.io.*; \n"+
- " \n"+
- "public class X extends \n"+
- " int foo(String str) \n"+
- " String str = ; \n"+
- " { \n"+
- " String strNotInScope; \n"+
- " } \n"+
- " class L { \n"+
- " int bar(){ \n"+
- " foo(str \n"+
- " void stringAppend(String s1, String s2) \n";
-
- String completeBehind = "foo(str";
- String expectedCompletionNodeToString = "<CompleteOnName:str>";
- String completionIdentifier = "str";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo(String str) {\n" +
- " String str;\n" +
- " class L {\n" +
- " L() {\n" +
- " }\n" +
- " int bar() {\n" +
- " foo(<CompleteOnName:str>);\n" +
- " }\n" +
- " void stringAppend(String s1, String s2) {\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "str";
- String testName = "<complete on variable str with sibling method stringAppend()>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on variable str with sibling method stringAppend(), eliminating
- * uninteresting method bodies
- */
-public void test06() {
-
- String str =
- "import java.io.*; \n"+
- " \n"+
- "public class X extends \n"+
- " int foo(String str) \n"+
- " String str = ; \n"+
- " { \n"+
- " String strNotInScope; \n"+
- " } \n"+
- " class L { \n"+
- " int notInterestingBody(){ \n"+
- " System.out.println(); \n"+
- " } \n"+
- " int bar(){ \n"+
- " foo(str \n"+
- " void stringAppend(String s1, String s2) \n";
-
- String completeBehind = "foo(str";
- String expectedCompletionNodeToString = "<CompleteOnName:str>";
- String completionIdentifier = "str";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo(String str) {\n" +
- " String str;\n" +
- " class L {\n" +
- " L() {\n" +
- " }\n" +
- " int notInterestingBody() {\n" +
- " }\n" +
- " int bar() {\n" +
- " foo(<CompleteOnName:str>);\n" +
- " }\n" +
- " void stringAppend(String s1, String s2) {\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedReplacedSource = "str";
- String testName = "<complete on variable eliminating other uninteresting method bodies>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on new keyword
- */
-public void test07(){
-
- String str =
- "import java.io.* \n" +
- " \n" +
- "public class X extends IOException { \n" +
- " int foo() { \n" +
- " X x = new X( \n" +
- "} \n";
-
- String completeBehind = "= n";
- String expectedCompletionNodeToString = "<CompleteOnName:n>";
- String completionIdentifier = "n";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends IOException {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " X x = <CompleteOnName:n>;\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "new";
- String testName = "<complete on new keyword>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkMethodParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on field type in anonymous type.
- */
-public void test08() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "package test;\n" +
- "import java.util.Vector;\n" +
- "public class VA {\n" +
- " Object o1 = new Object() {\n" +
- " V\n" +
- " void foo2() {\n" +
- " int i = 1;\n" +
- " }\n" +
- " };\n" +
- " String s2;\n" +
- " void bar() {\n" +
- " }\n" +
- " void foo() { \n" +
- " new String[] {}..equals()\n" +
- " }\n" +
- "}\n",
- // completeBehind:
- " V",
- // expectedCompletionNodeToString:
- "<CompleteOnType:V>",
- // expectedUnitDisplayString:
- "package test;\n" +
- "import java.util.Vector;\n" +
- "public class VA {\n" +
- " Object o1 = new Object() {\n" +
- " <CompleteOnType:V>;\n" +
- " void foo2() {\n" +
- " }\n" +
- " };\n" +
- " String s2;\n" +
- " public VA() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "V",
- // expectedReplacedSource:
- "V",
- // test name
- "<completion on field type in anonymous type>"
- );
-}
-/*
- * Complete on argument name
- */
-public void test09() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "package pack; \n"+
- "class A { \n"+
- " \n"+
- " public static void main(String[] argv \n"+
- " new Member().f \n"+
- " ; \n"+
- " } \n"+
- " class Member { \n"+
- " int foo() \n"+
- " } \n"+
- " } \n"+
- "}; \n",
- // completeBehind:
- "argv",
- // expectedCompletionNodeToString:
- "<CompleteOnArgumentName:String[] argv>",
- // expectedUnitDisplayString:
- "package pack;\n" +
- "class A {\n" +
- " class Member {\n" +
- " Member() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- " }\n" +
- " A() {\n" +
- " }\n" +
- " public static void main(<CompleteOnArgumentName:String[] argv>) {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "argv",
- // expectedReplacedSource:
- "argv",
- // test name
- "<completion on argument name>"
- );
-}
-/*
- * Complete on argument name
- */
-public void test10() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "package pack; \n"+
- "class A { \n"+
- " \n"+
- " public static void main(String[] argv \n"+
- " new Member().f \n"+
- " ; \n"+
- " } \n"+
- " class Member { \n"+
- " int foo() \n"+
- " } \n"+
- " } \n"+
- "}; \n",
- // completeBehind:
- "argv",
- // expectedCompletionNodeToString:
- "<CompleteOnName:>",
- // expectedUnitDisplayString:
- "package pack;\n" +
- "class A {\n" +
- " class Member {\n" +
- " Member() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- " }\n" +
- " A() {\n" +
- " }\n" +
- " public static void main(<CompleteOnArgumentName:String[] argv>) {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<completion on argument name>"
- );
-}
-/*
- * Complete inside method with incomplete signature
- */
-public void test11() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "package pack; \n"+
- "class A { \n"+
- " \n"+
- " public static void main(String[] argv \n"+
- " new Member().f \n"+
- " ; \n"+
- " } \n"+
- " class Member { \n"+
- " int foo() \n"+
- " } \n"+
- " } \n"+
- "}; \n",
- // completeBehind:
- "new Member().f",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:new Member().f>",
- // expectedUnitDisplayString:
- "package pack;\n" +
- "class A {\n" +
- " class Member {\n" +
- " Member() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- " }\n" +
- " A() {\n" +
- " }\n" +
- " public static void main(String[] argv) {\n" +
- " <CompleteOnMemberAccess:new Member().f>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "f",
- // expectedReplacedSource:
- "f",
- // test name
- "<complete inside method with incomplete signature>"
- );
-}
-/*
- * Complete on argument name with class decl later on
- */
-public void test12() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class DD { \n"+
- " public static void main(String[] argv \n"+
- " \n"+
- "class D { \n"+
- " \n"+
- " int i; \n"+
- " class Mem1 {} \n"+
- " int dumb(String s) \n"+
- " int dumb(float fNum, double dNum) { \n"+
- " dumb(\"world\", i); \n"+
- " \n"+
- " if (i == 0) { \n"+
- " class Local { \n"+
- " \n"+
- " int hello() \n",
- // completeBehind:
- "argv",
- // expectedCompletionNodeToString:
- "<CompleteOnName:>",
- // expectedUnitDisplayString:
- "class DD {\n" +
- " DD() {\n" +
- " }\n" +
- " public static void main(<CompleteOnArgumentName:String[] argv>) {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete on argument name with class decl later on>"
- );
-}
-/*
- * Complete behind array type
- */
-public void test13() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class C { \n"+
- " void test() { \n"+
- " String[]. \n"+
- " } \n"+
- "} \n",
- // completeBehind:
- "String[].",
- // expectedCompletionNodeToString:
- "<CompleteOnClassLiteralAccess:String[].>",
- // expectedUnitDisplayString:
- "class C {\n" +
- " C() {\n" +
- " }\n" +
- " void test() {\n" +
- " <CompleteOnClassLiteralAccess:String[].>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "String[].",
- // test name
- "<complete behind array type>"
- );
-}
-/*
- * Complete inside array type
- */
-public void test14() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "public class B { \n"+
- " class Member {} \n"+
- " \n"+
- " int[] j; \n",
- // completeBehind:
- "int[",
- // expectedCompletionNodeToString:
- NONE,
- // expectedUnitDisplayString:
- "public class B {\n" +
- " class Member {\n" +
- " Member() {\n" +
- " }\n" +
- " }\n" +
- " public B() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- NONE,
- // test name
- "<complete inside array type>"
- );
-}
-/*
- * Complete inside array type
- */
-public void test15() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "public class B { \n"+
- " class Member {} \n"+
- " \n"+
- " int[ \n",
- // completeBehind:
- "int[",
- // expectedCompletionNodeToString:
- NONE,
- // expectedUnitDisplayString:
- "public class B {\n" +
- " class Member {\n" +
- " Member() {\n" +
- " }\n" +
- " }\n" +
- " public B() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- NONE,
- // test name
- "<complete inside array type>"
- );
-}
-/*
- * Complete behind invalid array type
- */
-public void test16() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "public class B { \n"+
- " class Member {} \n"+
- " \n"+
- " int[ \n"+
- " Obje \n",
- // completeBehind:
- "Obje",
- // expectedCompletionNodeToString:
- "<CompleteOnType:Obje>",
- // expectedUnitDisplayString:
- "public class B {\n" +
- " class Member {\n" +
- " Member() {\n" +
- " }\n" +
- " }\n" +
- " <CompleteOnType:Obje>;\n" +
- " public B() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "Obje",
- // expectedReplacedSource:
- "Obje",
- // test name
- "<complete behind invalid array type>"
- );
-}
-/*
- * Complete behind invalid base type
- */
-public void test17() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class D { \n" +
- " class Member {} \n" +
- " \n" +
- " void test() { \n" +
- " int. \n" +
- " test(); \n" +
- " } \n",
- // completeBehind:
- "int.",
- // expectedCompletionNodeToString:
- "<CompleteOnClassLiteralAccess:int.>",
- // expectedUnitDisplayString:
- "class D {\n" +
- " class Member {\n" +
- " Member() {\n" +
- " }\n" +
- " }\n" +
- " D() {\n" +
- " }\n" +
- " void test() {\n" +
- " <CompleteOnClassLiteralAccess:int.>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "int.",
- // test name
- "<complete behind invalid base type>"
- );
-}
-/*
- * Complete behind incomplete local method header
- */
-public void test18() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class E { \n"+
- " int bar() { \n"+
- " class Local { \n"+
- " int hello() { \n",
- // completeBehind:
- "hello()",
- // expectedCompletionNodeToString:
- "<CompleteOnName:>",
- // expectedUnitDisplayString:
- "class E {\n" +
- " E() {\n" +
- " }\n" +
- " int bar() {\n" +
- " class Local {\n" +
- " Local() {\n" +
- " }\n" +
- " int hello() {\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete behind incomplete local method header>"
- );
-}
-/*
- * Complete behind catch variable
- */
-public void test19() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "public class Test { \n" +
- " void foo() { \n" +
- " try { \n" +
- " } catch (Exception e) { \n" +
- " } \n" +
- " e \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "\n\t\te",
- // expectedCompletionNodeToString:
- "<CompleteOnName:e>",
- // expectedUnitDisplayString:
- "public class Test {\n" +
- " public Test() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:e>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "e",
- // expectedReplacedSource:
- "e",
- // test name
- "<complete behind catch variable>"
- );
-}
-/*
- * Complete on catch variable
- */
-public void test20() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "public class Test { \n" +
- " void foo() { \n" +
- " try { \n" +
- " } catch (Exception e) { \n" +
- " e \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "\n\t\t\te",
- // expectedCompletionNodeToString:
- "<CompleteOnName:e>",
- // expectedUnitDisplayString:
- "public class Test {\n" +
- " public Test() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " Exception e;\n" +
- " <CompleteOnName:e>;\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "e",
- // expectedReplacedSource:
- "e",
- // test name
- "<complete on catch variable>"
- );
-}
-/*
- * Complete on catch variable after syntax error
- */
-public void test21() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "public class Test { \n" +
- " void foo() { \n" +
- " try { \n" +
- " bar \n" +
- " } catch (Exception e) { \n" +
- " e \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "\n\t\t\te",
- // expectedCompletionNodeToString:
- "<CompleteOnName:e>",
- // expectedUnitDisplayString:
- "public class Test {\n" +
- " public Test() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " Exception e;\n" +
- " <CompleteOnName:e>;\n" +
- " }\n" +
- " }\n" +
- "}\n"
- ,
- // expectedCompletionIdentifier:
- "e",
- // expectedReplacedSource:
- "e",
- // test name
- "<complete on catch variable after syntax error>"
- );
-}
-/*
- * Complete on constructor type name
- * 1G1HF7P: ITPCOM:WIN98 - CodeAssist may not work in constructor signature
- */
-public void test22() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "public class SomeType {\n" +
- " public SomeType(int i){}\n" +
- "}\n" +
- "\n" +
- "class SomeOtherType extends SomeType {\n" +
- " SomeOtherType(int i){\n" +
- " super(i);\n" +
- " }\n" +
- "}\n",
- // completeBehind:
- " SomeOther",
- // expectedCompletionNodeToString:
- "<CompleteOnType:SomeOther>",
- // expectedUnitDisplayString:
- "public class SomeType {\n" +
- " public SomeType(int i) {\n" +
- " }\n" +
- "}\n" +
- "class SomeOtherType extends SomeType {\n" +
- " <CompleteOnType:SomeOther>;\n" +
- " int i;\n" +
- " {\n" +
- " }\n" +
- " SomeOtherType() {\n" +
- " }\n" +
- "}\n"
- ,
- // expectedCompletionIdentifier:
- "SomeOther",
- // expectedReplacedSource:
- "SomeOtherType",
- // test name
- "<complete on constructor type name>"
- );
-}
-/**
- * Complete in initializer in recovery mode
- */
-public void test23() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "package p;\n" +
- "public class X {\n" +
- " void foo(){)\n" +
- " {\n" +
- " Obj\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // completeBehind:
- "Obj",
- // expectedCompletionNodeToString:
- "<CompleteOnName:Obj>",
- // expectedUnitDisplayString:
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " <CompleteOnName:Obj>;\n" +
- " }\n" +
- " }\n" +
- "}\n"
- ,
- // expectedCompletionIdentifier:
- "Obj",
- // expectedReplacedSource:
- "Obj",
- // test name
- "<complete in initializer>"
- );
-}
-/**
- * Complete after initializer in recovery mode
- */
-public void test24() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "package p;\n" +
- "public class X {\n" +
- " void foo(){)\n" +
- " int v1;\n" +
- " {\n" +
- " int v2\n" +
- " }\n" +
- " Obj" +
- " }\n" +
- "}\n",
- // completeBehind:
- "Obj",
- // expectedCompletionNodeToString:
- "<CompleteOnName:Obj>",
- // expectedUnitDisplayString:
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int v1;\n" +
- " <CompleteOnName:Obj>;\n" +
- " }\n" +
- "}\n"
- ,
- // expectedCompletionIdentifier:
- "Obj",
- // expectedReplacedSource:
- "Obj",
- // test name
- "<complete after initializer>"
- );
-}
-/**
- * Complete after dot, before a number .<|>12
- */
-public void test25() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "package p;\n" +
- "public class X {\n" +
- " void foo(){\n" +
- " this.12\n" +
- " }\n" +
- "}\n",
- // completeBehind:
- "this.",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:this.>",
- // expectedUnitDisplayString:
- "package p;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:this.>;\n" +
- " }\n" +
- "}\n"
- ,
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "this.",
- // test name
- "<complete after dot number>"
- );
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
deleted file mode 100644
index c384268..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
+++ /dev/null
@@ -1,2375 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-import org.eclipse.wst.jsdt.core.tests.compiler.regression.AbstractRegressionTest;
-
-public class ComplianceDiagnoseTest extends AbstractRegressionTest {
- public ComplianceDiagnoseTest(String name) {
- super(name);
- }
-// Static initializer to specify tests subset using TESTS_* static variables
-// All specified tests which does not belong to the class are skipped...
-//static {
-// TESTS_NAMES = new String[] { "test000" };
-// TESTS_NUMBERS = new int[] { 50 };
-// TESTS_RANGE = new int[] { 21, 50 };
-//}
-public static Test suite() {
- return buildAllCompliancesTestSuite(testClass());
-}
-public static Class testClass() {
- return ComplianceDiagnoseTest.class;
-}
-public void runComplianceParserTest(
- String[] testFiles,
- String expected13ProblemLog,
- String expected14ProblemLog,
- String expected15ProblemLog){
- if(COMPLIANCE_1_3.equals(this.complianceLevel)) {
- this.runNegativeTest(testFiles, expected13ProblemLog);
- } else if(COMPLIANCE_1_4.equals(this.complianceLevel)) {
- this.runNegativeTest(testFiles, expected14ProblemLog);
- } else if(this.complianceLevel.compareTo(COMPLIANCE_1_5) >= 0) {
- this.runNegativeTest(testFiles, expected15ProblemLog);
- }
-}
-public void test0001() {
- String[] testFiles = new String[] {
- "X.java",
- "import static aaa.BBB.*;\n" +
- "public class X {\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " import static aaa.BBB.*;\n" +
- " ^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error, static imports are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " import static aaa.BBB.*;\n" +
- " ^^^\n" +
- "The import aaa cannot be resolved\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " import static aaa.BBB.*;\n" +
- " ^^^\n" +
- "The import aaa cannot be resolved\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0002() {
- String[] testFiles = new String[] {
- "X.java",
- "import static aaa.BBB.CCC;\n" +
- "public class X {\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " import static aaa.BBB.CCC;\n" +
- " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error, static imports are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " import static aaa.BBB.CCC;\n" +
- " ^^^\n" +
- "The import aaa cannot be resolved\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " import static aaa.BBB.CCC;\n" +
- " ^^^\n" +
- "The import aaa cannot be resolved\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0003() {
- String[] testFiles = new String[] {
- "X.java",
- "public enum X {\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public enum X {\n" +
- " ^^^^\n" +
- "Syntax error on token \"enum\", interface expected\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0004() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(){\n" +
- " for(String o: c) {\n" +
- " }\n" +
- " }\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 3)\n" +
- " for(String o: c) {\n" +
- " ^^^^^^^^^^^\n" +
- "Syntax error, \'for each\' statements are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 3)\n" +
- " for(String o: c) {\n" +
- " ^\n" +
- "c cannot be resolved\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 3)\n" +
- " for(String o: c) {\n" +
- " ^\n" +
- "c cannot be resolved\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0005() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(Z ... arg){\n" +
- " }\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " void foo(Z ... arg){\n" +
- " ^^^^^^^^^\n" +
- "Syntax error, varargs are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " void foo(Z ... arg){\n" +
- " ^\n" +
- "Z cannot be resolved to a type\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " void foo(Z ... arg){\n" +
- " ^\n" +
- "Z cannot be resolved to a type\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0006() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X <T1 extends String, T2> extends Y {\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extends String, T2> extends Y {\n" +
- " ^^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error, type parameters are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extends String, T2> extends Y {\n" +
- " ^\n" +
- "Y cannot be resolved to a type\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. WARNING in X.java (at line 1)\n" +
- " public class X <T1 extends String, T2> extends Y {\n" +
- " ^^^^^^\n" +
- "The type parameter T1 should not be bounded by the final type String. Final types cannot be further extended\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extends String, T2> extends Y {\n" +
- " ^\n" +
- "Y cannot be resolved to a type\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0007() {
- String[] testFiles = new String[] {
- "X.java",
- "public interface X <T1 extends String, T2> extends Y {\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public interface X <T1 extends String, T2> extends Y {\n" +
- " ^^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error, type parameters are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " public interface X <T1 extends String, T2> extends Y {\n" +
- " ^\n" +
- "Y cannot be resolved to a type\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. WARNING in X.java (at line 1)\n" +
- " public interface X <T1 extends String, T2> extends Y {\n" +
- " ^^^^^^\n" +
- "The type parameter T1 should not be bounded by the final type String. Final types cannot be further extended\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " public interface X <T1 extends String, T2> extends Y {\n" +
- " ^\n" +
- "Y cannot be resolved to a type\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0008() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " public <T1 extends String, T2> int foo(){\n" +
- " }\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " public <T1 extends String, T2> int foo(){\n" +
- " ^^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error, type parameters are only available if source level is 5.0\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. WARNING in X.java (at line 2)\n" +
- " public <T1 extends String, T2> int foo(){\n" +
- " ^^^^^^\n" +
- "The type parameter T1 should not be bounded by the final type String. Final types cannot be further extended\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " public <T1 extends String, T2> int foo(){\n" +
- " ^^^^^\n" +
- "This method must return a result of type int\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0009() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " public <T1 extends String, T2> X(){\n" +
- " }\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " public <T1 extends String, T2> X(){\n" +
- " ^^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error, type parameters are only available if source level is 5.0\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. WARNING in X.java (at line 2)\n" +
- " public <T1 extends String, T2> X(){\n" +
- " ^^^^^^\n" +
- "The type parameter T1 should not be bounded by the final type String. Final types cannot be further extended\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0010() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " Z<Y1, Y2> var;\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " Z<Y1, Y2> var;\n" +
- " ^\n" +
- "Z cannot be resolved to a type\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " Z<Y1, Y2> var;\n" +
- " ^^^^^^\n" +
- "Syntax error, parameterized types are only available if source level is 5.0\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 2)\n" +
- " Z<Y1, Y2> var;\n" +
- " ^^\n" +
- "Y1 cannot be resolved to a type\n" +
- "----------\n" +
- "4. ERROR in X.java (at line 2)\n" +
- " Z<Y1, Y2> var;\n" +
- " ^^\n" +
- "Y2 cannot be resolved to a type\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " Z<Y1, Y2> var;\n" +
- " ^\n" +
- "Z cannot be resolved to a type\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " Z<Y1, Y2> var;\n" +
- " ^^\n" +
- "Y1 cannot be resolved to a type\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 2)\n" +
- " Z<Y1, Y2> var;\n" +
- " ^^\n" +
- "Y2 cannot be resolved to a type\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0011() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " public X(){\n" +
- " <Y1, Y2>this(null);\n" +
- " }\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 3)\n" +
- " <Y1, Y2>this(null);\n" +
- " ^^^^^^\n" +
- "Syntax error, parameterized types are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 3)\n" +
- " <Y1, Y2>this(null);\n" +
- " ^^\n" +
- "Y1 cannot be resolved to a type\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 3)\n" +
- " <Y1, Y2>this(null);\n" +
- " ^^\n" +
- "Y2 cannot be resolved to a type\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 3)\n" +
- " <Y1, Y2>this(null);\n" +
- " ^^\n" +
- "Y1 cannot be resolved to a type\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 3)\n" +
- " <Y1, Y2>this(null);\n" +
- " ^^\n" +
- "Y2 cannot be resolved to a type\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0012() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo() {\n" +
- " assert true;\n" +
- " }\n" +
- "}\n" +
- "\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. WARNING in X.java (at line 3)\n" +
- " assert true;\n" +
- " ^^^^^^\n" +
- "\'assert\' should not be used as an identifier, since it is a reserved keyword from source level 1.4 on\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 3)\n" +
- " assert true;\n" +
- " ^^^^^^\n" +
- "Syntax error on token \"assert\", AssignmentOperator expected after this token\n" +
- "----------\n";
- String expected14ProblemLog =
- "";
-
- String expected15ProblemLog =
- expected14ProblemLog;
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0013() {
- String[] testFiles = new String[] {
- "X.java",
- "import static aaa.*\n" +
- "public class X {\n" +
- "}\n" +
- "\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " import static aaa.*\n" +
- " ^^^^^^^^^^^^^^^^^\n" +
- "Syntax error, static imports are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " import static aaa.*\n" +
- " ^^^\n" +
- "The import aaa cannot be resolved\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 1)\n" +
- " import static aaa.*\n" +
- " ^\n" +
- "Syntax error on token \"*\", ; expected after this token\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " import static aaa.*\n" +
- " ^^^\n" +
- "The import aaa cannot be resolved\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " import static aaa.*\n" +
- " ^\n" +
- "Syntax error on token \"*\", ; expected after this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0014() {
- String[] testFiles = new String[] {
- "X.java",
- "public enum X \n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public enum X \n" +
- "}\n" +
- " ^^^^^^^^^\n" +
- "Syntax error on tokens, delete these tokens\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public enum X \n" +
- " ^\n" +
- "Syntax error on token \"X\", { expected after this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0015() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(){\n" +
- " for(String o: c) {\n" +
- " #\n" +
- " }\n" +
- " }\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 3)\n" +
- " for(String o: c) {\n" +
- " ^^^^^^^^^^^\n" +
- "Syntax error, \'for each\' statements are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 4)\n" +
- " #\n" +
- " ^\n" +
- "Syntax error on token \"Invalid Character\", delete this token\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 4)\n" +
- " #\n" +
- " ^\n" +
- "Syntax error on token \"Invalid Character\", delete this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0016() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(Z ... arg){\n" +
- " }\n" +
- " #\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " void foo(Z ... arg){\n" +
- " ^^^^^^^^^\n" +
- "Syntax error, varargs are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " void foo(Z ... arg){\n" +
- " ^\n" +
- "Z cannot be resolved to a type\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 4)\n" +
- " #\n" +
- " ^\n" +
- "Syntax error on token \"Invalid Character\", delete this token\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " void foo(Z ... arg){\n" +
- " ^\n" +
- "Z cannot be resolved to a type\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 4)\n" +
- " #\n" +
- " ^\n" +
- "Syntax error on token \"Invalid Character\", delete this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0017() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X <T1 extends String, T2> extends Y {\n" +
- " #\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extends String, T2> extends Y {\n" +
- " ^^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error, type parameters are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extends String, T2> extends Y {\n" +
- " ^\n" +
- "Y cannot be resolved to a type\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 2)\n" +
- " #\n" +
- " ^\n" +
- "Syntax error on token \"Invalid Character\", delete this token\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. WARNING in X.java (at line 1)\n" +
- " public class X <T1 extends String, T2> extends Y {\n" +
- " ^^^^^^\n" +
- "The type parameter T1 should not be bounded by the final type String. Final types cannot be further extended\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extends String, T2> extends Y {\n" +
- " ^\n" +
- "Y cannot be resolved to a type\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 2)\n" +
- " #\n" +
- " ^\n" +
- "Syntax error on token \"Invalid Character\", delete this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0018() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " public <T1 extends String, T2> int foo(){\n" +
- " }\n" +
- " #\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " public <T1 extends String, T2> int foo(){\n" +
- " ^^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error, type parameters are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 4)\n" +
- " #\n" +
- " ^\n" +
- "Syntax error on token \"Invalid Character\", delete this token\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. WARNING in X.java (at line 2)\n" +
- " public <T1 extends String, T2> int foo(){\n" +
- " ^^^^^^\n" +
- "The type parameter T1 should not be bounded by the final type String. Final types cannot be further extended\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 4)\n" +
- " #\n" +
- " ^\n" +
- "Syntax error on token \"Invalid Character\", delete this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0019() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " Z<Y1, Y2> var;\n" +
- " #\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " Z<Y1, Y2> var;\n" +
- " ^\n" +
- "Z cannot be resolved to a type\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " Z<Y1, Y2> var;\n" +
- " ^^^^^^\n" +
- "Syntax error, parameterized types are only available if source level is 5.0\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 2)\n" +
- " Z<Y1, Y2> var;\n" +
- " ^^\n" +
- "Y1 cannot be resolved to a type\n" +
- "----------\n" +
- "4. ERROR in X.java (at line 2)\n" +
- " Z<Y1, Y2> var;\n" +
- " ^^\n" +
- "Y2 cannot be resolved to a type\n" +
- "----------\n" +
- "5. ERROR in X.java (at line 3)\n" +
- " #\n" +
- " ^\n" +
- "Syntax error on token \"Invalid Character\", delete this token\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " Z<Y1, Y2> var;\n" +
- " ^\n" +
- "Z cannot be resolved to a type\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " Z<Y1, Y2> var;\n" +
- " ^^\n" +
- "Y1 cannot be resolved to a type\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 2)\n" +
- " Z<Y1, Y2> var;\n" +
- " ^^\n" +
- "Y2 cannot be resolved to a type\n" +
- "----------\n" +
- "4. ERROR in X.java (at line 3)\n" +
- " #\n" +
- " ^\n" +
- "Syntax error on token \"Invalid Character\", delete this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0020() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo() {\n" +
- " assert true;\n" +
- " #\n" +
- " }\n" +
- "}\n" +
- "\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. WARNING in X.java (at line 3)\n" +
- " assert true;\n" +
- " ^^^^^^\n" +
- "\'assert\' should not be used as an identifier, since it is a reserved keyword from source level 1.4 on\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 3)\n" +
- " assert true;\n" +
- " ^^^^^^\n" +
- "Syntax error on token \"assert\", AssignmentOperator expected after this token\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 4)\n" +
- " #\n" +
- " ^\n" +
- "Syntax error on token \"Invalid Character\", delete this token\n" +
- "----------\n";
- String expected14ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 4)\n" +
- " #\n" +
- " ^\n" +
- "Syntax error on token \"Invalid Character\", delete this token\n" +
- "----------\n";
-
- String expected15ProblemLog =
- expected14ProblemLog;
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-//TODO (david) suspicious behavior
-public void test0021() {
- String[] testFiles = new String[] {
- "X.java",
- "import staic aaa.*;\n" +
- "public class X {\n" +
- "}\n" +
- "\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " import staic aaa.*;\n" +
- " ^^^^^\n" +
- "The import staic cannot be resolved\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " import staic aaa.*;\n" +
- " ^^^\n" +
- "Syntax error on token \"aaa\", delete this token\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " import staic aaa.*;\n" +
- " ^^^^^\n" +
- "Syntax error on token \"staic\", static expected\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " import staic aaa.*;\n" +
- " ^^^^^\n" +
- "The import staic cannot be resolved\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-//TODO (david) suspicious behavior
-public void test0022() {
- String[] testFiles = new String[] {
- "X.java",
- "import static aaa.*.*;\n" +
- "public class X {\n" +
- "}\n" +
- "\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " import static aaa.*.*;\n" +
- " ^^^^^^^^^^^^^^^^^\n" +
- "Syntax error, static imports are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " import static aaa.*.*;\n" +
- " ^^^\n" +
- "The import aaa cannot be resolved\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 1)\n" +
- " import static aaa.*.*;\n" +
- " ^^\n" +
- "Syntax error on tokens, delete these tokens\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " import static aaa.*.*;\n" +
- " ^^^\n" +
- "The import aaa cannot be resolved\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " import static aaa.*.*;\n" +
- " ^\n" +
- "Syntax error on token \"*\", Identifier expected\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0023() {
- String[] testFiles = new String[] {
- "X.java",
- "import static for;\n" +
- "public class X {\n" +
- "}\n" +
- "\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " import static for;\n" +
- " ^^^^^^^^^^\n" +
- "Syntax error on tokens, Name expected instead\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " import static for;\n" +
- " ^^^\n" +
- "Syntax error on token \"for\", Identifier expected\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-
-//TODO (david) reenable once bug is fixed
-public void _test0024() {
- String[] testFiles = new String[] {
- "X.java",
- "import static {aaa};\n" +
- "public class X {\n" +
- "}\n" +
- "\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " import static {aaa};\n" +
- " ^^^^^^^^^^^^\n" +
- "Syntax error on tokens, Name expected instead\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " import static {aaa};\n" +
- " ^^^^^\n" +
- "Syntax error on tokens, Name expected instead\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0025() {
- String[] testFiles = new String[] {
- "X.java",
- "static aaa.*;\n" +
- "public class X {\n" +
- "}\n" +
- "\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " static aaa.*;\n" +
- " ^^^^^^\n" +
- "Syntax error on token \"static\", import expected\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " static aaa.*;\n" +
- " ^^^^^^\n" +
- "Syntax error on token \"static\", import expected before this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0026() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(){\n" +
- " for(Object o ? c){\n" +
- " }\n" +
- " }\n" +
- "}\n" +
- "\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 3)\n" +
- " for(Object o ? c){\n" +
- " ^^^^^^\n" +
- "Syntax error on token \"Object\", ( expected\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 3)\n" +
- " for(Object o ? c){\n" +
- " ^^^\n" +
- "Syntax error on token(s), misplaced construct(s)\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 3)\n" +
- " for(Object o ? c){\n" +
- " ^\n" +
- "Syntax error, insert \"AssignmentOperator Expression\" to complete Assignment\n" +
- "----------\n" +
- "4. ERROR in X.java (at line 3)\n" +
- " for(Object o ? c){\n" +
- " ^\n" +
- "Syntax error, insert \"; ; ) Statement\" to complete BlockStatements\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 3)\n" +
- " for(Object o ? c){\n" +
- " ^\n" +
- "Syntax error on token \"?\", : expected\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0027() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(){\n" +
- " for(Object o : switch){\n" +
- " }\n" +
- " }\n" +
- "}\n" +
- "\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 3)\n" +
- " for(Object o : switch){\n" +
- " ^\n" +
- "Syntax error, insert \"; ; ) Statement\" to complete BlockStatements\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 3)\n" +
- " for(Object o : switch){\n" +
- " ^^^^^^\n" +
- "Syntax error on token \"switch\", invalid Expression\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0028() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(int ... ){\n" +
- " }\n" +
- "}\n" +
- "\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X {\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " void foo(int ... ){\n" +
- " ^^^\n" +
- "Syntax error on token \"...\", invalid VariableDeclaratorId\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 4)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error on token \"}\", delete this token\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X {\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " void foo(int ... ){\n" +
- " ^^^\n" +
- "Syntax error on token \"...\", VariableDeclaratorId expected after this token\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 4)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error on token \"}\", delete this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0029() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(int ... for){\n" +
- " }\n" +
- "}\n" +
- "\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X {\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " void foo(int ... for){\n" +
- " ^^^^^^^\n" +
- "Syntax error on tokens, VariableDeclaratorId expected instead\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 4)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error on token \"}\", delete this token\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X {\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " void foo(int ... for){\n" +
- " ^^^\n" +
- "Syntax error on token \"for\", invalid VariableDeclaratorId\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 4)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error on token \"}\", delete this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0030() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(int .. aaa){\n" +
- " }\n" +
- "}\n" +
- "\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X {\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " void foo(int .. aaa){\n" +
- " ^^\n" +
- "Syntax error on tokens, delete these tokens\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 4)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error on token \"}\", delete this token\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X {\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " void foo(int .. aaa){\n" +
- " ^^\n" +
- "Syntax error on tokens, delete these tokens\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 4)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error on token \"}\", delete this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0031() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(int ... aaa bbb){\n" +
- " }\n" +
- "}\n" +
- "\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X {\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " void foo(int ... aaa bbb){\n" +
- " ^^^^^^^^^^^\n" +
- "Syntax error, varargs are only available if source level is 5.0\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 2)\n" +
- " void foo(int ... aaa bbb){\n" +
- " ^^^^^^^\n" +
- "Syntax error on token(s), misplaced construct(s)\n" +
- "----------\n" +
- "4. ERROR in X.java (at line 4)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error on token \"}\", delete this token\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X {\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " void foo(int ... aaa bbb){\n" +
- " ^^^\n" +
- "Syntax error on token \"bbb\", delete this token\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 4)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error on token \"}\", delete this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0032() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X <T1 extends String, T2 extends Y {\n" +
- " \n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extends String, T2 extends Y {\n" +
- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error on token(s), misplaced construct(s)\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. WARNING in X.java (at line 1)\n" +
- " public class X <T1 extends String, T2 extends Y {\n" +
- " ^^^^^^\n" +
- "The type parameter T1 should not be bounded by the final type String. Final types cannot be further extended\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extends String, T2 extends Y {\n" +
- " ^\n" +
- "Syntax error, insert \">\" to complete ReferenceType1\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extends String, T2 extends Y {\n" +
- " ^\n" +
- "Y cannot be resolved to a type\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0033() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X T1 extends String, T2> extends Y {\n" +
- " \n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X T1 extends String, T2> extends Y {\n" +
- " ^^\n" +
- "Syntax error on token \"T1\", delete this token\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " public class X T1 extends String, T2> extends Y {\n" +
- " ^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error on tokens, delete these tokens\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X T1 extends String, T2> extends Y {\n" +
- " ^\n" +
- "Syntax error on token \"X\", < expected after this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0034() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X <T1 extnds String, T2> extends Y {\n" +
- " \n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extnds String, T2> extends Y {\n" +
- " ^\n" +
- "Syntax error on token \"<\", { expected\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extnds String, T2> extends Y {\n" +
- " ^^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error on tokens, InterfaceHeaderName expected instead\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extnds String, T2> extends Y {\n" +
- " ^^^^^^\n" +
- "extnds cannot be resolved to a type\n" +
- "----------\n" +
- "4. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extnds String, T2> extends Y {\n" +
- " ^^^^^^\n" +
- "Syntax error on token \"String\", delete this token\n" +
- "----------\n" +
- "5. ERROR in X.java (at line 3)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extnds String, T2> extends Y {\n" +
- " ^^^^^^\n" +
- "Syntax error on token \"extnds\", extends expected\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extnds String, T2> extends Y {\n" +
- " ^^^^^^\n" +
- "extnds cannot be resolved to a type\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0035() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X <T1 extends for, T2> extends Y {\n" +
- " \n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extends for, T2> extends Y {\n" +
- " ^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error on tokens, delete these tokens\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public class X <T1 extends for, T2> extends Y {\n" +
- " ^^^\n" +
- "Syntax error on token \"for\", invalid ReferenceType\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0036() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " public <T1 extends String, T2> foo(){\n" +
- " }\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " public <T1 extends String, T2> foo(){\n" +
- " ^^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error, type parameters are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " public <T1 extends String, T2> foo(){\n" +
- " ^^^^^\n" +
- "Return type for the method is missing\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. WARNING in X.java (at line 2)\n" +
- " public <T1 extends String, T2> foo(){\n" +
- " ^^^^^^\n" +
- "The type parameter T1 should not be bounded by the final type String. Final types cannot be further extended\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " public <T1 extends String, T2> foo(){\n" +
- " ^^^^^\n" +
- "Return type for the method is missing\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0037() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " public <T1 extnds String, T2> int foo(){\n" +
- " }\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " public <T1 extnds String, T2> int foo(){\n" +
- " ^^^\n" +
- "Syntax error on token(s), misplaced construct(s)\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " public <T1 extnds String, T2> int foo(){\n" +
- " ^^\n" +
- "T1 cannot be resolved to a type\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 2)\n" +
- " public <T1 extnds String, T2> int foo(){\n" +
- " ^\n" +
- "Syntax error on token \">\", ; expected\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " public <T1 extnds String, T2> int foo(){\n" +
- " ^^\n" +
- "T1 cannot be resolved to a type\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " public <T1 extnds String, T2> int foo(){\n" +
- " ^^^^^^\n" +
- "Syntax error on token \"extnds\", extends expected\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0038() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " public <T1 extends String T2> int foo(){\n" +
- " }\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " public <T1 extends String T2> int foo(){\n" +
- " ^^^^^^^^^^^\n" +
- "Syntax error on token(s), misplaced construct(s)\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " public <T1 extends String T2> int foo(){\n" +
- " ^\n" +
- "Syntax error on token \">\", ; expected\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " public <T1 extends String T2> int foo(){\n" +
- " ^^\n" +
- "Syntax error on token \"T2\", delete this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0039() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " Z Y1, Y2> var;\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " Z Y1, Y2> var;\n" +
- " ^\n" +
- "Z cannot be resolved to a type\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " Z Y1, Y2> var;\n" +
- " ^\n" +
- "Syntax error on token \">\", , expected\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " Z Y1, Y2> var;\n" +
- " ^\n" +
- "Z cannot be resolved to a type\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " Z Y1, Y2> var;\n" +
- " ^\n" +
- "Syntax error on token \">\", , expected\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0040() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " Z <Y1, Y2 var;\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " Z <Y1, Y2 var;\n" +
- " ^^^^^^^\n" +
- "Syntax error on token(s), misplaced construct(s)\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " Z <Y1, Y2 var;\n" +
- " ^^\n" +
- "Y2 cannot be resolved to a type\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " Z <Y1, Y2 var;\n" +
- " ^^\n" +
- "Syntax error, insert \">\" to complete ReferenceType1\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " Z <Y1, Y2 var;\n" +
- " ^^\n" +
- "Y2 cannot be resolved to a type\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0041() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " Z <Y1, for Y2> var;\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " Z <Y1, for Y2> var;\n" +
- " ^^^^^^^^^^^^\n" +
- "Syntax error on tokens, delete these tokens\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " Z <Y1, for Y2> var;\n" +
- " ^^^\n" +
- "Syntax error on token \"for\", delete this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0042() {
- String[] testFiles = new String[] {
- "X.java",
- "void ___eval() {\n" +
- " new Runnable() {\n" +
- " int ___run() throws Throwable {\n" +
- " return blah;\n" +
- " }\n" +
- " private String blarg;\n" +
- " public void run() {\n" +
- " }\n" +
- " };\n" +
- "}\n" +
- "public class X {\n" +
- " private static int x;\n" +
- " private String blah;\n" +
- " public static void main(String[] args) {\n" +
- " }\n" +
- " public void hello() {\n" +
- " }\n" +
- " public boolean blah() {\n" +
- " return false;\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 7)\n" +
- " public void run() {\n" +
- " }\n" +
- " };\n" +
- "}\n" +
- " ^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error on tokens, delete these tokens\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " void ___eval() {\n" +
- " ^^^^\n" +
- "Syntax error on token \"void\", @ expected\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 1)\n" +
- " void ___eval() {\n" +
- " ^\n" +
- "Syntax error on token \")\", delete this token\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 9)\n" +
- " };\n" +
- " ^\n" +
- "Syntax error on token \"}\", { expected\n" +
- "----------\n" +
- "4. ERROR in X.java (at line 23)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n" +
- "5. ERROR in X.java (at line 23)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete MemberValueArrayInitializer\n" +
- "----------\n" +
- "6. ERROR in X.java (at line 23)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error, insert \")\" to complete Modifiers\n" +
- "----------\n" +
- "7. ERROR in X.java (at line 23)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error, insert \"enum Identifier\" to complete EnumHeader\n" +
- "----------\n" +
- "8. ERROR in X.java (at line 23)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error, insert \"EnumBody\" to complete JavaScriptUnit\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=72942
- */
-public void test0043() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- "}\n" +
- "public static void foo(){}\n" +
- "\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error on token \"}\", delete this token\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 3)\n" +
- " public static void foo(){}\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- expected13ProblemLog;
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=62472
- */
-public void test0044() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " public <T> X(T t){\n" +
- " System.out.println(t);\n" +
- " }\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " class Local extends X {\n" +
- " Local() {\n" +
- " <String>super(\"SUCCESS\");\n" +
- " }\n" +
- " }\n" +
- " new Local();\n" +
- " }\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " public <T> X(T t){\n" +
- " ^\n" +
- "Syntax error, type parameters are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " public <T> X(T t){\n" +
- " ^\n" +
- "T cannot be resolved to a type\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 5)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error on token \"}\", delete this token\n" +
- "----------\n" +
- "4. ERROR in X.java (at line 9)\n" +
- " <String>super(\"SUCCESS\");\n" +
- " ^^^^^^\n" +
- "Syntax error, type parameters are only available if source level is 5.0\n" +
- "----------\n" +
- "5. ERROR in X.java (at line 9)\n" +
- " <String>super(\"SUCCESS\");\n" +
- " ^^^^^^\n" +
- "Syntax error, parameterized types are only available if source level is 5.0\n" +
- "----------\n" +
- "6. ERROR in X.java (at line 9)\n" +
- " <String>super(\"SUCCESS\");\n" +
- " ^^^^^^^^^^^^^^^^^\n" +
- "The constructor X(String) is undefined\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 5)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error on token \"}\", delete this token\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=62472
- */
-public void test0045() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " public void foo(){\n" +
- " }\n" +
- " }\n" +
- " public void bar() {\n" +
- " }\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 4)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error on token \"}\", delete this token\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- expected13ProblemLog;
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=74519
- */
-public void test0046() {
- String[] testFiles = new String[] {
- "X.java",
- "public @interface X {\n" +
- " String annName();\n" +
- "}"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " public @interface X {\n" +
- " ^\n" +
- "Syntax error, annotation declarations are only available if source level is 5.0\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog = "";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=74519
- */
-public void test0047() {
- String[] testFiles = new String[] {
- "A.java",
- "public @interface A {}",
- "X.java",
- "@A public class X {\n" +
- "}"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in A.java (at line 1)\n" +
- " public @interface A {}\n" +
- " ^\n" +
- "Syntax error, annotation declarations are only available if source level is 5.0\n" +
- "----------\n" +
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " @A public class X {\n" +
- " ^^\n" +
- "Syntax error, annotations are only available if source level is 5.0\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog = "";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0048() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(X ... arg[]){\n" +
- " }\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " void foo(X ... arg[]){\n" +
- " ^^^^^^^^^\n" +
- "Syntax error, varargs are only available if source level is 5.0\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " void foo(X ... arg[]){\n" +
- " ^^^\n" +
- "Extended dimensions are illegal for a variable argument\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0049() {
- String[] testFiles = new String[] {
- "X.java",
- "@interface MyAnn {\n" +
- " String value1() default \"\";\n" +
- " String value2();\n" +
- "}\n" +
- "class ZZZ {} \n" +
- "public @MyAnn(\"\",\"\") class Test { \n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 1)\n" +
- " @interface MyAnn {\n" +
- " ^^^^^\n" +
- "Syntax error, annotation declarations are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 6)\n" +
- " public @MyAnn(\"\",\"\") class Test { \n" +
- " ^^\n" +
- "Syntax error, insert \")\" to complete Modifier\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 6)\n" +
- " public @MyAnn(\"\",\"\") class Test { \n" +
- " ^\n" +
- "Syntax error on token \",\", / expected\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0050() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(List<String>... args) {}\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " void foo(List<String>... args) {}\n" +
- " ^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error, varargs are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " void foo(List<String>... args) {}\n" +
- " ^^^^\n" +
- "List cannot be resolved to a type\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 2)\n" +
- " void foo(List<String>... args) {}\n" +
- " ^^^^^^\n" +
- "Syntax error, parameterized types are only available if source level is 5.0\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " void foo(List<String>... args) {}\n" +
- " ^^^^\n" +
- "List cannot be resolved to a type\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-public void test0051() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(java.util.List2<String>... args) {}\n" +
- "}\n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " void foo(java.util.List2<String>... args) {}\n" +
- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Syntax error, varargs are only available if source level is 5.0\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 2)\n" +
- " void foo(java.util.List2<String>... args) {}\n" +
- " ^^^^^^^^^^^^^^^\n" +
- "java.util.List2 cannot be resolved to a type\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 2)\n" +
- " void foo(java.util.List2<String>... args) {}\n" +
- " ^^^^^^\n" +
- "Syntax error, parameterized types are only available if source level is 5.0\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " void foo(java.util.List2<String>... args) {}\n" +
- " ^^^^^^^^^^^^^^^\n" +
- "java.util.List2 cannot be resolved to a type\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=154811
-public void test0052() {
- String[] testFiles = new String[] {
- "X.java",
- "public class X {\n" +
- " void foo1() {\n" +
- " class Y {\n" +
- " }\n" +
- " void foo2() {\n" +
- " }\n" +
- " class Z<T> { \n" +
- " }\n" +
- " }\n" +
- "} \n"
- };
-
- String expected13ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 5)\n" +
- " void foo2() {\n" +
- " ^^^^\n" +
- "Syntax error on token \"void\", new expected\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 7)\n" +
- " class Z<T> { \n" +
- " ^^^^^\n" +
- "Syntax error on token \"class\", invalid AssignmentOperator\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 7)\n" +
- " class Z<T> { \n" +
- " ^\n" +
- "Syntax error on token \">\", ; expected\n" +
- "----------\n";
- String expected14ProblemLog =
- expected13ProblemLog;
-
- String expected15ProblemLog =
- "----------\n" +
- "1. ERROR in X.java (at line 5)\n" +
- " void foo2() {\n" +
- " ^^^^\n" +
- "Syntax error on token \"void\", new expected\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 6)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error, insert \";\" to complete Statement\n" +
- "----------\n";
-
- runComplianceParserTest(
- testFiles,
- expected13ProblemLog,
- expected14ProblemLog,
- expected15ProblemLog
- );
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/DietCompletionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/DietCompletionTest.java
deleted file mode 100644
index ed93f7f..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/DietCompletionTest.java
+++ /dev/null
@@ -1,2033 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-import org.eclipse.wst.jsdt.internal.codeassist.complete.InvalidCursorLocation;
-
-public class DietCompletionTest extends AbstractCompletionTest {
-public DietCompletionTest(String testName){
- super(testName);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(DietCompletionTest.class);
-}
-/*
- * Complete on superclass
- */
-public void test01() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends IOException { \n" +
- "} \n";
-
- String completeBehind = "IOEx";
- String expectedCompletionNodeToString = "<CompleteOnClass:IOEx>";
- String completionIdentifier = "IOEx";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends <CompleteOnClass:IOEx> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOException";
- String testName = "<complete on superclass>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on superinterface
- */
-public void test02() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends IOException implements Serializable { \n" +
- " int foo(){} \n" +
- "} \n";
-
- String completeBehind = "Seria";
- String expectedCompletionNodeToString = "<CompleteOnInterface:Seria>";
- String completionIdentifier = "Seria";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends IOException implements <CompleteOnInterface:Seria> {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "Serializable";
- String testName = "<complete on superinterface>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on qualified superclass
- */
-public void test03() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends java.io.IOException { \n" +
- "} \n";
-
- String completeBehind = "IOEx";
- String expectedCompletionNodeToString = "<CompleteOnClass:java.io.IOEx>";
- String completionIdentifier = "IOEx";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends <CompleteOnClass:java.io.IOEx> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "java.io.IOException";
- String testName = "<complete on qualified superclass>";
-
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-
-}
-/*
- * Complete on qualified superinterface
- */
-public void test04() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends IOException implements java.io.Serializable { \n" +
- "} \n";
-
- String completeBehind = "Seria";
- String expectedCompletionNodeToString = "<CompleteOnInterface:java.io.Seria>";
- String completionIdentifier = "Seria";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends IOException implements <CompleteOnInterface:java.io.Seria> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "java.io.Serializable";
- String testName = "<complete on qualified superinterface>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on incomplete superclass
- */
-public void test05() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends IOEx { \n" +
- "} \n";
-
- String completeBehind = "IOEx";
- String expectedCompletionNodeToString = "<CompleteOnClass:IOEx>";
- String completionIdentifier = "IOEx";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends <CompleteOnClass:IOEx> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOEx";
- String testName = "<complete on incomplete superclass>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on incomplete superinterface
- */
-public void test06() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends IOException implements Seria { \n" +
- "} \n";
-
- String completeBehind = "Seria";
- String expectedCompletionNodeToString = "<CompleteOnInterface:Seria>";
- String completionIdentifier = "Seria";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends IOException implements <CompleteOnInterface:Seria> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "Seria";
- String testName = "<complete on incomplete superinterface>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on incomplete qualified superclass
- */
-public void test07() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends java.io.IOEx { \n" +
- "} \n";
-
- String completeBehind = "IOEx";
- String expectedCompletionNodeToString = "<CompleteOnClass:java.io.IOEx>";
- String completionIdentifier = "IOEx";
- String expectedUnitDisplayString = "import java.io.*;\n" +
- "public class X extends <CompleteOnClass:java.io.IOEx> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "java.io.IOEx";
- String testName = "<complete on incomplete qualified superclass>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on incomplete qualified superinterface
- */
-public void test08() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends IOException implements java.io.Seria { \n" +
- "} \n";
-
- String completeBehind = "Seria";
- String expectedCompletionNodeToString = "<CompleteOnInterface:java.io.Seria>";
- String completionIdentifier = "Seria";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends IOException implements <CompleteOnInterface:java.io.Seria> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "java.io.Seria";
- String testName = "<complete on incomplete qualified superinterface>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete inside qualified superclass
- */
-public void test09() {
-
- String str =
- " \n" +
- "public class X extends java.io.IOException { \n" +
- "} \n";
-
- String completeBehind = ".io";
- String expectedCompletionNodeToString = "<CompleteOnClass:java.io>";
- String completionIdentifier = "io";
- String expectedUnitDisplayString =
- "public class X extends <CompleteOnClass:java.io> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "java.io.IOException";
- String testName = "<complete inside qualified superclass>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete inside qualified superinterface
- */
-public void test10() {
-
- String str =
- "public class X extends IOException implements java.io.Serializable { \n" +
- "} \n";
-
- String completeBehind = ".io";
- String expectedCompletionNodeToString = "<CompleteOnInterface:java.io>";
- String completionIdentifier = "io";
- String expectedUnitDisplayString =
- "public class X extends IOException implements <CompleteOnInterface:java.io> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "java.io.Serializable";
- String testName = "<complete inside qualified superinterface>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete inside qualified superclass ending with dot
- */
-public void test11() {
-
- String str =
- " \n" +
- "public class X extends java.io. { \n" +
- "} \n";
-
- String completeBehind = ".io.";
- String expectedCompletionNodeToString = "<CompleteOnClass:java.io.>";
- String completionIdentifier = "";
- String expectedUnitDisplayString =
- "public class X extends <CompleteOnClass:java.io.> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "java.io.";
- String testName = "<complete inside qualified superclass ending with dot>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete inside qualified superinterface ending with dot
- */
-public void test12() {
-
- String str =
- "public class X extends IOException implements java.io. { \n" +
- "} \n";
-
- String completeBehind = ".io.";
- String expectedCompletionNodeToString = "<CompleteOnInterface:java.io.>";
- String completionIdentifier = "";
- String expectedUnitDisplayString =
- "public class X extends IOException implements <CompleteOnInterface:java.io.> {\n" +
- " public X() {\n" +
-
- " }\n" +
- "}\n";
- String expectedReplacedSource = "java.io.";
- String testName = "<complete inside qualified superinterface ending with dot>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on empty superclass
- */
-public void test13() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends { \n" +
- "} \n";
-
- String completeBehind = "extends ";
- String expectedCompletionNodeToString = "<CompleteOnClass:>";
- String completionIdentifier = "";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends <CompleteOnClass:> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "";
- String testName = "<complete on empty superclass>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on empty superinterface
- */
-public void test14() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends IOException implements { \n" +
- "} \n";
-
- String completeBehind = "implements ";
- String expectedCompletionNodeToString = "<CompleteOnInterface:>";
- String completionIdentifier = "";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends IOException implements <CompleteOnInterface:> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "";
- String testName = "<complete on empty superinterface>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on empty superclass followed by identifier
- */
-public void test15() {
-
- String str =
- "public class X extends java.io. IOException { \n" +
- "} \n";
-
- String completeBehind = "java.io.";
- String expectedCompletionNodeToString = "<CompleteOnClass:java.io.>";
- String completionIdentifier = "";
- String expectedUnitDisplayString =
- "public class X extends <CompleteOnClass:java.io.> {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "java.io.";
- String testName = "<complete on empty superclass followed by identifier>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on keyword extends
- */
-public void test16() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends { \n" +
- "} \n";
-
- String completeBehind = "extends";
- String expectedCompletionNodeToString = "<CompleteOnKeyword:extends>";
- String completionIdentifier = "extends";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends <CompleteOnKeyword:extends> {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "extends";
- String testName = "<complete on keyword extends>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete in keyword extends
- */
-public void test17() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X ext { \n" +
- "} \n";
-
- String completeBehind = "ext";
- String expectedCompletionNodeToString = "<CompleteOnKeyword:ext>";
- String completionIdentifier = "ext";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends <CompleteOnKeyword:ext> {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "ext";
- String testName = "<complete in keyword extends>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete in field type
- */
-public void test18() {
-
- String str =
- "class X { \n" +
- " \n" +
- " IOException x; \n" +
- "} \n";
-
- String completeBehind = "IO";
- String expectedCompletionNodeToString = "<CompleteOnType:IO>;";
- String completionIdentifier = "IO";
- String expectedUnitDisplayString =
- "class X {\n" +
- " <CompleteOnType:IO>;\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOException";
- String testName = "<complete in field type>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete at beginning of field type
- */
-public void test19() {
-
- String str =
- "class X { \n" +
- " \n" +
- " final IOException x; \n" +
- "} \n";
-
- String completeBehind = "final ";
- String expectedCompletionNodeToString = "<CompleteOnType:>;";
- String completionIdentifier = "";
- String expectedUnitDisplayString =
- "class X {\n" +
- " <CompleteOnType:>;\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOException";
- String testName = "<complete at beginning of field type>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete at beginning of superclass
- */
-public void test20() {
-
- String str =
- "class X extends IOException { \n" +
- " \n" +
- "} \n";
-
- String completeBehind = "extends ";
- String expectedCompletionNodeToString = "<CompleteOnClass:>";
- String completionIdentifier = "";
- String expectedUnitDisplayString =
- "class X extends <CompleteOnClass:> {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOException";
- String testName = "<complete at beginning of superclass>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete in return type
- */
-public void test21() {
-
- String str =
- "class X { \n" +
- " IOEx \n" +
- "} \n";
-
- String completeBehind = "IOEx";
- String expectedCompletionNodeToString = "<CompleteOnType:IOEx>";
- String completionIdentifier = "IOEx";
- String expectedUnitDisplayString =
- "class X {\n" +
- " <CompleteOnType:IOEx>;\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOEx";
- String testName = "<complete in return type>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete in argument type
- */
-public void test22() {
-
- String str =
- "class X { \n" +
- " int foo(IOEx \n" +
- "} \n";
-
- String completeBehind = "IOEx";
- String expectedCompletionNodeToString = "<CompleteOnType:IOEx>";
- String completionIdentifier = "IOEx";
- String expectedUnitDisplayString =
- "class X {\n" +
- " <CompleteOnType:IOEx>;\n" +
- " X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOEx";
- String testName = "<complete in argument type>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete in return type
- */
-public void test23() {
-
- String str =
- "class X { \n" +
- " IOEx \n" +
- " \n";
-
- String completeBehind = "IOEx";
- String expectedCompletionNodeToString = "<CompleteOnType:IOEx>";
- String completionIdentifier = "IOEx";
- String expectedUnitDisplayString =
- "class X {\n" +
- " <CompleteOnType:IOEx>;\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOEx";
- String testName = "<complete in return type>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete in argument type (no closing brace for type)
- */
-public void test24() {
-
- String str =
- "class X { \n" +
- " int foo(IOEx \n" +
- " \n";
-
- String completeBehind = "IOEx";
- String expectedCompletionNodeToString = "<CompleteOnType:IOEx>";
- String completionIdentifier = "IOEx";
- String expectedUnitDisplayString =
- "class X {\n" +
- " <CompleteOnType:IOEx>;\n" +
- " X() {\n" +
-
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOEx";
- String testName = "<complete in argument type>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete in return type with modifiers
- */
-public void test25() {
-
- String str =
- "class X { \n" +
- " public final IOEx \n" +
- " \n";
-
- String completeBehind = "IOEx";
- String expectedCompletionNodeToString = "<CompleteOnType:IOEx>";
- String completionIdentifier = "IOEx";
- String expectedUnitDisplayString =
- "class X {\n" +
- " <CompleteOnType:IOEx>;\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOEx";
- String testName = "<complete in return type with modifiers>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete in field initialization
- */
-public void test26() {
-
- String str =
- "class X { \n" +
- " public final int x = IOEx \n" +
- " \n";
-
- String completeBehind = "IOEx";
- String expectedCompletionNodeToString = "<CompleteOnName:IOEx>";
- String completionIdentifier = "IOEx";
- String expectedUnitDisplayString =
- "class X {\n" +
- " public final int x = <CompleteOnName:IOEx>;\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOEx";
- String testName = "<complete in field initialization>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete in nth argument type
- */
-public void test27() {
-
- String str =
- "class X { \n" +
- " int foo(AA a, BB b, IOEx \n" +
- " \n";
-
- String completeBehind = "IOEx";
- String expectedCompletionNodeToString = "<CompleteOnType:IOEx>";
- String completionIdentifier = "IOEx";
- String expectedUnitDisplayString =
- "class X {\n" +
- " <CompleteOnType:IOEx>;\n" +
- " X() {\n" +
- " }\n" +
- " int foo(AA a, BB b) {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOEx";
- String testName = "<complete in nth argument type>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete in nth argument qualified type
- */
-public void test28() {
-
- String str =
- "class X { \n" +
- " int foo(AA a, BB b, java.io.IOEx \n" +
- " \n";
-
- String completeBehind = ".io.";
- String expectedCompletionNodeToString = "<CompleteOnType:java.io.>";
- String completionIdentifier = "";
- String expectedUnitDisplayString =
- "class X {\n" +
- " <CompleteOnType:java.io.>;\n" +
- " X() {\n" +
- " }\n" +
- " int foo(AA a, BB b) {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "java.io.IOEx";
- String testName = "<complete in nth argument qualified type>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete in nth thrown exception qualified type
- */
-public void test29() {
-
- String str =
- "class X { \n" +
- " public int foo(AA a, BB b) throws AA, java.io.IOEx \n" +
- " \n";
-
- String completeBehind = ".io";
- String expectedCompletionNodeToString = "<CompleteOnException:java.io>";
- String completionIdentifier = "io";
- String expectedUnitDisplayString =
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " public int foo(AA a, BB b) throws AA, <CompleteOnException:java.io> {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "java.io.IOEx";
- String testName = "<complete in nth thrown exception qualified type>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete in completed argument
- */
-public void test30() {
-
- String str =
- "class X { \n" +
- " public int foo(AA a, java.io.BB b) \n" +
- " \n";
-
- String completeBehind = "io.";
- String expectedCompletionNodeToString = "<CompleteOnType:java.io.>";
- String completionIdentifier = "";
- String expectedUnitDisplayString =
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " public int foo(AA a, <CompleteOnType:java.io.> b) {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "java.io.BB";
- String testName = "<complete in in completed argument>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Negative test: no diet completion in allocation expression
- */
-public void test31() {
-
- String str =
- "class Bar { \n"+
- " void foo() { \n"+
- " new X().zzz(); \n"+
- " } \n"+
- "}\n";
-
- String completeBehind = "new X";
- String expectedCompletionNodeToString = NONE;
- String completionIdentifier = NONE;
- String expectedUnitDisplayString =
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = null;
- String testName = "<no diet completion in allocation expression>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Completion in package statement
- */
-public void test32() {
-
- String str =
- "package x.abc \n"+
- "import x.util.*; \n"+
- "import x.*; \n"+
- "class X extends util{ \n"+
- " X(){} \n"+
- " X(int a, int b){} \n"+
- "} \n";
-
- String completeBehind = "x.ab";
- String expectedCompletionNodeToString = "<CompleteOnPackage:x.ab>";
- String completionIdentifier = "ab";
- String expectedUnitDisplayString =
- "package <CompleteOnPackage:x.ab>;\n" +
- "import x.util.*;\n" +
- "import x.*;\n" +
- "class X extends util {\n" +
- " X() {\n" +
- " }\n" +
- " X(int a, int b) {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "x.abc";
- String testName = "<complete in package statement>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Completion in import statement
- */
-public void test33() {
-
- String str =
- "package x.abc; \n"+
- "import x.util \n"+
- "import x.*; \n"+
- "class X extends util{ \n"+
- " X(){} \n"+
- " X(int a, int b){} \n"+
- "} \n";
-
- String completeBehind = "x.util";
- String expectedCompletionNodeToString = "<CompleteOnImport:x.util>";
- String completionIdentifier = "util";
- String expectedUnitDisplayString =
- "package x.abc;\n" +
- "import <CompleteOnImport:x.util>;\n" +
- "import x.*;\n" +
- "class X extends util {\n" +
- " X() {\n" +
- " }\n" +
- " X(int a, int b) {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "x.util";
- String testName = "<complete in import statement>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on superclass behind a unicode
- *
- * -- compute the unicode representation for a given string --
- [ String str = "IOEx";
- StringBuffer buffer = new StringBuffer("\"");
- for (int i = 0; i < str.length(); i++){
- String hex = Integer.toHexString(str.charAt(i));
- buffer.append("\\u0000".substring(0, 6-hex.length()));
- buffer.append(hex);
- }
- buffer.append("\"");
- buffer.toString()
- ]
- */
-public void test34() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends IOE\\u0078ception { \n" +
- "} \n";
-
- String completeBehind = "IOE\\u0078";
- String expectedCompletionNodeToString = "<CompleteOnClass:IOEx>";
- String completionIdentifier = "IOEx";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends <CompleteOnClass:IOEx> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOE\\u0078ception";
- String testName = "<complete on superclass behind a unicode>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void test34a() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends IOException { \n" +
- "} \n";
-
- String completeBehind = "IOE";
- String expectedCompletionNodeToString = "<CompleteOnClass:IOE>";
- String completionIdentifier = "IOE";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends <CompleteOnClass:IOE> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOException";
- String testName = "<complete on superclass before a unicode>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void test34b() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends IOE\\u0078c\\u0065ption { \n" +
- "} \n";
-
- String completeBehind = "IOE\\u0078c\\u0065p";
- String expectedCompletionNodeToString = "<CompleteOnClass:IOExcep>";
- String completionIdentifier = "IOExcep";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends <CompleteOnClass:IOExcep> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOE\\u0078c\\u0065ption";
- String testName = "<complete on superclass behind a unicode>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-public void test34c() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X \\u0065xt\\u0065nds IOE\\u0078c\\u0065ption { \n" +
- "} \n";
-
- String completeBehind = "IOE\\u0078c\\u0065p";
- String expectedCompletionNodeToString = "<CompleteOnClass:IOExcep>";
- String completionIdentifier = "IOExcep";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X extends <CompleteOnClass:IOExcep> {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOE\\u0078c\\u0065ption";
- String testName = "<complete on superclass behind a unicode>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Invalid completion inside a unicode
- *
- * -- compute the unicode representation for a given string --
- [ String str = "IOEx";
- StringBuffer buffer = new StringBuffer("\"");
- for (int i = 0; i < str.length(); i++){
- String hex = Integer.toHexString(str.charAt(i));
- buffer.append("\\u0000".substring(0, 6-hex.length()));
- buffer.append(hex);
- }
- buffer.append("\"");
- buffer.toString()
- ]
- */
-public void test35() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends IOE\\u0078ception { \n" +
- "} \n";
-
- String completeBehind = "IOE\\u00";
- String expectedCompletionNodeToString = NONE;
- String completionIdentifier = NONE;
- String expectedUnitDisplayString = "";
- String expectedReplacedSource = NONE;
- String testName = "<complete inside unicode>";
-
- try {
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
- assertTrue("failed to detect invalid cursor location", false);
- } catch(InvalidCursorLocation e){
- assertEquals("invalid cursor location: ", e.irritant, InvalidCursorLocation.NO_COMPLETION_INSIDE_UNICODE);
- }
-}
-/*
- * Invalid completion inside a comment
- *
- */
-public void test36() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends /*IOException*/ { \n" +
- "} \n";
-
- String completeBehind = "IOEx";
- String expectedCompletionNodeToString = NONE;
- String completionIdentifier = NONE;
- String expectedUnitDisplayString = "";
- String expectedReplacedSource = NONE;
- String testName = "<complete inside comment>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- try {
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
- assertTrue("failed to detect invalid cursor location", false);
- } catch(InvalidCursorLocation e){
- assertEquals("invalid cursor location: ", e.irritant, InvalidCursorLocation.NO_COMPLETION_INSIDE_COMMENT);
- }
-}
-/*
- * Invalid completion inside a string literal
- *
- */
-public void test37() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X { \n" +
- " String s = \"IOException\"; \n" +
- "} \n";
-
- String completeBehind = "IOEx";
- String expectedCompletionNodeToString = "<CompletionOnString:\"IOEx\">";
- String completionIdentifier = "IOEx";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X {\n" +
- " String s = <CompletionOnString:\"IOEx\">;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "\"IOException\"";
- String testName = "<complete inside a string literal>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Invalid completion inside a number literal
- *
- */
-public void test38() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X { \n" +
- " int s = 12345678; \n" +
- "} \n";
-
- String completeBehind = "1234";
- String expectedCompletionNodeToString = NONE;
- String completionIdentifier = NONE;
- String expectedUnitDisplayString = "";
- String expectedReplacedSource = NONE;
- String testName = "<complete inside a number literal>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- try{
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
- assertTrue("failed to detect invalid cursor location", false);
- } catch(InvalidCursorLocation e){
- assertEquals("invalid cursor location: ", e.irritant, InvalidCursorLocation.NO_COMPLETION_INSIDE_NUMBER);
- }
-}
-/*
- * Completion in import statement at the end of the unit
- */
-public void test39() {
-
- String str =
- "package x.abc; \n"+
- "import x.util";
-
- String completeBehind = "x.util";
- String expectedCompletionNodeToString = "<CompleteOnImport:x.util>";
- String completionIdentifier = "util";
- String expectedUnitDisplayString =
- "package x.abc;\n" +
- "import <CompleteOnImport:x.util>;\n";
- String expectedReplacedSource = "x.util";
- String testName = "<complete in import statement at the end of the unit>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Completion in import statement at the end of the unit (qualified empty name)
- */
-public void test40() {
-
- String str =
- "package a.b; \n"+
- "import java.";
-
- String completeBehind = "java.";
- String expectedCompletionNodeToString = "<CompleteOnImport:java.>";
- String completionIdentifier = "";
- String expectedUnitDisplayString =
- "package a.b;\n" +
- "import <CompleteOnImport:java.>;\n";
- String expectedReplacedSource = "java.";
- String testName = "<complete in import statement at the end of the unit>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Should not find any diet completion
- */
-public void test41() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X extends \n" +
- " int foo(String str) \n" +
- " String variable = ; \n" +
- " { \n" +
- " String variableNotInScope; \n" +
- " } \n" +
- " foo(varia \n";
-
- String completeBehind = "foo(var";
- String expectedCompletionNodeToString = NONE;
- String completionIdentifier = "var";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo(String str) {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "varia";
- String testName = "<should not find diet completion>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on array type with prefix dimensions
- */
-public void test42() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X { \n" +
- " int[] foo(String str) \n";
-
- String completeBehind = "int";
- String expectedCompletionNodeToString = "<CompleteOnType:int>";
- String completionIdentifier = "int";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " <CompleteOnType:int>\n" +
- "}\n";
- String expectedReplacedSource = "int";
- String testName = "<completion on array type with prefix dimensions>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on array type with postfix dimensions
- */
-public void test43() {
-
- String str =
- "import java.io.*; \n" +
- " \n" +
- "public class X { \n" +
- " int foo(String str) [] \n";
-
- String completeBehind = "int";
- String expectedCompletionNodeToString = "<CompleteOnType:int>";
- String completionIdentifier = "int";
- String expectedUnitDisplayString =
- "import java.io.*;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " <CompleteOnType:int>\n" +
- "}\n";
- String expectedReplacedSource = "int";
- String testName = "<completion on array type with postfix dimensions>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete in return type behind other member
- */
-public void test44() {
-
- String str =
- "class X { \n" +
- " int i; \n" +
- " IOEx \n" +
- "} \n";
-
- String completeBehind = "IOEx";
- String expectedCompletionNodeToString = "<CompleteOnType:IOEx>";
- String completionIdentifier = "IOEx";
- String expectedUnitDisplayString =
- "class X {\n" +
- " int i;\n" +
- " <CompleteOnType:IOEx>;\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOEx";
- String testName = "<complete in return type>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete in return type behind other member
- */
-public void test45() {
-
- String str =
- "class X { \n" +
- " int i; \n" +
- " public IOEx \n" +
- "} \n";
-
- String completeBehind = "IOEx";
- String expectedCompletionNodeToString = "<CompleteOnType:IOEx>";
- String completionIdentifier = "IOEx";
- String expectedUnitDisplayString =
- "class X {\n" +
- " int i;\n" +
- " <CompleteOnType:IOEx>;\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "IOEx";
- String testName = "<complete in return type>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on name in field initializer
- */
-public void test46() {
-
- String str =
- "class X { \n" +
- " String s = \"hello\"; \n" +
- " int f = s. \n" +
- "} \n";
-
- String completeBehind = "= s";
- String expectedCompletionNodeToString = "<CompleteOnName:s>";
- String completionIdentifier = "s";
- String expectedUnitDisplayString =
- "class X {\n" +
- " String s;\n" +
- " int f = <CompleteOnName:s>;\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "s";
- String testName = "<complete on name in field initializer>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete in field initializer in innner class
- */
-public void test47() {
-
- String str =
- "class X { \n" +
- " class Y { \n" +
- " Object[] f = { this.foo } \n" +
- " Object foo(){ return this; } \n" +
- "} \n";
-
- String completeBehind = "this.foo";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:this.foo>";
- String completionIdentifier = "foo";
- String expectedUnitDisplayString =
- "class X {\n" +
- " class Y {\n" +
- " Object[] f = {<CompleteOnMemberAccess:this.foo>};\n" +
- " Y() {\n" +
- " }\n" +
- " Object foo() {\n" +
- " }\n" +
- " }\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "this.foo";
- String testName = "<complete in field initializer in inner class>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Should not find fake field of type <CompleteOnType:f>
- */
-public void test48() {
-
- String str =
- "package pack; \n"+
- "class A { \n"+
- " \n"+
- " public static void main(String[] argv) \n"+
- " new Member().f \n"+
- " ; \n"+
- " } \n"+
- " class Member { \n"+
- " int foo() \n"+
- " } \n"+
- " } \n"+
- "}; \n";
-
- String completeBehind = "new Member().f";
- String expectedCompletionNodeToString = NONE;
- String completionIdentifier = "f";
- String expectedUnitDisplayString =
- "package pack;\n" +
- "class A {\n" +
- " class Member {\n" +
- " Member() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- " }\n" +
- " A() {\n" +
- " }\n" +
- " public static void main(String[] argv) {\n" +
- " }\n" +
- "}\n";
-
- String expectedReplacedSource = "f";
- String testName = "<should not find fake field of type f>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Completion in middle of package import statement
- */
-public void test49() {
-
- String str =
- "import java.lang.reflect.*; \n"+
- "class X { \n"+
- "} \n";
-
- String completeBehind = "java.la";
- String expectedCompletionNodeToString = "<CompleteOnImport:java.la>";
- String completionIdentifier = "la";
- String expectedUnitDisplayString =
- "import <CompleteOnImport:java.la>;\n" +
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "java.lang.reflect";
- String testName = "<complete in middle of package import statement>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on instance creation in field initializer.
- */
-public void test50() {
-
- String str =
- "class X { \n" +
- " String s = \"hello\"; \n" +
- " Object o = new Xyz(); \n" +
- "} \n";
-
- String completeBehind = "new X";
- String expectedCompletionNodeToString = "<CompleteOnType:X>";
- String completionIdentifier = "X";
- String expectedUnitDisplayString =
- "class X {\n" +
- " String s;\n" +
- " Object o = new <CompleteOnType:X>();\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "Xyz";
- String testName = "<complete on instance creation in field initializer>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on member access in field initializer.
- */
-public void test51() {
-
- String str =
- "class X { \n" +
- " String s = \"hello\"; \n" +
- " Object o = fred().xyz; \n" +
- "} \n";
-
- String completeBehind = "fred().x";
- String expectedCompletionNodeToString = "<CompleteOnMemberAccess:fred().x>";
- String completionIdentifier = "x";
- String expectedUnitDisplayString =
- "class X {\n" +
- " String s;\n" +
- " Object o = <CompleteOnMemberAccess:fred().x>;\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "xyz";
- String testName = "<complete on member access in field initializer>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on class literal access in field initializer.
- */
-public void test52() {
-
- String str =
- "class X { \n" +
- " String s = \"hello\"; \n" +
- " Class c = int[].class; \n" +
- "} \n";
-
- String completeBehind = "int[].c";
- String expectedCompletionNodeToString = "<CompleteOnClassLiteralAccess:int[].c>";
- String completionIdentifier = "c";
- String expectedUnitDisplayString =
- "class X {\n" +
- " String s;\n" +
- " Class c = <CompleteOnClassLiteralAccess:int[].c>;\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "int[].class";
- String testName = "<complete on class literal access in field initializer>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on method invocation in field initializer.
- */
-public void test53() {
-
- String str =
- "class X { \n" +
- " String s = \"hello\"; \n" +
- " Object o = s.concat(); \n" +
- "} \n";
-
- String completeBehind = "s.concat(";
- String expectedCompletionNodeToString = "<CompleteOnMessageSend:s.concat()>";
- String completionIdentifier = "";
- String expectedUnitDisplayString =
- "class X {\n" +
- " String s;\n" +
- " Object o = <CompleteOnMessageSend:s.concat()>;\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "concat(";
- String testName = "<complete on method invocation in field initializer>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Should not find fake field of type <CompleteOnType:f>
- */
-public void test54() {
-
- String str =
- "package pack; \n"+
- "class A { \n"+
- " \n"+
- " public static void main(String[] argv \n"+
- " new Member().f \n"+
- " ; \n"+
- " } \n"+
- " class Member { \n"+
- " int foo() \n"+
- " } \n"+
- " } \n"+
- "}; \n";
-
- String completeBehind = "new Member().f";
- String expectedCompletionNodeToString = NONE;
- String completionIdentifier = "f";
- String expectedUnitDisplayString =
- "package pack;\n" +
- "class A {\n" +
- " class Member {\n" +
- " Member() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- " }\n" +
- " A() {\n" +
- " }\n" +
- " public static void main(String[] argv) {\n" +
- " }\n" +
- "}\n";
-
- String expectedReplacedSource = "f";
- String testName = "<should not find fake field of type f>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Complete on anonymous type in field initializer.
- */
-public void test55() {
-
- String str =
- "class X { \n" +
- " Object o = new Object(){ \n" +
- " void foo(){ \n" +
- " String x = \"\"; \n" +
- " x.index \n" +
- " } \n" +
- " \n" +
- " void bar(){ \n" +
- " String y = \"\"; \n" +
- " } \n" +
- " }; \n" +
- "} \n";
-
- String completeBehind = "x.index";
- String expectedCompletionNodeToString = "<CompleteOnName:x.index>";
- String completionIdentifier = "index";
- String expectedUnitDisplayString =
- "class X {\n" +
- " Object o = new Object() {\n" +
- " void foo() {\n" +
- " String x;\n" +
- " <CompleteOnName:x.index>;\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " };\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "x.index";
- String testName = "<complete on anonymous type in field initializer>";
-
- int cursorLocation = str.indexOf(completeBehind) + completeBehind.length() - 1;
- this.checkDietParse(
- str.toCharArray(),
- cursorLocation,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/DietRecoveryTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/DietRecoveryTest.java
deleted file mode 100644
index 344e6f0..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/DietRecoveryTest.java
+++ /dev/null
@@ -1,7680 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import java.util.Locale;
-
-import junit.framework.Test;
-
-import org.eclipse.wst.jsdt.core.tests.util.AbstractCompilerTest;
-import org.eclipse.wst.jsdt.core.tests.util.Util;
-import org.eclipse.wst.jsdt.internal.codeassist.complete.CompletionParser;
-import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
-import org.eclipse.wst.jsdt.internal.compiler.DefaultErrorHandlingPolicies;
-import org.eclipse.wst.jsdt.internal.compiler.SourceElementParser;
-import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
-import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.wst.jsdt.internal.compiler.parser.Parser;
-import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblemFactory;
-import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
-
-public class DietRecoveryTest extends AbstractCompilerTest {
- public static boolean optimizeStringLiterals = false;
- public static long sourceLevel = ClassFileConstants.JDK1_3; //$NON-NLS-1$
-static {
-// TESTS_NUMBERS = new int[] { 113 };
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(DietRecoveryTest.class);
-}
-
-public DietRecoveryTest(String testName){
- super(testName);
-}
-
-public void checkParse(
- char[] source,
- String expectedDietUnitToString,
- String expectedDietPlusBodyUnitToString,
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- String expectedFullUnitToString,
- String expectedCompletionDietUnitToString, String testName) {
-
- /* using regular parser in DIET mode */
- {
- Parser parser =
- new Parser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- new CompilerOptions(getCompilerOptions()),
- new DefaultProblemFactory(Locale.getDefault())),
- optimizeStringLiterals);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration computedUnit = parser.dietParse(sourceUnit, compilationResult);
- String computedUnitToString = computedUnit.toString();
- if (!expectedDietUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
- assertEquals(
- "Invalid unit diet structure" + testName,
- expectedDietUnitToString,
- computedUnitToString);
- }
- /* using regular parser in DIET mode + getMethodBodies */
- {
- Parser parser =
- new Parser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- new CompilerOptions(getCompilerOptions()),
- new DefaultProblemFactory(Locale.getDefault())),
- optimizeStringLiterals);
- parser.setMethodsFullRecovery(false);
- parser.setStatementsRecovery(false);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration computedUnit = parser.dietParse(sourceUnit, compilationResult);
- String computedUnitToString = computedUnit.toString();
- if (!expectedDietUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
- assertEquals(
- "Invalid unit diet structure" + testName,
- expectedDietUnitToString,
- computedUnitToString);
- if (computedUnit.types != null) {
- for (int i = computedUnit.types.length; --i >= 0;){
- computedUnit.types[i].parseMethod(parser, computedUnit);
- }
- }
- computedUnitToString = computedUnit.toString();
- if (!expectedDietPlusBodyUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
-
- assertEquals(
- "Invalid unit diet+body structure" + testName,
- expectedDietPlusBodyUnitToString,
- computedUnitToString);
- }
- /* using regular parser in DIET mode + getMethodBodies + statements recovery */
- {
- Parser parser =
- new Parser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- new CompilerOptions(getCompilerOptions()),
- new DefaultProblemFactory(Locale.getDefault())),
- optimizeStringLiterals);
- parser.setMethodsFullRecovery(true);
- parser.setStatementsRecovery(true);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration computedUnit = parser.dietParse(sourceUnit, compilationResult);
- String computedUnitToString = computedUnit.toString();
- if (!expectedDietUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
- assertEquals(
- "Invalid unit diet structure" + testName,
- expectedDietUnitToString,
- computedUnitToString);
- if (computedUnit.types != null) {
- for (int i = computedUnit.types.length; --i >= 0;){
- computedUnit.types[i].parseMethod(parser, computedUnit);
- }
- }
- computedUnitToString = computedUnit.toString();
- if (!expectedDietPlusBodyPlusStatementsRecoveryUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
-
- assertEquals(
- "Invalid unit diet+body structure with statements recovery" + testName,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- computedUnitToString);
- }
- /* using regular parser in FULL mode */
- {
- Parser parser =
- new Parser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- new CompilerOptions(getCompilerOptions()),
- new DefaultProblemFactory(Locale.getDefault())),
- optimizeStringLiterals);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration computedUnit = parser.parse(sourceUnit, compilationResult);
- String computedUnitToString = computedUnit.toString();
- if (!expectedFullUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
- assertEquals(
- "Invalid unit full structure" + testName,
- expectedFullUnitToString,
- computedUnitToString);
-
- }
- /* using source element parser in DIET mode */
- {
- SourceElementParser parser =
- new SourceElementParser(
- new TestSourceElementRequestor(),
- new DefaultProblemFactory(Locale.getDefault()),
- new CompilerOptions(getCompilerOptions()),
- false/*don't record local declarations*/,
- true/*optimize string literals*/);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration computedUnit = parser.dietParse(sourceUnit, compilationResult);
- String computedUnitToString = computedUnit.toString();
- if (!expectedDietUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
- assertEquals(
- "Invalid source element diet structure" + testName,
- expectedDietUnitToString,
- computedUnitToString);
- }
- /* using source element parser in FULL mode */
- {
- SourceElementParser parser =
- new SourceElementParser(
- new TestSourceElementRequestor(),
- new DefaultProblemFactory(Locale.getDefault()),
- new CompilerOptions(getCompilerOptions()),
- false/*don't record local declarations*/,
- true/*optimize string literals*/);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration computedUnit = parser.parse(sourceUnit, compilationResult);
- String computedUnitToString = computedUnit.toString();
- if (!expectedFullUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
- assertEquals(
- "Invalid source element full structure" + testName,
- expectedFullUnitToString,
- computedUnitToString);
- }
- /* using completion parser in DIET mode */
- {
- CompilerOptions options = new CompilerOptions(getCompilerOptions());
- CompletionParser parser =
- new CompletionParser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- options,
- new DefaultProblemFactory(Locale.getDefault())));
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration computedUnit = parser.dietParse(sourceUnit, compilationResult, Integer.MAX_VALUE);
- String computedUnitToString = computedUnit.toString();
- if (!expectedCompletionDietUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
- assertEquals(
- "Invalid completion diet structure" + testName,
- expectedCompletionDietUnitToString,
- computedUnitToString);
- }
-}
-/*
- * Should treat variables 'h' and 'i' as fields since 'public'.
- */
-public void test01() {
-
- String s =
- "package a; \n"
- + "import java.lang.*; \n"
- + "import java.util.*; \n"
- + " \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " \n"
- + " public int h; \n"
- + " public int[] i = { 0, 1 }; \n"
- + " \n"
- + " void bar(){ \n"
- + " void truc(){ \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public int[] i;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<promote local vars into fields>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should filter out local type altogether
- */
-public void test02() {
-
- String s =
- "package a; \n"
- + "import java.lang.*; \n"
- + "import java.util.*; \n"
- + " \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " \n"
- + " class L { \n"
- + " void baz(){} \n"
- + " } \n"
- + " \n"
- + " public int h; \n"
- + " public int[] i = { 0, 1 }; \n"
- + " \n"
- + " void bar(){ \n"
- + " void truc(){ \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class L {\n" +
- " L() {\n" +
- " super();\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public int[] i;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<filter out local type>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should still be finding last method (#baz)
- */
-
-public void test03() {
-
- String s =
- "package a; \n"
- + "import java.lang.*; \n"
- + "import java.util.*; \n"
- + " \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " \n"
- + " public int h; \n"
- + " public int[] i = { 0, 1 }; \n"
- + " \n"
- + " void bar(){ \n"
- + " void baz(){ \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public int[] i;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<should find last method>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should finding 5 fields.
- */
-
-public void test04() {
-
- String s =
- "package a; \n"
- + "import java.lang.*; \n"
- + "import java.util.*; \n"
- + " \n"
- + "public class X { \n"
- + " X x; \n"
- + " Object a, b = null; \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " \n"
- + " public int h; \n"
- + " public int[] i = { 0, 1 }; \n"
- + " \n"
- + " void bar(){ \n"
- + " void truc(){ \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " X x;\n" +
- " Object a;\n" +
- " Object b = null;\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " X x;\n" +
- " Object a;\n" +
- " Object b = null;\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " X x;\n" +
- " Object a;\n" +
- " Object b;\n" +
- " public int h;\n" +
- " public int[] i;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<five fields>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Diet parse thinks it is successful - no recovery
- */
-
-public void test05() {
-
- String s =
- "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " void baz(){} \n"
- + " } \n"
- + " \n"
- + " void bar(){ \n"
- + " } \n"
- + " void truc(){ \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " new baz() {\n" +
- " };\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<diet was successful>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Recovery will not restart from scratch, and miss some signatures (#baz())
- */
-
-public void test06() {
-
- String s =
- "import java.lang.*; \n"
- + " \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " void baz(){} \n"
- + " } \n"
- + " \n"
- + " void bar(){ \n"
- + " } \n"
- + " void truc(){ \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "import java.lang.*;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "import java.lang.*;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<will not miss nested method>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Attaching orphan methods and fields
- */
-
-public void test07() {
-
- String s =
- "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n"
- + " void bar(){ \n"
- + " } \n"
- + " int x; \n"
- + " void baz(){ \n"
- + " } \n"
- + " int y; \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " int x;\n" +
- " int y;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " int x;\n" +
- " int y;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<attaching orphans>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Properly attaching fields/methods to member type
- */
-
-public void test08() {
-
- String s =
- "public class X { \n"
- + " class Y { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " public int h; \n"
- + " public int[] i = {0, 1}; \n"
- + " void bar(){ \n"
- + " void baz(){ \n"
- + " } \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " Y() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " Y() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " public int h;\n" +
- " public int[] i;\n" +
- " Y() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<attaching to member type>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Properly attaching fields/methods to enclosing type
- */
-
-public void test09() {
-
- String s =
- "public class X { \n"
- + " class Y { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " } \n"
- + " public int h; \n"
- + " public int[] i = {0, 1}; \n"
- + " void bar(){ \n"
- + " void baz(){ \n"
- + " } \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " public X() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " }\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " public int h;\n" +
- " public int[] i;\n" +
- " public X() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<attaching to enclosing type>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Properly attaching fields/methods to member type in presence of missing
- * member type opening brace (Y) (and array initializer for (i)).
- */
-
-public void test10() {
-
- String s =
- "public class X { \n"
- + " class Y \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " public int h; \n"
- + " public int[] i = {0, 1}; \n"
- + " void bar(){ \n"
- + " void baz(){ \n"
- + " } \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " Y() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " Y() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " public int h;\n" +
- " public int[] i;\n" +
- " Y() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<missing brace + array initializer>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Attaching orphan methods and fields, by counting brackets
- * variable 'x' should be eliminated (looks like a local variable)
- */
-
-public void test11() {
-
- String s =
- "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n"
- + " void bar(){ \n"
- + " int x; \n"
- + " void baz(){ \n"
- + " } \n"
- + " int y; \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " int y;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " int y;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " void bar() {\n" +
- " int x;\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<attaching orphans with missing brackets>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Attaching orphan methods and fields, by counting brackets
- * variable 'x' should NOT be eliminated given it looks like a field
- */
-
-public void test12() {
-
- String s =
- "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n"
- + " void bar(){ \n"
- + " public int x; \n"
- + " void baz(){ \n"
- + " } \n"
- + " int y; \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public int x;\n" +
- " int y;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public int x;\n" +
- " int y;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<attaching orphans with missing brackets 2>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString ,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should still recover incomplete type signature (missing superclass)
- */
-
-public void test13() {
-
- String s =
- "public class X extends { \n"
- + " void foo() { \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<invalid type header>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should still recover incomplete method signature (missing opening brace)
- */
-
-public void test14() {
-
- String s =
- "public class X extends Thread { \n"
- + " void foo() \n"
- + " void bar() \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "public class X extends Thread {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X extends Thread {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<method header missing opening brace>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should still recover incomplete method signature (missing thrown exceptions)
- */
-
-public void test15() {
-
- String s =
- "public class X extends Thread { \n"
- + " void foo() throws \n"
- + " void bar() \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "public class X extends Thread {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X extends Thread {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class X extends Thread {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " ;\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<method header missing thrown exceptions>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should still recover incomplete type signature (missing superinterfaces)
- */
-
-public void test16() {
-
- String s =
- "public class X implements \n"
- + " void foo() \n"
- + " void bar() \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<type header missing superinterfaces>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should still recover incomplete type signature (missing superinterfaces)
- */
-
-public void test17() {
-
- String s =
- "public class X implements Y, \n"
- + " void foo() \n"
- + " void bar() \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "public class X implements Y {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X implements Y {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<type header missing superinterfaces 2>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should find member type behind incomplete enclosing type header
- */
-
-public void test18() {
-
- String s =
- "public class X implements \n"
- + " class Y { \n"
- + " void bar() \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " super();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<member type behind incomplete enclosing type>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should find member type when missing opening brace
- */
-
-public void test19() {
-
- String s =
- "public class X \n"
- + " class Y { \n"
- + " void bar() \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " super();\n"+
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n"+
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<member type when missing opening brace>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should not find fieldX signature behind missing brace
- */
-
-public void test20() {
-
- String s =
- "public class X \n"
- + " fieldX; \n"
- + " class Y { \n"
- + " void bar() \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " super();\n"+
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n"+
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<no field behind missing brace>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should find Y as member type
- */
-
-public void test21() {
-
- String s =
- "public class X \n"
- + " fieldX; \n"
- + " class Y \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " super();\n"+
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n"+
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should find Y as member type>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should filter out incomplete local type
- */
-
-public void test22() {
-
- String s =
- "package a; \n" +
- "import java.lang.*; \n" +
- "import java.util.*; \n" +
- " \n" +
- "public class X { \n" +
- " void foo() { \n" +
- " System.out.println(); \n" +
- " \n" +
- " class L extends { \n" +
- " public int l; \n" +
- " void baz(){} \n" +
- " } \n" +
- " \n" +
- " public int h; \n" +
- " \n" +
- " void bar(){ \n" +
- " void truc(){ \n" +
- "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public X() {\n" +
- " super();\n"+
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public X() {\n" +
- " super();\n"+
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class L {\n" +
- " public int l;\n" +
- " L() {\n" +
- " super();\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should filter out incomplete local type>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should filter out incomplete local type and method signature
- */
-
-public void test23() {
-
- String s =
- "package a; \n" +
- "import java.lang.*; \n" +
- "import java.util.*; \n" +
- " \n" +
- "public class X { \n" +
- " void foo() { \n" +
- " System.out.println(); \n" +
- " \n" +
- " class L extends { \n" +
- " public int l; \n" +
- " void baz() throws {} \n" +
- " } \n" +
- " \n" +
- " public int h; \n" +
- " \n" +
- " void bar(){ \n" +
- " void truc(){ \n" +
- "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public X() {\n" +
- " super();\n"+
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public X() {\n" +
- " super();\n"+
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class L {\n" +
- " public int l;\n" +
- " L() {\n" +
- " super();\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should filter out incomplete local type/method>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should filter out anonymous type
- */
-
-public void test24() {
-
- String s =
- "package a; \n" +
- "import java.lang.*; \n" +
- "import java.util.*; \n" +
- " \n" +
- "public class X { \n" +
- " void foo() { \n" +
- " System.out.println(); \n" +
- " \n" +
- " new X(){ \n" +
- " void baz() {} \n" +
- " }.baz(); \n" +
- " \n" +
- " public int h; \n" +
- " \n" +
- " void bar(){ \n" +
- " void truc(){ \n" +
- "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " new X() {\n" +
- " void baz() {\n" +
- " }\n" +
- "}.baz();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should filter out incomplete anonymous type/method>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should filter out incomplete anonymous type
- */
-
-public void test25() {
-
- String s =
- "package a; \n" +
- "import java.lang.*; \n" +
- "import java.util.*; \n" +
- " \n" +
- "public class X { \n" +
- " void foo() { \n" +
- " System.out.println(); \n" +
- " \n" +
- " new X(){ \n" +
- " void baz() {} \n" +
- " \n" +
- " public int h; \n" +
- " \n" +
- " void bar(){ \n" +
- " void truc(){ \n" +
- "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n"+
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n"+
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " new X() {\n" +
- " public int h;\n" +
- " void baz() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should filter out incomplete anonymous type>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should filter out incomplete anonymous method
- */
-
-public void test26() {
-
- String s =
- "package a; \n" +
- "import java.lang.*; \n" +
- "import java.util.*; \n" +
- " \n" +
- "public class X { \n" +
- " void foo() { \n" +
- " System.out.println(); \n" +
- " \n" +
- " new X(){ \n" +
- " void baz() \n" +
- " } \n" +
- " } \n" +
- " public int h; \n" +
- " \n" +
- " void bar(){ \n" +
- " void truc(){ \n" +
- "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public X() {\n" +
- " super();\n"+
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public X() {\n" +
- " super();\n"+
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should filter out incomplete anonymous method>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should filter out incomplete local type and local var h
- */
-
-public void test27() {
-
- String s =
- "package a; \n" +
- "import java.lang.*; \n" +
- "import java.util.*; \n" +
- " \n" +
- "public class X { \n" +
- " void foo() { \n" +
- " System.out.println(); \n" +
- " \n" +
- " class L extends { \n" +
- " public int l; \n" +
- " void baz(){} \n" +
- " } \n" +
- " \n" +
- " int h; \n" +
- " \n" +
- " void bar(){ \n" +
- " void truc(){ \n" +
- "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n"+
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n"+
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class L {\n" +
- " public int l;\n" +
- " L() {\n" +
- " super();\n" +
- " }\n" +
- " void baz() {\n" +
- " }\n" +
- " }\n" +
- " int h;\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should filter incomplete local type L and variable h>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should find <y> as a field in Y
- */
-
-public void test28() {
-
- String s =
- "public class X { \n" +
- " int x; \n" +
- " \n" +
- " int foo(){ } \n" +
- " \n" +
- " class Y { \n" +
- " int y; \n" +
- "} \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " int y;\n" +
- " Y() {\n" +
- " }\n" +
- " }\n" +
- " int x;\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " int y;\n" +
- " Y() {\n" +
- " super();\n"+
- " }\n" +
- " }\n" +
- " int x;\n" +
- " public X() {\n" +
- " super();\n"+
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should find <y> as a field in Y>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should find <y> as a field in X
- */
-
-public void test29() {
-
- String s =
- "public class X { \n" +
- " int x; \n" +
- " \n" +
- " int foo(){ } \n" +
- " \n" +
- " class Y { \n" +
- "} \n" +
- " int y; \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " }\n" +
- " int x;\n" +
- " int y;\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " int x;\n" +
- " int y;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should find <y> as a field in X>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should find <y> as a field in X
- */
-
-public void test30() {
-
- String s =
- "public class X { \n" +
- " int x; \n" +
- " \n" +
- " int foo(){ } \n" +
- " \n" +
- " class Y \n" +
- "} \n" +
- " int y; \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " }\n" +
- " int x;\n" +
- " int y;\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " int x;\n" +
- " int y;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should find <y> as a field in X>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should recover from partial method header foo()
- */
-
-public void test31() {
-
- String s =
- "package a; \n"+
- "import java.lang.*; \n"+
- "import java.util.*; \n"+
- " \n"+
- "public class X { \n"+
- " void foo() \n"+
- " System.out.println(); \n"+
- " \n"+
- " public int h; \n"+
- " public int[] i = { 0, 1 }; \n"+
- " \n"+
- " void bar(){ \n"+
- " void truc(){ \n"+
- "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public int[] i = {0, 1};\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "package a;\n" +
- "import java.lang.*;\n" +
- "import java.util.*;\n" +
- "public class X {\n" +
- " public int h;\n" +
- " public int[] i;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void truc() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<should recover from partial method header>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should recover from method with missing argument names
- */
-
-public void test32() {
-
- String s =
- "public class WB2 { \n"+
- " public void foo(java.util.Locale, java.util.Vector) { \n"+
- " int i; \n"+
- " if(i instanceof O) { \n"+
- " } \n"+
- " String s = \"hello\"; \n"+
- " s. \n"+
- " } \n"+
- "} \n";
-
- String expectedDietUnitToString =
- "public class WB2 {\n" +
- " public WB2() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class WB2 {\n" +
- " public WB2() {\n" +
- " super();\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString;
- if(COMPLIANCE_1_3.equals(this.complianceLevel) ||
- COMPLIANCE_1_4.equals(this.complianceLevel)) {
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class WB2 {\n" +
- " public WB2() {\n" +
- " super();\n" +
- " }\n" +
- " public void foo() {\n" +
- " java.util.Locale.java.util.Vector $missing$;\n" +
- " }\n" +
- "}\n";
- } else {
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- expectedDietPlusBodyUnitToString;
- }
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should recover from method with missing argument names>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should not find message with no argument as a constructor
- */
-
-public void test33() {
-
- String s =
- "public class X { \n"+
- " void hello() \n"+
- " public X(int i) \n"+
- " void foo() { \n"+
- " System.out.println(); \n"+
- " \n"+
- "} \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " void hello() {\n" +
- " }\n" +
- " public X(int i) {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " void hello() {\n" +
- " }\n" +
- " public X(int i) {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should not find message with no argument as a constructor>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should not find allocation as a constructor
- */
-
-public void test34() {
-
- String s =
- "public class X { \n"+
- " void hello() \n"+
- " public X(int i) \n"+
- " static void foo() { \n"+
- " X x; \n"+
- " x = new X(23); \n"+
- " System.out.println(); \n"+
- " \n"+
- "} \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " void hello() {\n" +
- " }\n" +
- " public X(int i) {\n" +
- " }\n" +
- " static void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " void hello() {\n" +
- " }\n" +
- " public X(int i) {\n" +
- " super();\n" +
- " }\n" +
- " static void foo() {\n" +
- " X x;\n" +
- " x = new X(23);\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should not find allocation as a constructor>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Incomplete field header
- */
-
-public void test35() {
-
- String s =
- "public class X { \n" +
- " int x \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " int x;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " int x;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<incomplete field header>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Incomplete multiple field headers
- */
-
-public void test36() {
-
- String s =
- "public class X { \n" +
- " int x, y \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " int x;\n" +
- " int y;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " int x;\n" +
- " int y;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<incomplete multiple field headers>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Field header with started string initializer
- */
-
-public void test37() {
-
- String s =
- "public class X { \n" +
- " String s = \" \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " String s;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " String s;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<field header with started string initializer>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Field header with started string initializer combined with incomplete superinterface
- */
-
-public void test38() {
-
- String s =
- "public class X implements Y, { \n" +
- " String s = \" \n";
-
- String expectedDietUnitToString =
- "public class X implements Y {\n" +
- " String s;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X implements Y {\n" +
- " String s;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<field header and incomplete superinterface>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Field signature behind keyword implements
- */
-
-public void test39() {
-
- String s =
- "public class X implements \n"+
- "int x \n"+
- "} \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " int x;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " int x;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<field signature behind keyword implements>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Field type read as interface
- */
-
-public void test40() {
-
- String s =
- "public class X implements Y, \n" +
- " String s = \" \n";
-
- String expectedDietUnitToString =
- "public class X implements Y, String {\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X implements Y, String {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<field type read as interface>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Contiguous headers (checking checkpoint positions)
- */
-
-public void test41() {
-
- String s =
- "public class X public int foo(int bar(static String s";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " static String s;\n" +
- " public X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public int foo() {\n" +
- " }\n" +
- " int bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " static String s;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public int foo() {\n" +
- " }\n" +
- " int bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<contiguous headers>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Contiguous headers without comma (checking checkpoint positions)
- */
-
-public void test42() {
-
- String s =
- "public class X public int foo(int x, int bar public String s;";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public String s;\n" +
- " public X() {\n" +
- " }\n" +
- " public int foo(int x, int bar) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public String s;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " public int foo(int x, int bar) {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<contiguous headers without comma>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Contiguous headers without comma (checking checkpoint positions)
- */
-
-public void test43() {
-
- String s =
- "public class X \n" +
- " public int foo( \n" +
- " int bar( \n" +
- " static String s, int x \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " static String s;\n" +
- " int x;\n" +
- " public X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public int foo() {\n" +
- " }\n" +
- " int bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " static String s;\n" +
- " int x;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public int foo() {\n" +
- " }\n" +
- " int bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<contiguous headers without comma>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should find static field <x>
- */
-
-public void test44() {
-
- String s =
- "class X { \n" +
- " String s; \n" +
- " \n" +
- " public void foo( \n" +
- " static int x \n" +
- "} \n";
-
- String expectedDietUnitToString =
- "class X {\n" +
- " String s;\n" +
- " static int x;\n" +
- " X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " String s;\n" +
- " static int x;\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should find static field x>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Missing string literal quote inside method
- */
-
-public void test45() {
-
- String s =
- "public class X { \n"+
- " int foo(){ \n"+
- " String s = \" \n"+
- " } \n"+
- "} \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<missing string literal quote inside method>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Detecting member type closing when missing brackets
- */
-
-public void test46() {
-
- String s =
- "class X \n"+
- " String s = \"class y \n"+
- " class Member \n"+
- " int foo() \n"+
- " public int x; \n"+
- " } \n"+
- " int bar() \n";
-
- String expectedDietUnitToString =
- "class X {\n" +
- " class Member {\n" +
- " public int x;\n" +
- " Member() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- " }\n" +
- " String s;\n" +
- " X() {\n" +
- " }\n" +
- " int bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " class Member {\n" +
- " public int x;\n" +
- " Member() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- " }\n" +
- " String s;\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " int bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<detecting member type closing when missing brackets>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Unterminated method arguments
- */
-
-public void test47() {
-
- String s =
-
- "class X { \n" +
- " int foo(AA a, BB b, IOEx \n" +
- " \n";
-
- String expectedDietUnitToString =
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " int foo(AA a, BB b) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo(AA a, BB b) {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<unterminated method arguments>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Unterminated literal string in method body
- */
-
-public void test48() {
-
- String s =
- "public class X { \n"+
- " final static int foo(){ \n"+
- " return \"1; \n"+
- " } \n"+
- " public static void main(String argv[]){ \n"+
- " foo(); \n"+
- " } \n"+
- "} \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " static final int foo() {\n" +
- " }\n" +
- " public static void main(String[] argv) {\n" +
- " }\n" +
- "}\n";
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " static final int foo() {\n" +
- " }\n" +
- " public static void main(String[] argv) {\n" +
- " foo();\n" +
- " }\n" +
- "}\n";
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<unterminated literal string in method body>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Unterminated initializer with local declaration
- */
-
-public void test49() {
-
- String s =
- "public class X { \n"+
- " { \n"+
- " int x; \n"+
- " \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<unterminated initializer with local declaration>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Unterminated if statement
- */
-
-public void test50() {
-
- String s =
- "public class X { \n"+
- " int foo(){ \n"+
- " if(true){ \n"+
- " int x; \n"+
- " \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " if (true)\n" +
- " {\n" +
- " int x;\n" +
- " }\n" +
- " else\n" +
- " ;\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<unterminated if statement>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Unterminated nested block with local declaration
- */
-
-public void test51() {
-
- String s =
- "public class X { \n"+
- " int foo(){ \n"+
- " { \n"+
- " int x; \n"+
- " \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " {\n" +
- " int x;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<unterminated nested block with local declaration>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Unterminated nested block with field declaration
- */
-
-public void test52() {
-
- String s =
- "public class X { \n"+
- " int foo(){ \n"+
- " { \n"+
- " public int x; \n"+
- " \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public int x;\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public int x;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<unterminated nested block with field declaration>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Unterminated initializer with field declaration
- */
-
-public void test53() {
-
- String s =
- "public class X { \n"+
- " { \n"+
- " public int x; \n"+
- " \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public int x;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public int x;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<unterminated initializer with field declaration>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Invalid class name
- */
-
-public void test54() {
-
- String s =
- "package p; \n"+
- "public class ZPro.Sev.Blo { \n"+
- "void ThisIsADummyMethodThatIsCreatedOnlyForThePurposesOfTheCompletionEngine() { \n"+
- " System.out.println(this.getClass()); \n"+
- "} \n"+
- " // COMMENT \n"+
- "} \n";
-
- String expectedDietUnitToString =
- "package p;\n" +
- "public class ZPro {\n" +
- " {\n" +
- " }\n" +
- " public ZPro() {\n" +
- " }\n" +
- " void ThisIsADummyMethodThatIsCreatedOnlyForThePurposesOfTheCompletionEngine() {\n" +
- " }\n" +
- "}\n";
- String expectedDietPlusBodyUnitToString =
- "package p;\n" +
- "public class ZPro {\n" +
- " {\n" +
- " }\n" +
- " public ZPro() {\n" +
- " super();\n" +
- " }\n" +
- " void ThisIsADummyMethodThatIsCreatedOnlyForThePurposesOfTheCompletionEngine() {\n" +
- " System.out.println(this.getClass());\n" +
- " }\n" +
- "}\n";
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<Invalid class name>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Unterminated static initializer with field declaration
- */
-
-public void test55() {
-
- String s =
- "public class X { \n"+
- " static { \n"+
- " public int x; \n"+
- " \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " static {\n" +
- " }\n" +
- " public int x;\n" +
- " public X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " static {\n" +
- " }\n" +
- " public int x;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<unterminated static initializer with field declaration>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Multiple initializers combined with array initializer
- */
-
-public void test56() {
-
- String s =
- "public class X \n"+
- " static int zz \n"+
- " { \n"+
- " } \n"+
- " static { \n"+
- " public int x; \n"+
- " int[] y = { 0, 1}; \n"+
- " { \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " static int zz;\n" +
- " {\n" +
- " }\n" +
- " static {\n" +
- " }\n" +
- " public int x;\n" +
- " int[] y = {0, 1};\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " static int zz;\n" +
- " {\n" +
- " }\n" +
- " static {\n" +
- " }\n" +
- " public int x;\n" +
- " int[] y = {0, 1};\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "public class X {\n" +
- " static int zz;\n" +
- " {\n" +
- " }\n" +
- " static {\n" +
- " }\n" +
- " public int x;\n" +
- " int[] y;\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<multiple initializers combined with array initializer>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Combination of unterminated methods and fields
- */
-
-public void test57() {
-
- String s =
- "class X \n"+
- " void foo(){ \n"+
- " { \n"+
- " public static int x; \n"+
- " void bar() \n"+
- " } \n"+
- " int y; \n";
-
- String expectedDietUnitToString =
- "class X {\n" +
- " public static int x;\n" +
- " int y;\n" +
- " X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " public static int x;\n" +
- " int y;\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<combination of unterminated methods and fields>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Illegal unicode inside method body
- */
-
-public void test58() {
-
- String s =
- "package p; \n"+
- " \n"+
- "class A { \n"+
- " void bar() { \n"+
- " String s = \"\\u000D\"; \n"+
- " } \n"+
- "} \n";
-
- String expectedDietUnitToString =
- "package p;\n" +
- "class A {\n" +
- " A() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package p;\n" +
- "class A {\n" +
- " A() {\n" +
- " super();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<illegal unicode inside method body>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Extra identifier in type signature
- */
-
-public void test59() {
-
- String s =
- "public class X extends java.io.IOException IOException { \n" +
- "} \n";
-
- String expectedDietUnitToString =
- "public class X extends java.io.IOException {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X extends java.io.IOException {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<extra identifier in type signature>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Extra identifier in method signature
- */
-
-public void test60() {
-
- String s =
- "public class X extends java.io.IOException { \n" +
- " int foo() ExtraIdentifier { \n" +
- "} \n";
-
- String expectedDietUnitToString =
- "public class X extends java.io.IOException {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X extends java.io.IOException {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<extra identifier in method signature>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Extra identifier behind thrown exception
- */
-
-public void test61() {
-
- String s =
- "public class X extends { \n" +
- " int foo() throws IOException ExtraIdentifier { \n" +
- "} \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() throws IOException {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() throws IOException {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<extra identifier behind thrown exception>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Unterminated array initializer
- */
-
-public void test62() {
-
- String s =
- "class X { \n"+
- " class Y \n"+
- " public String s; \n"+
- " int foo(){ \n"+
- " return 1; \n"+
- " static int y = {; \n"+ // can only be an initializer since type is not array one
- " } \n"+
- " public int i = 0; \n"+
- " \n"+
- " int baz() \n"+
- " \n"+
- "} \n";
-
- String expectedDietUnitToString =
- "class X {\n" +
- " class Y {\n" +
- " public String s;\n" +
- " static int y;\n" +
- " {\n" +
- " }\n" +
- " public int i = 0;\n" +
- " Y() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- " int baz() {\n" +
- " }\n" +
- " }\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " class Y {\n" +
- " public String s;\n" +
- " static int y;\n" +
- " {\n" +
- " ;\n" +
- " }\n" +
- " public int i = 0;\n" +
- " Y() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " int foo() {\n" +
- " return 1;\n" +
- " }\n" +
- " int baz() {\n" +
- " }\n" +
- " }\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "class X {\n" +
- " class Y {\n" +
- " public String s;\n" +
- " static int y;\n" +
- " {\n" +
- " }\n" +
- " public int i;\n" +
- " Y() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- " int baz() {\n" +
- " }\n" +
- " }\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<unterminated array initializer>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Initializer behind array initializer
- */
-
-public void test63() {
-
- String s =
- "class X { \n"+
- " int x[] = {0, 1} \n"+
- " { \n"+
- " } \n"+
- "} \n";
-
- String expectedDietUnitToString =
- "class X {\n" +
- " int[] x = {0, 1};\n" +
- " {\n" +
- " }\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " int[] x = {0, 1};\n" +
- " {\n" +
- " }\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "class X {\n" +
- " int[] x;\n" +
- " {\n" +
- " }\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<initializer behind array initializer>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Initializers mixed with fields
- */
-
-public void test64() {
-
- String s =
- "public class X \n"+
- " int[] x = { 0, 1}; \n"+
- " static int zz \n"+
- " { \n"+
- " } \n"+
- " static { \n"+
- " public int x; \n"+
- " { \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " int[] x = {0, 1};\n" +
- " static int zz;\n" +
- " {\n" +
- " }\n" +
- " static {\n" +
- " }\n" +
- " public int x;\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " int[] x = {0, 1};\n" +
- " static int zz;\n" +
- " {\n" +
- " }\n" +
- " static {\n" +
- " }\n" +
- " public int x;\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "public class X {\n" +
- " int[] x;\n" +
- " static int zz;\n" +
- " {\n" +
- " }\n" +
- " static {\n" +
- " }\n" +
- " public int x;\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<initializers mixed with fields>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should find method behind some()
- */
-
-public void test65() {
-
- String s =
- "import java.lang.*; \n" +
- " \n" +
- "public class Hanoi { \n" +
- "private Post[] posts; \n" +
- "public static void main (String args[]) { \n" +
- "} \n" +
- "public void some(){ \n" +
- " \n" +
- "private void moveDisk (Post source, Post destination) { \n" +
- "} \n" +
- "protected void reportMove (Post source, Post destination) { \n" +
- "} \n" +
- "private void reset () { \n" +
- "} \n" +
- "public void solve () { \n" +
- "} \n" +
- "private void solve (int depth, Post start, Post free, Post end) { \n" +
- "} \n" +
- "} \n";
-
- String expectedDietUnitToString =
- "import java.lang.*;\n" +
- "public class Hanoi {\n" +
- " private Post[] posts;\n" +
- " public Hanoi() {\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " }\n" +
- " public void some() {\n" +
- " }\n" +
- " private void moveDisk(Post source, Post destination) {\n" +
- " }\n" +
- " protected void reportMove(Post source, Post destination) {\n" +
- " }\n" +
- " private void reset() {\n" +
- " }\n" +
- " public void solve() {\n" +
- " }\n" +
- " private void solve(int depth, Post start, Post free, Post end) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "import java.lang.*;\n" +
- "public class Hanoi {\n" +
- " private Post[] posts;\n" +
- " public Hanoi() {\n" +
- " super();\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " }\n" +
- " public void some() {\n" +
- " }\n" +
- " private void moveDisk(Post source, Post destination) {\n" +
- " }\n" +
- " protected void reportMove(Post source, Post destination) {\n" +
- " }\n" +
- " private void reset() {\n" +
- " }\n" +
- " public void solve() {\n" +
- " }\n" +
- " private void solve(int depth, Post start, Post free, Post end) {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should find method behind some()>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should detect X(int) as a method with no return type
- */
-
-public void test66() {
-
- String s =
- "class X { \n"+
- " class Y { \n"+
- " X(int i){} \n"+
- "} \n";
-
- String expectedDietUnitToString =
- "class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " X(int i) {\n" +
- " }\n" +
- " }\n" +
- " X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " super();\n" +
- " }\n" +
- " X(int i) {\n" +
- " }\n" +
- " }\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should detect X(int) as a method with no return type>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should detect orphan X(int) as a constructor
- */
-
-public void test67() {
-
- String s =
- "class X { \n"+
- " class Y { \n"+
- " } \n"+
- "} \n"+
- " X(int i){ \n"+
- " } \n";
-
- String expectedDietUnitToString =
- "class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " }\n" +
- " {\n" +
- " }\n" +
- " X(int i) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " {\n" +
- " }\n" +
- " X(int i) {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should detect orphan X(int) as a constructor>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Empty unit
- */
-
-public void test68() {
-
- String s = "";
-
- String expectedDietUnitToString = "";
-
- String expectedDietPlusBodyUnitToString = expectedDietUnitToString;
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<empty unit>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Unit reduced to a method declaration
- */
-
-public void test69() {
-
- String s =
- " int foo(){ \n" +
- " System.out.println(); \n" +
- " } \n";
-
- String expectedDietUnitToString = "";
-
- String expectedDietPlusBodyUnitToString = expectedDietUnitToString;
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<unit reduced to a method declaration>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Unit reduced to a constructor declaration
- */
-
-public void test70() {
-
- String s =
- " X(){ \n" +
- " System.out.println(); \n" +
- " } \n";
-
- String expectedDietUnitToString = "";
-
- String expectedDietPlusBodyUnitToString = expectedDietUnitToString;
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<unit reduced to a constructor declaration>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Unit reduced to a field declaration
- */
-
-public void test71() {
-
- String s =
- " String str = new String();";
-
- String expectedDietUnitToString = "";
-
- String expectedDietPlusBodyUnitToString = expectedDietUnitToString;
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<unit reduced to a field declaration>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Unit reduced to a field declaration with array initializer
- */
-
-public void test72() {
-
- String s =
- " String[] str = { \"hello\" };";
-
- String expectedDietUnitToString = "";
-
- String expectedDietPlusBodyUnitToString = expectedDietUnitToString;
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<unit reduced to a field declaration with array initializer>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should not pick-up any constructor with no arg
- */
-
-public void test73() {
-
- String s =
- " class X { \n" +
- " X(int i){} \n" +
- " int foo(){ \n" +
- " new X( \n";
-
- String expectedDietUnitToString =
- "class X {\n" +
- " X(int i) {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " X(int i) {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "class X {\n" +
- " X(int i) {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " new X();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should not pick-up any constructor with no arg>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should not detect any field
- */
-
-public void test74() {
-
- String s =
- "package pack; \n" +
- " \n" +
- "class A extends IOException { \n" +
- " \n" +
- " S{ \n" +
- " int x; \n" +
- " } \n" +
- "} \n";
-
- String expectedDietUnitToString =
- "package pack;\n" +
- "class A extends IOException {\n" +
- " {\n" +
- " }\n" +
- " A() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package pack;\n" +
- "class A extends IOException {\n" +
- " {\n" +
- " int x;\n" +
- " }\n" +
- " A() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should not detect any field>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Bunch of syntax errors
- */
-
-public void test75() {
-
- String s =
- "package ZKentTest;\n"+
- "\n"+
- "import java.awt.color.*;\n"+
- "\n"+
- "public class A {\n"+
- " A foo(int i) { return this; }\n"+
- " int[] ii = {0, 1clone()\n"+
- "\n"+
- " int bar() {\n"+
- " class Local {\n"+
- " int hello(){\n"+
- " fo\n"+
- " }\n"+
- " int world()\n"+
- " }\n"+
- " void foo() {\n"+
- " ba \n";
-
- String expectedDietUnitToString =
- "package ZKentTest;\n" +
- "import java.awt.color.*;\n" +
- "public class A {\n" +
- " int[] ii;\n" +
- " public A() {\n" +
- " }\n" +
- " A foo(int i) {\n" +
- " }\n" +
- " int bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package ZKentTest;\n" +
- "import java.awt.color.*;\n" +
- "public class A {\n" +
- " int[] ii;\n" +
- " public A() {\n" +
- " super();\n" +
- " }\n" +
- " A foo(int i) {\n" +
- " return this;\n" +
- " }\n" +
- " int bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "package ZKentTest;\n" +
- "import java.awt.color.*;\n" +
- "public class A {\n" +
- " int[] ii;\n" +
- " public A() {\n" +
- " super();\n" +
- " }\n" +
- " A foo(int i) {\n" +
- " return this;\n" +
- " }\n" +
- " int bar() {\n" +
- " class Local {\n" +
- " Local() {\n" +
- " super();\n" +
- " }\n" +
- " int hello() {\n" +
- " fo = $missing$;\n" +
- " }\n" +
- " int world() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " int hello;\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "package ZKentTest;\n" +
- "import java.awt.color.*;\n" +
- "public class A {\n" +
- " int[] ii;\n" +
- " public A() {\n" +
- " }\n" +
- " A foo(int i) {\n" +
- " }\n" +
- " clone() {\n" +
- " }\n" +
- " int bar() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<bunch of syntax errors>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should find Member as a member type
- */
-
-public void test76() {
-
- String s =
- "package pack; \n"+
- "class A { \n"+
- " \n"+
- " public static void main(String[] argv) \n"+
- " new Member().f \n"+
- " ; \n"+
- " } \n"+
- " class Member { \n"+
- " int foo() \n"+
- " } \n"+
- " } \n"+
- "}; \n";
-
- String expectedDietUnitToString =
- "package pack;\n" +
- "class A {\n" +
- " class Member {\n" +
- " Member() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- " }\n" +
- " A() {\n" +
- " }\n" +
- " public static void main(String[] argv) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package pack;\n" +
- "class A {\n" +
- " class Member {\n" +
- " Member() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- " }\n" +
- " A() {\n" +
- " super();\n" +
- " }\n" +
- " public static void main(String[] argv) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "package pack;\n" +
- "class A {\n" +
- " class Member {\n" +
- " Member() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- " }\n" +
- " A() {\n" +
- " super();\n" +
- " }\n" +
- " public static void main(String[] argv) {\n" +
- " new Member().f = $missing$;\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should find Member as a member type>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should not recover duplicate field numberOfDisks
- */
-
-public void test77() {
-
- String s =
- "package p; \n"+
- " \n"+
- "import java.lang.*; \n"+
- " \n"+
- "class IncompleteHanoi { \n"+
- "private Post[] posts; \n"+
- "private int numberOfDisks; \n"+
- " \n"+
- "public Hanoi (int numberOfDisks) { \n"+
- " this.numberOfDisks = numberOfDisks; \n"+
- "'' this.posts = new Post[3]; \n"+
- " String[] postNames = new String[]{\"Left\", \"Middle\", \"Right\"}; \n"+
- " \n"+
- " for (int i = 0; i < 3; ++i) \n"+
- " this.posts[i] = new Post(postNames[i], numberOfDisks); \n"+
- "} \n"+
- " \n"+
- "private void solve (int depth, Post start, Post free, Post end) { \n"+
- " if (depth == 1) \n"+
- " moveDisk(start, end); \n"+
- " else if (depth > 1) { \n"+
- " sol \n";
-
- String expectedDietUnitToString =
- "package p;\n" +
- "import java.lang.*;\n" +
- "class IncompleteHanoi {\n" +
- " private Post[] posts;\n" +
- " private int numberOfDisks;\n" +
- " IncompleteHanoi() {\n" +
- " }\n" +
- " public Hanoi(int numberOfDisks) {\n" +
- " }\n" +
- " private void solve(int depth, Post start, Post free, Post end) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package p;\n" +
- "import java.lang.*;\n" +
- "class IncompleteHanoi {\n" +
- " private Post[] posts;\n" +
- " private int numberOfDisks;\n" +
- " IncompleteHanoi() {\n" +
- " super();\n" +
- " }\n" +
- " public Hanoi(int numberOfDisks) {\n" +
- " }\n" +
- " private void solve(int depth, Post start, Post free, Post end) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "package p;\n" +
- "import java.lang.*;\n" +
- "class IncompleteHanoi {\n" +
- " private Post[] posts;\n" +
- " private int numberOfDisks;\n" +
- " IncompleteHanoi() {\n" +
- " super();\n" +
- " }\n" +
- " public Hanoi(int numberOfDisks) {\n" +
- " }\n" +
- " private void solve(int depth, Post start, Post free, Post end) {\n" +
- " if ((depth == 1))\n" +
- " moveDisk(start, end);\n" +
- " else\n" +
- " if ((depth > 1))\n" +
- " {\n" +
- " sol = $missing$;\n" +
- " }\n" +
- " else\n" +
- " ;\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should not recover duplicate field numberOfDisks>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should not detect a field v (1/2)
- */
-
-public void test78() {
-
- String s =
- "class X { \n" +
- " int foo(){ \n" +
- " Vector v = new Vector(); \n" +
- " s \n" +
- " v.addElement( \n" +
- " } \n";
-
- String expectedDietUnitToString =
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "class X {\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " Vector v = new Vector();\n" +
- " s v;\n" +
- " addElement();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should not detect a field v>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should not detect a field v (2/2)
- */
-
-public void test79() {
-
- String s =
- "class X { \n" +
- " int foo(){ \n" +
- " Vector v = new Vector(); \n" +
- " public s v.addElement( \n" +
- " } \n";
-
- String expectedDietUnitToString =
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "class X {\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " Vector v = new Vector();\n" +
- " public s v;\n" +
- " addElement();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should not detect a field v>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should not detect a method bar
- */
-
-public void test80() {
-
- String s =
- "class X { \n" +
- " int test(){ \n" +
- " int[] i; \n" +
- " i \n" +
- " // some comment \n" +
- " bar(1); \n" +
- " } \n";
-
- String expectedDietUnitToString =
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " int test() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " int test() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "class X {\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " int test() {\n" +
- " int[] i;\n" +
- " i bar = 1;\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should not detect a method bar>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should not pick-up any constructor with no arg
- */
-
-public void test81() {
-
- String s =
- " class X { \n" +
- " X(int i){} \n" +
- " int foo(){ \n" +
- " X(12) \n";
-
- String expectedDietUnitToString =
- "class X {\n" +
- " X(int i) {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " X(int i) {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "class X {\n" +
- " X(int i) {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " X(12);\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should not pick-up any constructor with no arg>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should not promote message sending as a method
- */
-
-public void test82() {
-
- String s =
- "public class A { \n"+
- " \n"+
- " void foo() \n"+
- " if (true) { \n"+
- " } else { \n"+
- " Bar s; \n"+
- " s.fred(); \n"+
- " } \n"+
- " } \n"+
- "} \n";
- String expectedDietUnitToString =
- "public class A {\n" +
- " public A() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class A {\n" +
- " public A() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " if (true)\n" +
- " {\n" +
- " }\n" +
- " else\n" +
- " {\n" +
- " Bar s;\n" +
- " s.fred();\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should not promote message sending as a method>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should not promote message sending as a method 2
- */
-
-public void test83() {
-
- String s =
- "public class A { \n"+
- " \n"+
- " void foo() if (true) { \n"+
- " } else { \n"+
- " Bar s; \n"+
- " s.fred(); \n"+
- " } \n"+
- " } \n"+
- "} \n";
- String expectedDietUnitToString =
- "public class A {\n" +
- " public A() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class A {\n" +
- " public A() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " if (true)\n" +
- " {\n" +
- " }\n" +
- " else\n" +
- " {\n" +
- " Bar s;\n" +
- " s.fred();\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should not promote message sending as a method>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should find a static initializer
- */
-
-public void test84() {
-
- String s =
- "public class A extends \n" +
- " \n" +
- " static { \n" +
- "} \n";
- String expectedDietUnitToString =
- "public class A {\n" +
- " static {\n" +
- " }\n" +
- " public A() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class A {\n" +
- " static {\n" +
- " }\n" +
- " public A() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should find a static initializer>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should find a static initializer
- */
-
-public void test85() {
-
- String s =
- "public class A \n" +
- " \n" +
- " static { \n" +
- "} \n";
- String expectedDietUnitToString =
- "public class A {\n" +
- " static {\n" +
- " }\n" +
- " public A() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class A {\n" +
- " static {\n" +
- " }\n" +
- " public A() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should find a static initializer>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should find an initializer
- */
-
-public void test86() {
-
- String s =
- "public class A \n" +
- " \n" +
- " int \n" +
- " { \n" +
- "} \n";
- String expectedDietUnitToString =
- "public class A {\n" +
- " {\n" +
- " }\n" +
- " public A() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class A {\n" +
- " {\n" +
- " }\n" +
- " public A() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should find an initializer>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Should find an initializer
- */
-
-public void test87() {
-
- String s =
- "public class A \n" +
- " \n" +
- " int x; \n" +
- " { \n" +
- " int y; \n" +
- "} \n";
- String expectedDietUnitToString =
- "public class A {\n" +
- " int x;\n" +
- " {\n" +
- " }\n" +
- " public A() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class A {\n" +
- " int x;\n" +
- " {\n" +
- " int y;\n" +
- " }\n" +
- " public A() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<should find an initializer>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * 1FVRQG0: ITPCOM:WINNT - NullPointerException in recovery mode
- */
-
-public void test88() {
-
- String s =
- "package p1; \n" +
- " \n" +
- "public class X { \n" +
- " int foo(String s, int x) \n" +
- " public int y = new X() { \n" +
- " \n" +
- "} \n";
-
- String expectedDietUnitToString =
- "package p1;\n" +
- "public class X {\n" +
- " public int y;\n" +
- " public X() {\n" +
- " }\n" +
- " int foo(String s, int x) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "package p1;\n" +
- "public class X {\n" +
- " public int y;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " int foo(String s, int x) {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "package p1;\n" +
- "public class X {\n" +
- " public int y;\n" +
- " public X() {\n" +
- " }\n" +
- " int foo(String s, int x) {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<1FVRQG0: ITPCOM:WINNT - NullPointerException in recovery mode>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * 1FVRN9V: ITPJCORE:WIN98 - Internal builder error compiling servlet
- */
-
-public void test89() {
-
- String s =
- "import javax.servlet.*; \n" +
- "import javax.servlet.http.*; \n" +
- " \n" +
- "public class Servlet1 extends HttpServlet { \n" +
- " protected (HttpServletRequest req, HttpServletResponse resp) { \n" +
- " } \n" +
- "} \n";
-
- String expectedDietUnitToString =
- "import javax.servlet.*;\n" +
- "import javax.servlet.http.*;\n" +
- "public class Servlet1 extends HttpServlet {\n" +
- " HttpServletRequest req;\n" +
- " HttpServletRequest HttpServletResponse;\n" +
- " {\n" +
- " }\n" +
- " public Servlet1() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "import javax.servlet.*;\n" +
- "import javax.servlet.http.*;\n" +
- "public class Servlet1 extends HttpServlet {\n" +
- " HttpServletRequest req;\n" +
- " HttpServletRequest HttpServletResponse;\n" +
- " {\n" +
- " }\n" +
- " public Servlet1() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<1FVRN9V: ITPJCORE:WIN98 - Internal builder error compiling servlet>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * 1FVXQZ4: ITPCOM:WIN98 - Walkback during parsing recovery
- */
-
-public void test90() {
-
- String s =
- "public class Test { \n"+
- " \n"+
- " int x; \n"+
- " int foo( \n"+
- " int bar( \n"+
- " baz(A a \n"+
- "} \n";
- String expectedDietUnitToString =
- "public class Test {\n" +
- " int x;\n" +
- " public Test() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- " int bar() {\n" +
- " }\n" +
- " baz(A a) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class Test {\n" +
- " int x;\n" +
- " public Test() {\n" +
- " super();\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- " int bar() {\n" +
- " }\n" +
- " baz(A a) {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<1FVXQZ4: ITPCOM:WIN98 - Walkback during parsing recovery>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * 1FVXWKI: ITPCOM:WIN98 - Walkback when parsing a bogus interface
- */
-
-public void test91() {
-
- String s =
- "public interface Fred { \n" +
- " void foo(); \n" +
- " void bar(); \n" +
- " public fred(X x, int y); \n" +
- "} \n";
- String expectedDietUnitToString =
- "public interface Fred {\n" +
- " void foo();\n" +
- " void bar();\n" +
- " public fred(X x, int y);\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString = expectedDietUnitToString;
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<1FVXWKI: ITPCOM:WIN98 - Walkback when parsing a bogus interface>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * Variation on 1FVXWKI: ITPCOM:WIN98 - Walkback when parsing a bogus interface
- */
-
-public void test92() {
- String s =
- "public interface Test { \n"+
- " void foo(); \n"+
- " \n"+
- " public fred(Fred x, int y); \n"+
- "} \n";
- String expectedDietUnitToString =
- "public interface Test {\n" +
- " void foo();\n" +
- " public fred(Fred x, int y);\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString = expectedDietUnitToString;
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<1FVXWKI: ITPCOM:WIN98 - Walkback when parsing a bogus interface>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * 1FW5A4E: ITPCOM:WIN98 - Walkback reconciling
- */
-
-public void test93() {
- String s =
- "class X{ \n" +
- " int foo() \n" +
- " static { } \n" +
- "} \n";
- String expectedDietUnitToString =
- "class X {\n" +
- " static {\n" +
- " }\n" +
- " X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " static {\n" +
- " }\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<1FW5A4E: ITPCOM:WIN98 - Walkback reconciling>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * 1FW3663: ITPCOM:WIN98 - Outline - does not show method #fred()
- */
-
-public void test94() {
- String s =
- "public class X { \n" +
- " int[] array; \n" +
- " \n" +
- "void foo() { \n" +
- " bar(this.array.length, 10, fred( \n" +
- " \n" +
- "int fred( \n" +
- "} \n";
- String expectedDietUnitToString =
- "public class X {\n" +
- " int[] array;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " int fred() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " int[] array;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " int fred() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class X {\n" +
- " int[] array;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " bar(this.array.length, 10, fred());\n" +
- " }\n" +
- " int fred() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<1FW3663: ITPCOM:WIN98 - Outline - does not show method #fred()>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * 1FW6M5M: ITPJUI:ALL - NPE in SourceElementParser
- */
-
-public void test95() {
- String s =
- "public interface IP { \n"+
- " public static toString() { \n"+
- " } \n"+
- "} \n";
- String expectedDietUnitToString =
- "public interface IP {\n" +
- " public static toString() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString = expectedDietUnitToString;
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<1FW6M5M: ITPJUI:ALL - NPE in SourceElementParser>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * 1FWHXX7: ITPCOM:WINNT - ClassCastException compiling invalid import
- */
-
-public void test96() {
- String s =
- "import ;\n"+
- "class X {\n"+
- " int foo(){\n"+
- " System.out.println();\n"+
- " }\n"+
- " static {\n"+
- " int i = j;\n"+
- " }\n"+
- "}\n";
- String expectedDietUnitToString =
- "class X {\n" +
- " static {\n" +
- " }\n" +
- " X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " static {\n" +
- " int i = j;\n" +
- " }\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " int foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<1FWHXX7: ITPCOM:WINNT - ClassCastException compiling invalid import>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * variation on 1FWHXX7: ITPCOM:WINNT - ClassCastException compiling invalid import
- */
-
-public void test97() {
- String s =
- "import ;\n"+
- "class X {\n"+
- " int foo(){\n"+
- " System.out.println();\n"+
- " }\n"+
- " static {\n"+
- " }\n"+
- "}\n";
- String expectedDietUnitToString =
- "class X {\n" +
- " static {\n" +
- " }\n" +
- " X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " int foo() {\n" +
- " }\n" +
- "}\n";
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " static {\n" +
- " }\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " int foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<variation on 1FWHXX7: ITPCOM:WINNT - ClassCastException compiling invalid import>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-/*
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=9084
- */
-
-public void test98() {
-
- String s =
- "public class A { \n"+
- " class Platform { \n"+
- " public static void run(Runnable r) { \n"+
- " } \n"+
- " } \n"+
- " Object [] array = null; \n"+
- " for (int nX = 0; nX < array.length; nX ++) { \n"+
- " final String part = \"\"; \n"+
- " final String sel = \"\"; \n"+
- " Object l = null; \n"+
- " if ((part != null && sel != null) || l instanceof String) { \n"+
- " Platform.run(new Runnable() { \n"+
- " public void run() { \n"+
- " } \n"+
- " public void handleException(Throwable e) { \n"+
- " } \n"+
- " }); \n"+
- " } \n"+
- " } \n"+
- "} \n";
-
- String expectedDietUnitToString =
- "public class A {\n"+
- " class Platform {\n"+
- " Platform() {\n"+
- " }\n"+
- " public static void run(Runnable r) {\n"+
- " }\n"+
- " }\n"+
- " Object[] array = null;\n"+
- " int nX = 0;\n"+
- " {\n"+
- " }\n"+
- " public A() {\n"+
- " }\n"+
- "}\n";
-
-
- String expectedDietPlusBodyUnitToString = "public class A {\n"+
- " class Platform {\n"+
- " Platform() {\n"+
- " super();\n"+
- " }\n"+
- " public static void run(Runnable r) {\n"+
- " }\n"+
- " }\n"+
- " Object[] array = null;\n"+
- " int nX = 0;\n"+
- " {\n"+
- " final String part = \"\";\n"+
- " final String sel = \"\";\n"+
- " Object l = null;\n"+
- " if ((((part != null) && (sel != null)) || (l instanceof String)))\n"+
- " {\n"+
- " Platform.run(new Runnable() {\n"+
- " public void run() {\n"+
- " }\n"+
- " public void handleException(Throwable e) {\n"+
- " }\n"+
- "});\n"+
- " }\n"+
- " }\n"+
- " public A() {\n"+
- " super();\n"+
- " }\n"+
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "public class A {\n"+
- " class Platform {\n"+
- " Platform() {\n"+
- " }\n"+
- " public static void run(Runnable r) {\n"+
- " }\n"+
- " }\n"+
- " Object[] array;\n"+
- " int nX;\n"+
- " {\n"+
- " }\n"+
- " public A() {\n"+
- " }\n"+
- "}\n";
-
- String testName = "<check for null inside RecoveredInitializer>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-
-public void test99() {
- String s =
- "import ;\n"+
- "class X {\n"+
- "}\n"+
- "- public void addThreadFilter(IJavaThread thread) - restricts breakpoint to \n"+
- "given thread and any other previously specified threads\n"+
- "- public void removeThreadFilter(IJavaThread thread)- removes the given thread \n"+
- "restriction (will need to re-create breakpoint request as JDI does not support \n"+
- "the removal of thread filters)\n"+
- "- public IJavaThread[] getThreadFilters() - return the set of threads this \n"+
- "breakpoint is currently restricted to\n";
- String expectedDietUnitToString =
- "class X {\n" +
- " {\n" +
- " }\n" +
- " X() {\n" +
- " }\n" +
- " public void addThreadFilter(IJavaThread thread) {\n" +
- " }\n" +
- " public void removeThreadFilter(IJavaThread thread) {\n" +
- " }\n" +
- " public IJavaThread[] getThreadFilters() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "class X {\n" +
- " {\n" +
- " }\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " public void addThreadFilter(IJavaThread thread) {\n" +
- " }\n" +
- " public void removeThreadFilter(IJavaThread thread) {\n" +
- " }\n" +
- " public IJavaThread[] getThreadFilters() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "class X {\n" +
- " {\n" +
- " }\n" +
- " X() {\n" +
- " super();\n" +
- " }\n" +
- " public void addThreadFilter(IJavaThread thread) {\n" +
- " restricts breakpoint;\n" +
- " given thread;\n" +
- " any other;\n" +
- " specified = $missing$;\n" +
- " }\n" +
- " public void removeThreadFilter(IJavaThread thread) {\n" +
- " removes the;\n" +
- " thread restriction;\n" +
- " will need = (re - create);\n" +
- " request as;\n" +
- " does not;\n" +
- " the removal;\n" +
- " thread = $missing$;\n" +
- " }\n" +
- " public IJavaThread[] getThreadFilters() {\n" +
- " return the;\n" +
- " of threads;\n" +
- " breakpoint is;\n" +
- " restricted to;\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<9101 - Parse error while typing in Java editor>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-public void test100() {
- String s =
- "public class Bug {\n" +
- " static boolean bold = false;\n" +
- "public static void main(String arguments[]) {\n" +
- " Shell shell = new Shell(SWT.MENU | SWT.RESIZE | SWT.TITLE | SWT.H_SCROLL);\n" +
- " StyledText text = new StyledText(shell, SWT.WRAP); \n" +
- " shell.addListener(SWT.Resize, new Listener() {\n" +
- " public void handleEvent(Event e) {\n" +
- " text.setBounds(shell.getClientArea()); \n" +
- " } \n" +
- " }); \n" +
- " shell.addListener(SWT.KeyDown, bew Listener () {\n" +
- " public void handleEvent(Event e) {\n" +
- " bold = !bold;\n" +
- " }\n" +
- " }); \n" +
- " text.addLineStyleListener(new LineStyleListener() { \n" +
- " public void lineGetStyle(LineStyleEvent event) {\n" +
- " }\n" +
- " });\n" +
- "}\n" +
- "}\n";
-
- String expectedDietUnitToString =
- "public class Bug {\n" +
- " static boolean bold = false;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public Bug() {\n" +
- " }\n" +
- " public static void main(String[] arguments) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class Bug {\n" +
- " static boolean bold = false;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public Bug() {\n" +
- " super();\n" +
- " }\n" +
- " public static void main(String[] arguments) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class Bug {\n" +
- " static boolean bold = false;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public Bug() {\n" +
- " super();\n" +
- " }\n" +
- " public static void main(String[] arguments) {\n" +
- " Shell shell = new Shell((((SWT.MENU | SWT.RESIZE) | SWT.TITLE) | SWT.H_SCROLL));\n" +
- " StyledText text = new StyledText(shell, SWT.WRAP);\n" +
- " shell.addListener(SWT.Resize, new Listener() {\n" +
- " public void handleEvent(Event e) {\n" +
- " text.setBounds(shell.getClientArea());\n" +
- " }\n" +
- "});\n" +
- " shell.addListener(SWT.KeyDown, new Listener() {\n" +
- " public void handleEvent(Event e) {\n" +
- " bold = (! bold);\n" +
- " }\n" +
- "});\n" +
- " text.addLineStyleListener(new LineStyleListener() {\n" +
- " public void lineGetStyle(LineStyleEvent event) {\n" +
- " }\n" +
- "});\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- "public class Bug {\n" +
- " static boolean bold = false;\n" +
- " public Bug() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public static void main(String[] arguments) {\n" +
- " }\n" +
- " bew Listener() {\n" +
- " }\n" +
- " public void handleEvent(Event e) {\n" +
- " }\n" +
- "}\n";
-
- String expectedCompletionDietUnitToString =
- "public class Bug {\n" +
- " static boolean bold;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public Bug() {\n" +
- " }\n" +
- " public static void main(String[] arguments) {\n" +
- " }\n" +
- "}\n";
-
- String testName = "<10616 - local type outside method>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-public void _test101() {
- String s =
- "public class X { \n"+
- " Object foo(Stack<X> s) { \n"+
- " } \n"+
- " List<T> bar(int pos, T x1, T x2, List<T> l) { \n"+
- " } \n"+
- "} \n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " Object foo() {\n" +
- " }\n" +
- " bar(int pos, T x1, T x2) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " Object foo() {\n" +
- " }\n" +
- " bar(int pos, T x1, T x2) {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<12387 out of memory with generics>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-public void test102() {
- String s =
- "void ___eval() { \n"+
- "new Runnable(){ \n"+
- "void ___run() throws Throwable { \n"+
- "return blah; \n"+
- "} \n"+
- "private String blarg; \n"+
- "public void run (){ \n"+
- " class Local { \n" +
- " void baz() { \n"+
- " } \n" +
- " } \n"+
- "} \n"+
- "} \n"+
- ";} \n"+
- "public class Hello{ \n"+
- "private static int x; \n"+
- "private String blah; \n"+
- "public static void main (String[] args){ \n"+
- "} \n"+
- "public void hello (){ \n"+
- "} \n"+
- "public boolean blah (){ \n"+
- "return false;} \n"+
- "public void foo (){ \n"+
- "} \n"+
- "} \n";
-
- String expectedDietUnitToString =
- "public class Hello {\n" +
- " private static int x;\n" +
- " private String blah;\n" +
- " public Hello() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " }\n" +
- " public void hello() {\n" +
- " }\n" +
- " public boolean blah() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n" ;
-
- String expectedDietPlusBodyUnitToString =
- "public class Hello {\n" +
- " private static int x;\n" +
- " private String blah;\n" +
- " public Hello() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public static void main(String[] args) {\n" +
- " }\n" +
- " public void hello() {\n" +
- " }\n" +
- " public boolean blah() {\n" +
- " return false;\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<12454 - handling toplevel anonymous>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-public void test103() {
- String s =
- "public class X{ \n"+
- " void foo(int x, int y, void z";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " void z;\n" +
- " public X() {\n" +
- " }\n" +
- " void foo(int x, int y) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " void z;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo(int x, int y) {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<14038 - third argument type is void>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-public void test104() {
- String s =
- "public class P#AField {\n" +
- " public void setP#A(String P#A) {\n" +
- " this.P#A = P#A;\n" +
- " }\n" +
- "}";
-
- String expectedDietUnitToString =
- "public class P {\n" +
- " {\n" +
- " }\n" +
- " public void setP;\n" +
- " public P() {\n" +
- " }\n" +
- " A(String P) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class P {\n" +
- " {\n" +
- " }\n" +
- " public void setP;\n" +
- " public P() {\n" +
- " super();\n" +
- " }\n" +
- " A(String P) {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString = expectedDietUnitToString;
-
- String testName = "<16126>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-public void test105() {
- String s =
- "public class X {\n" +
- " static int foo(int[] a, int[] b) {\n" +
- " return 0;\n" +
- " }\n" +
- " static int B =\n" +
- " foo(\n" +
- " new int[]{0, 0},\n" +
- " new int[]{0, 0}\n" +
- " );\n" +
- " #\n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " static int B = foo(new int[]{0, 0}, new int[]{0, 0});\n" +
- " public X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " static int foo(int[] a, int[] b) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " static int B = foo(new int[]{0, 0}, new int[]{0, 0});\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " static int foo(int[] a, int[] b) {\n" +
- " return 0;\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "public class X {\n" +
- " static int B;\n" +
- " {\n" +
- " }\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " static int foo(int[] a, int[] b) {\n" +
- " }\n" +
- "}\n";
-
- String testName = "";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-public void test106() {
- String s =
- "public class X {\n" +
- " clon\n" +
- " foo();\n" +
- "}\n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " clon foo();\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " clon foo();\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietPlusBodyUnitToString;
-
- String expectedCompletionDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " clon foo();\n" +
- "}\n";
-
- String testName = "";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-public void test107() {
- String s =
- "public class X {\n" +
- " int[] a = new int[]{0, 0}, b = new int[]{0, 0};\n" +
- " #\n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " int[] a = new int[]{0, 0};\n" +
- " int[] b = new int[]{0, 0};\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " int[] a = new int[]{0, 0};\n" +
- " int[] b = new int[]{0, 0};\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "public class X {\n" +
- " int[] a;\n" +
- " int[] b;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-public void test108() {
- String s =
- "public class X {\n" +
- " int a = new int[]{0, 0}, b = new int[]{0, 0};\n" +
- " #\n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " int a = new int[]{0, 0};\n" +
- " int b = new int[]{0, 0};\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " int a = new int[]{0, 0};\n" +
- " int b = new int[]{0, 0};\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "public class X {\n" +
- " int a;\n" +
- " {\n" +
- " }\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-public void test109() {
- String s =
- "public class X {\n" +
- " Object o = new Object() {\n" +
- " void foo() {\n" +
- " try {\n" +
- " } catch(Exception e) {\n" +
- " e.\n" +
- " }\n" +
- " }\n" +
- " };\n" +
- "}";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " Object o;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " Object o;\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "public class X {\n" +
- " Object o;\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-public void test110() {
- String s =
- "public class X {\n" +
- " void bar(){\n" +
- " #\n" +
- " class Inner {\n" +
- " void foo() {\n" +
- " try {\n" +
- " } catch(Exception e) {\n" +
- " e.\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void bar() {\n" +
- " class Inner {\n" +
- " Inner() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " try \n" +
- " {\n" +
- " }\n" +
- " catch (Exception e) {\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- "}\n";
-
- String testName = "";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-public void test111() {
- String s =
- "public class X {\n" +
- " void bar(){\n" +
- " }\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- expectedDietUnitToString;
-
- String testName = "";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=100797
-public void test112() {
- String s =
- "public class X {\n"+
- " public void foo()\n"+
- " try { \n"+
- " } catch (Exception e) {\n"+
- " bar(\"blabla\");\n"+
- " throw new Exception(prefix \"bloblo\");\n"+
- " }\n"+
- " }\n"+
- "}\n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " public void foo() {\n" +
- " try \n" +
- " {\n" +
- " }\n" +
- " catch (Exception e) {\n" +
- " bar(\"blabla\");\n" +
- " throw new Exception(prefix);\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- expectedDietUnitToString;
-
- String testName = "";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=111618
-public void test113() {
- String s =
- "public class X {\n"+
- " public void foo(Object[] tab)\n"+
- " for (Object o : tab) {\n"+
- " o.toString();\n"+
- " }\n"+
- " }\n"+
- "}\n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo(Object[] tab) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " public void foo(Object[] tab) {\n" +
- " for (Object o : tab) \n" +
- " {\n" +
- " o.toString();\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- expectedDietUnitToString;
-
- String testName = "test foreach toString";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=129142
-public void test114() {
- String s =
- "public class X {\n"+
- " public void foo() {\n"+
- " int int;\n"+
- " }\n"+
- "}\n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " public void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " public void foo() {\n" +
- " int $missing$;\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- expectedDietUnitToString;
-
- String testName = "test foreach toString";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=80339
-public void test115() {
- String s =
- "public interface Test {\n"+
- " public void myMethod()\n"+
- "}\n";
-
- String expectedDietUnitToString =
- "public interface Test {\n" +
- " public void myMethod() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public interface Test {\n" +
- " public void myMethod() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public interface Test {\n" +
- " public void myMethod() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- expectedDietUnitToString;
-
- String testName = "test foreach toString";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=80339
-public void test116() {
- String s =
- "public interface Test {\n"+
- " public void myMethod()\n"+
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietUnitToString =
- "public interface Test {\n" +
- " public void myMethod() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public interface Test {\n" +
- " public void myMethod() {\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public interface Test {\n" +
- " public void myMethod() {\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- expectedDietUnitToString;
-
- String testName = "test foreach toString";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=154811
-public void test117() {
- String s =
- "public class X {\n" +
- " void foo1() {\n" +
- " class Y {\n" +
- " }\n" +
- " void foo2() {\n" +
- " }\n" +
- " class Z<T> { \n" +
- " }\n" +
- " }\n" +
- "} \n";
-
- String expectedDietUnitToString = null;
- String expectedDietPlusBodyUnitToString = null;
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString = null;
- String expectedFullUnitToString = null;
- String expectedCompletionDietUnitToString = null;
-
-
- if(COMPLIANCE_1_3.equals(this.complianceLevel) ||
- COMPLIANCE_1_4.equals(this.complianceLevel)) {
-
- expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo1() {\n" +
- " }\n" +
- "}\n";
-
- expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo1() {\n" +
- " }\n" +
- "}\n";
-
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo1() {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " class Z<T> {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- expectedFullUnitToString =
- "public class X {\n" +
- " class Z<T> {\n" +
- " Z() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " void foo1() {\n" +
- " }\n" +
- " void foo2() {\n" +
- " }\n" +
- "}\n";
-
- expectedCompletionDietUnitToString =
- expectedDietUnitToString;
- } else if(this.complianceLevel.compareTo(COMPLIANCE_1_5) >= 0) {
-
- expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo1() {\n" +
- " }\n" +
- "}\n";
-
- expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo1() {\n" +
- " }\n" +
- "}\n";
-
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo1() {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " new foo2() {\n" +
- " };\n" +
- " class Z<T> {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- expectedFullUnitToString =
- "public class X {\n" +
- " class Z<T> {\n" +
- " Z() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " void foo1() {\n" +
- " }\n" +
- " void foo2() {\n" +
- " }\n" +
- "}\n";
-
- expectedCompletionDietUnitToString =
- expectedDietUnitToString;
- }
-
- String testName = "test foreach toString";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=154811
-public void test117_2() {
- String s =
- "public class X {\n" +
- " void foo1() {\n" +
- " class Y {\n" +
- " }\n" +
- " void foo2() {\n" +
- " }\n" +
- " class Z { \n" +
- " }\n" +
- " }\n" +
- "} \n";
-
- String expectedDietUnitToString = null;
- String expectedDietPlusBodyUnitToString = null;
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString = null;
- String expectedFullUnitToString = null;
- String expectedCompletionDietUnitToString = null;
-
- expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo1() {\n" +
- " }\n" +
- "}\n";
-
- expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo1() {\n" +
- " }\n" +
- "}\n";
-
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo1() {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " new foo2() {\n" +
- " };\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- expectedFullUnitToString =
- "public class X {\n" +
- " class Z {\n" +
- " Z() {\n" +
- " }\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- " void foo1() {\n" +
- " }\n" +
- " void foo2() {\n" +
- " }\n" +
- "}\n";
-
- expectedCompletionDietUnitToString =
- expectedDietUnitToString;
-
- String testName = "test foreach toString";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=162056
-public void test118() {
- String s =
- "interface Irrelevant {}\n"+
- "interface I {\n"+
- " Object foo(Number n);\n"+
- "}\n"+
- "interface J extends I {\n"+
- " String foo(Number n);\n"+
- "}\n"+
- "interface K {\n"+
- " Object foo(Number n);\n"+
- "}\n"+
- "public class {\n"+
- " void foo() {\n"+
- "\n"+
- " }\n"+
- "} \n";
-
- String expectedDietUnitToString =
- "interface Irrelevant {\n" +
- "}\n" +
- "interface I {\n" +
- " Object foo(Number n);\n" +
- "}\n" +
- "interface J extends I {\n" +
- " String foo(Number n);\n" +
- "}\n" +
- "interface K {\n" +
- " Object foo(Number n);\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "interface Irrelevant {\n" +
- "}\n" +
- "interface I {\n" +
- " Object foo(Number n);\n" +
- "}\n" +
- "interface J extends I {\n" +
- " String foo(Number n);\n" +
- "}\n" +
- "interface K {\n" +
- " Object foo(Number n);\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- expectedDietPlusBodyUnitToString;
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- expectedDietUnitToString;
-
- String testName = "test foreach toString";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=162056
-public void test119() {
- String s =
- "interface Irrelevant {}\n"+
- "interface I {\n"+
- " Object foo(Number n);\n"+
- "}\n"+
- "interface J extends I {\n"+
- " String foo(Number n);\n"+
- "}\n"+
- "abstract class K {\n"+
- " abstract Object foo(Number n);\n"+
- "}\n"+
- "public class {\n"+
- " void foo() {\n"+
- "\n"+
- " }\n"+
- "} \n";
-
- String expectedDietUnitToString =
- "interface Irrelevant {\n" +
- "}\n" +
- "interface I {\n" +
- " Object foo(Number n);\n" +
- "}\n" +
- "interface J extends I {\n" +
- " String foo(Number n);\n" +
- "}\n" +
- "abstract class K {\n" +
- " {\n" +
- " }\n" +
- " K() {\n" +
- " }\n" +
- " abstract Object foo(Number n);\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "interface Irrelevant {\n" +
- "}\n" +
- "interface I {\n" +
- " Object foo(Number n);\n" +
- "}\n" +
- "interface J extends I {\n" +
- " String foo(Number n);\n" +
- "}\n" +
- "abstract class K {\n" +
- " {\n" +
- " }\n" +
- " K() {\n" +
- " super();\n" +
- " }\n" +
- " abstract Object foo(Number n);\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- expectedDietPlusBodyUnitToString;
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- expectedDietUnitToString;
-
- String testName = "test foreach toString";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=140980
-public void test120() {
- String s =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " try {\n" +
- " System.out.println(); \n" +
- " } catch (Exception e) {\n" +
- " }\n" +
- " class Z {}\n" +
- " }\n" +
- "}\n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " try \n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " catch (Exception e) {\n" +
- " }\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- expectedDietUnitToString;
-
- String testName = "test foreach toString";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=140980
-public void test121() {
- String s =
- "public class X {\n" +
- " void foo() {\n" +
- " #\n" +
- " try {\n" +
- " System.out.println(); \n" +
- " } catch (Exception e) {\n" +
- " class Z {}\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedDietUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " try \n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " catch (Exception e) {\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- expectedDietUnitToString;
-
- String testName = "test foreach toString";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=140980
-public void test122() {
- String s =
- "public class Test\n" +
- "{\n" +
- " public void func1()\n" +
- " {\n" +
- " try\n" +
- " {\n" +
- " catch ( Exception exception)\n" +
- " {\n" +
- " exception.printStackTrace();\n" +
- " }\n" +
- " }\n" +
- "\n" +
- " class Clazz\n" +
- " {\n" +
- " }\n" +
- "}\n" +
- "\n";
-
- String expectedDietUnitToString =
- "public class Test {\n" +
- " public Test() {\n" +
- " }\n" +
- " public void func1() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class Test {\n" +
- " public Test() {\n" +
- " super();\n" +
- " }\n" +
- " public void func1() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class Test {\n" +
- " public Test() {\n" +
- " super();\n" +
- " }\n" +
- " public void func1() {\n" +
- " try \n" +
- " {\n" +
- " }\n" +
- " catch (Exception exception) {\n" +
- " exception.printStackTrace();\n" +
- " }\n" +
- " class Clazz {\n" +
- " Clazz() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- expectedDietUnitToString;
-
- String testName = "test foreach toString";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=140980
-public void test123() {
- String s =
- "public class SwitchBug {\n" +
- " void aMethod() {\n" +
- " int i=0;\n" +
- " try {\n" +
- " switch( i ) {\n" +
- " } catch( Exception ex ) {\n" +
- " }\n" +
- " }\n" +
- " class Nested {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietUnitToString =
- "public class SwitchBug {\n" +
- " public SwitchBug() {\n" +
- " }\n" +
- " void aMethod() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class SwitchBug {\n" +
- " public SwitchBug() {\n" +
- " super();\n" +
- " }\n" +
- " void aMethod() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class SwitchBug {\n" +
- " public SwitchBug() {\n" +
- " super();\n" +
- " }\n" +
- " void aMethod() {\n" +
- " int i = 0;\n" +
- " try \n" +
- " {\n" +
- " switch (i) {\n" +
- " }\n" +
- " }\n" +
- " catch (Exception ex) {\n" +
- " }\n" +
- " class Nested {\n" +
- " Nested() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString = expectedDietUnitToString;
-
- String expectedCompletionDietUnitToString =
- expectedDietUnitToString;
-
- String testName = "test foreach toString";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=157570
-public void test124() {
- String s =
- "public class Test {\n" +
- " void aMethod() {\n" +
- " public static void m1()\n" +
- " {\n" +
- " int a;\n" +
- " int b;\n" +
- " }\n" +
- " public static void m2()\n" +
- " {\n" +
- " int c;\n" +
- " int d;\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedDietUnitToString =
- "public class Test {\n" +
- " public Test() {\n" +
- " }\n" +
- " void aMethod() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyUnitToString =
- "public class Test {\n" +
- " public Test() {\n" +
- " super();\n" +
- " }\n" +
- " void aMethod() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyPlusStatementsRecoveryUnitToString = null;
- if(COMPLIANCE_1_3.equals(this.complianceLevel) ||
- COMPLIANCE_1_4.equals(this.complianceLevel)) {
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class Test {\n" +
- " public Test() {\n" +
- " super();\n" +
- " }\n" +
- " void aMethod() {\n" +
- " m1();\n" +
- " {\n" +
- " int a;\n" +
- " int b;\n" +
- " }\n" +
- " m2();\n" +
- " {\n" +
- " int c;\n" +
- " int d;\n" +
- " }\n" +
- " }\n" +
- "}\n";
- } else {
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString =
- "public class Test {\n" +
- " public Test() {\n" +
- " super();\n" +
- " }\n" +
- " void aMethod() {\n" +
- " public static @m1() enum $missing$ {\n" +
- " public $missing$() {\n" +
- " super();\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
- }
-
- String expectedFullUnitToString =
- "public class Test {\n" +
- " public Test() {\n" +
- " }\n" +
- " void aMethod() {\n" +
- " }\n" +
- " public static void m1() {\n" +
- " }\n" +
- " public static void m2() {\n" +
- " }\n" +
- "}\n";
-
- String expectedCompletionDietUnitToString =
- expectedDietUnitToString;
-
- String testName = "test";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyPlusStatementsRecoveryUnitToString,
- expectedFullUnitToString,
- expectedCompletionDietUnitToString, testName);
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/DualParseSyntaxErrorTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/DualParseSyntaxErrorTest.java
deleted file mode 100644
index 3e75351..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/DualParseSyntaxErrorTest.java
+++ /dev/null
@@ -1,359 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Locale;
-
-import org.eclipse.wst.jsdt.core.compiler.CategorizedProblem;
-import org.eclipse.wst.jsdt.core.tests.util.AbstractCompilerTest;
-import org.eclipse.wst.jsdt.core.tests.util.Util;
-import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
-import org.eclipse.wst.jsdt.internal.compiler.DefaultErrorHandlingPolicies;
-import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
-import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.wst.jsdt.internal.compiler.parser.Parser;
-import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblem;
-import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblemFactory;
-import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
-
-public class DualParseSyntaxErrorTest extends AbstractCompilerTest {
- public static boolean optimizeStringLiterals = false;
- public static long sourceLevel = ClassFileConstants.JDK1_3; //$NON-NLS-1$
-
-public DualParseSyntaxErrorTest(String testName){
- super(testName);
-}
-public void checkParse(
- char[] source,
- String expectedSyntaxErrorDiagnosis,
- String testName) {
-
- Parser parser =
- new Parser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- new CompilerOptions(getCompilerOptions()),
- new DefaultProblemFactory(Locale.getDefault())),
- optimizeStringLiterals);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration computedUnit = parser.dietParse(sourceUnit, compilationResult);
- if (computedUnit.types != null) {
- for (int i = computedUnit.types.length; --i >= 0;){
- computedUnit.types[i].parseMethod(parser, computedUnit);
- }
- }
-
- StringBuffer buffer = new StringBuffer(100);
- if (compilationResult.hasProblems() || compilationResult.hasTasks()) {
- CategorizedProblem[] problems = compilationResult.getAllProblems();
- int count = problems.length;
- int problemCount = 0;
- char[] unitSource = compilationResult.compilationUnit.getContents();
- for (int i = 0; i < count; i++) {
- if (problems[i] != null) {
- if (problemCount == 0)
- buffer.append("----------\n");
- problemCount++;
- buffer.append(problemCount + (problems[i].isError() ? ". ERROR" : ". WARNING"));
- buffer.append(" in " + new String(problems[i].getOriginatingFileName()).replace('/', '\\'));
- try {
- buffer.append(((DefaultProblem)problems[i]).errorReportSource(unitSource));
- buffer.append("\n");
- buffer.append(problems[i].getMessage());
- buffer.append("\n");
- } catch (Exception e) {
- StringWriter stringWriter = new StringWriter();
- e.printStackTrace(new PrintWriter(stringWriter));
- buffer.append(stringWriter.getBuffer());
- }
- buffer.append("----------\n");
- }
- }
- }
- String computedSyntaxErrorDiagnosis = buffer.toString();
- if(!Util.convertToIndependantLineDelimiter(expectedSyntaxErrorDiagnosis)
- .equals(Util.convertToIndependantLineDelimiter(computedSyntaxErrorDiagnosis))) {
- System.out.println(Util.displayString(computedSyntaxErrorDiagnosis));
- }
- assertEquals(
- "Invalid syntax error diagnosis" + testName,
- Util.convertToIndependantLineDelimiter(expectedSyntaxErrorDiagnosis),
- Util.convertToIndependantLineDelimiter(computedSyntaxErrorDiagnosis));
-}
-
-public void test01() {
-
- String s =
- "public class X { \n"+
- " int fX; \n"+
- " void foo() { \n"+
- " fX = 0; \n"+
- " } \n"+
- " public void bar() { \n"+
- " } \n"+
- "} \n";
-
- String expectedSyntaxErrorDiagnosis =
- "";
-
- String testName = "<test1>";
- checkParse(
- s.toCharArray(),
- expectedSyntaxErrorDiagnosis,
- testName);
-}
-public void test02() {
-
- String s =
- "public class X { \n"+
- " int fX; \n"+
- " void foo() { \n"+
- " fX = 0; \n"+
- " public void bar() { \n"+
- " } \n"+
- "} \n";
-
- String expectedSyntaxErrorDiagnosis =
- "----------\n" +
- "1. ERROR in <test2> (at line 4)\n" +
- " fX = 0; \n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete MethodBody\n" +
- "----------\n";
-
- String testName = "<test2>";
- checkParse(
- s.toCharArray(),
- expectedSyntaxErrorDiagnosis,
- testName);
-}
-public void test03() {
-
- String s =
- "public class X { \n"+
- " int fX; \n"+
- " void foo() \n"+
- " fX = 0; \n"+
- " public void bar() { \n"+
- " } \n"+
- "} \n";
-
- String expectedSyntaxErrorDiagnosis =
- "----------\n" +
- "1. ERROR in <test3> (at line 3)\n" +
- " void foo() \n" +
- " ^\n" +
- "Syntax error on token \")\", { expected after this token\n" +
- "----------\n" +
- "2. ERROR in <test3> (at line 4)\n" +
- " fX = 0; \n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete MethodBody\n" +
- "----------\n";
-
- String testName = "<test3>";
- checkParse(
- s.toCharArray(),
- expectedSyntaxErrorDiagnosis,
- testName);
-}
-public void test04() {
-
- String s =
- "public class X { \n"+
- " int fX; \n"+
- " void foo() \n"+
- " fX = 0; \n"+
- " } \n"+
- " public void bar() { \n"+
- " } \n"+
- "} \n";
-
- String expectedSyntaxErrorDiagnosis =
- "----------\n" +
- "1. ERROR in <test4> (at line 3)\n" +
- " void foo() \n" +
- " ^\n" +
- "Syntax error on token \")\", { expected after this token\n" +
- "----------\n";
-
- String testName = "<test4>";
- checkParse(
- s.toCharArray(),
- expectedSyntaxErrorDiagnosis,
- testName);
-}
-public void test05() {
-
- String s =
- "public class X { \n"+
- " int fX; \n"+
- " void foo() { \n"+
- " if(true){ \n"+
- " } \n"+
- " public void bar() { \n"+
- " } \n"+
- "} \n";
-
- String expectedSyntaxErrorDiagnosis =
- "----------\n" +
- "1. ERROR in <test5> (at line 4)\n" +
- " if(true){ \n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete Statement\n" +
- "----------\n";
-
- String testName = "<test5>";
- checkParse(
- s.toCharArray(),
- expectedSyntaxErrorDiagnosis,
- testName);
-}
-public void test06() {
-
- String s =
- "public class X { \n"+
- " int fX; \n"+
- " void foo() { \n"+
- " if(true){ \n"+
- " } \n"+
- " //comment \n"+
- " public void bar() { \n"+
- " } \n"+
- "} \n";
-
- String expectedSyntaxErrorDiagnosis =
- "----------\n" +
- "1. ERROR in <test6> (at line 4)\n" +
- " if(true){ \n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete Statement\n" +
- "----------\n";
-
- String testName = "<test6>";
- checkParse(
- s.toCharArray(),
- expectedSyntaxErrorDiagnosis,
- testName);
-}
-public void test07() {
-
- String s =
- "public class X { \n"+
- " int fX; \n"+
- " void foo() { \n"+
- " if(true){ \n"+
- " } \n"+
- " System.out.println(); \n"+
- " public void bar() { \n"+
- " } \n"+
- "} \n";
-
- String expectedSyntaxErrorDiagnosis =
- "----------\n" +
- "1. ERROR in <test7> (at line 6)\n" +
- " System.out.println(); \n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete MethodBody\n" +
- "----------\n";
-
- String testName = "<test7>";
- checkParse(
- s.toCharArray(),
- expectedSyntaxErrorDiagnosis,
- testName);
-}
-public void test08() {
-
- String s =
- "public class X { \n"+
- " int fX; \n"+
- " void foo() { \n"+
- " if(true){ \n"+
- " } \n"+
- " public int bar; \n"+
- "} \n";
-
- String expectedSyntaxErrorDiagnosis =
- "----------\n" +
- "1. ERROR in <test8> (at line 4)\n" +
- " if(true){ \n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete Statement\n" +
- "----------\n";
-
- String testName = "<test8>";
- checkParse(
- s.toCharArray(),
- expectedSyntaxErrorDiagnosis,
- testName);
-}
-public void test09() {
-
- String s =
- "public class X { \n"+
- " int fX; \n"+
- " void foo() { \n"+
- " if(true){ \n"+
- " } \n"+
- " //comment \n"+
- " public int bar; \n"+
- "} \n";
-
- String expectedSyntaxErrorDiagnosis =
- "----------\n" +
- "1. ERROR in <test9> (at line 4)\n" +
- " if(true){ \n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete Statement\n" +
- "----------\n";
-
- String testName = "<test9>";
- checkParse(
- s.toCharArray(),
- expectedSyntaxErrorDiagnosis,
- testName);
-}
-public void test10() {
-
- String s =
- "public class X { \n"+
- " int fX; \n"+
- " void foo() { \n"+
- " if(true){ \n"+
- " } \n"+
- " System.out.println(); \n"+
- " public int bar; \n"+
- "} \n";
-
- String expectedSyntaxErrorDiagnosis =
- "----------\n" +
- "1. ERROR in <test10> (at line 6)\n" +
- " System.out.println(); \n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete MethodBody\n" +
- "----------\n";
-
- String testName = "<test10>";
- checkParse(
- s.toCharArray(),
- expectedSyntaxErrorDiagnosis,
- testName);
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ExplicitConstructorInvocationCompletionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ExplicitConstructorInvocationCompletionTest.java
deleted file mode 100644
index 174f94f..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ExplicitConstructorInvocationCompletionTest.java
+++ /dev/null
@@ -1,385 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-/**
- * Completion is expected to be an ExplicitConstructorInvocation
- * or inside an ExplicitConstructorInvocation
- */
-public class ExplicitConstructorInvocationCompletionTest extends AbstractCompletionTest {
-public ExplicitConstructorInvocationCompletionTest(String testName) {
- super(testName);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(ExplicitConstructorInvocationCompletionTest.class);
-}
-/*
- * Completion on a qualified 'super' constructor invocation.
- *
- * ie. ExplicitConstructorInvocation ::= Primary '.' 'super' '(' ArgumentListopt ')' ';'
- */
-public void testPrimarySuper() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " static Bar x; \n" +
- " public class InnerBar { \n" +
- " InnerBar(Bar x) { \n" +
- " } \n" +
- " } \n" +
- " public class SubInnerBar extends InnerBar { \n" +
- " SubInnerBar(Bar x) { \n" +
- " primary().super(1, 2, i); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "super(1, 2,",
- // expectedCompletionNodeToString:
- "<CompleteOnExplicitConstructorCall:primary().super(1, 2)>;",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " public class InnerBar {\n" +
- " InnerBar(Bar x) {\n" +
- " }\n" +
- " }\n" +
- " public class SubInnerBar extends InnerBar {\n" +
- " SubInnerBar(Bar x) {\n" +
- " <CompleteOnExplicitConstructorCall:primary().super(1, 2)>;\n" +
- " }\n" +
- " }\n" +
- " static Bar x;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete on explicit constructor invocation primary super>"
- );
-}
-/*
- * Completion on a qualified 'this' constructor invocation.
- *
- * ie. ExplicitConstructorInvocation ::= Primary '.' 'this' '(' ArgumentListopt ')' ';'
- */
-public void testPrimaryThis() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " static Bar x; \n" +
- " public class InnerBar { \n" +
- " InnerBar(Bar x) { \n" +
- " } \n" +
- " } \n" +
- " public class SubInnerBar extends InnerBar { \n" +
- " SubInnerBar(Bar x) { \n" +
- " primary().this(1, 2, i); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "this(1, 2,",
- // expectedCompletionNodeToString:
- "<CompleteOnExplicitConstructorCall:primary().this(1, 2)>;",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " public class InnerBar {\n" +
- " InnerBar(Bar x) {\n" +
- " }\n" +
- " }\n" +
- " public class SubInnerBar extends InnerBar {\n" +
- " SubInnerBar(Bar x) {\n" +
- " <CompleteOnExplicitConstructorCall:primary().this(1, 2)>;\n" +
- " }\n" +
- " }\n" +
- " static Bar x;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete on explicit constructor invocation primary this>"
- );
-}
-/*
- * Completion on a 'super' constructor invocation.
- *
- * ie. ExplicitConstructorInvocation ::= 'super' '(' ArgumentListopt ')' ';'
- */
-public void testSuper() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " Bar() { \n" +
- " super(1, 2, i); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "super(1, 2,",
- // expectedCompletionNodeToString:
- "<CompleteOnExplicitConstructorCall:super(1, 2)>;",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " <CompleteOnExplicitConstructorCall:super(1, 2)>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<completion on 'super' constructor invocation>"
- );
-}
-/*
- * Completion on a 'this' constructor invocation.
- *
- * ie. ExplicitConstructorInvocation ::= 'this' '(' ArgumentListopt ')' ';'
- */
-public void testThis() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " Bar() { \n" +
- " this(1, 2, i); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "this(1, 2,",
- // expectedCompletionNodeToString:
- "<CompleteOnExplicitConstructorCall:this(1, 2)>;",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " <CompleteOnExplicitConstructorCall:this(1, 2)>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<completion on 'this' constructor invocation>"
- );
-}
-/*
- * ExplicitConstructorInvocation ::= Name '.' 'super' '(' <ArgumentListopt> ')' ';'
- */
-public void testWrapperNameSuper() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " static Bar x; \n" +
- " public class InnerBar { \n" +
- " InnerBar(Bar x) { \n" +
- " } \n" +
- " } \n" +
- " public class SubInnerBar extends InnerBar { \n" +
- " SubInnerBar() { \n" +
- " Bar.super(fred().xyz); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred().x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " public class InnerBar {\n" +
- " InnerBar(Bar x) {\n" +
- " }\n" +
- " }\n" +
- " public class SubInnerBar extends InnerBar {\n" +
- " SubInnerBar() {\n" +
- " super(<CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- " }\n" +
- " static Bar x;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on wrapper name super>"
- );
-}
-/*
- * ExplicitConstructorInvocation ::= Name '.' 'this' '(' <ArgumentListopt> ')' ';'
- */
-public void testWrapperNameThis() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " static Bar x; \n" +
- " public class InnerBar { \n" +
- " InnerBar(Bar x) { \n" +
- " } \n" +
- " } \n" +
- " public class SubInnerBar extends InnerBar { \n" +
- " SubInnerBar() { \n" +
- " Bar.this(fred().xyz); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred().x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " public class InnerBar {\n" +
- " InnerBar(Bar x) {\n" +
- " }\n" +
- " }\n" +
- " public class SubInnerBar extends InnerBar {\n" +
- " SubInnerBar() {\n" +
- " this(<CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- " }\n" +
- " static Bar x;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on wrapper name this>"
- );
-}
-/*
- * ExplicitConstructorInvocation ::= Primary '.' 'this' '(' <ArgumentListopt> ')' ';'
- */
-public void testWrapperPrimarySuper() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " static Bar x; \n" +
- " public class InnerBar { \n" +
- " InnerBar(Bar x) { \n" +
- " } \n" +
- " } \n" +
- " public class SubInnerBar extends InnerBar { \n" +
- " SubInnerBar(Bar x) { \n" +
- " primary().super(fred().xyz); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred().x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " public class InnerBar {\n" +
- " InnerBar(Bar x) {\n" +
- " }\n" +
- " }\n" +
- " public class SubInnerBar extends InnerBar {\n" +
- " SubInnerBar(Bar x) {\n" +
- " super(<CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- " }\n" +
- " static Bar x;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on wrapper primary super>"
- );
-}
-/*
- * ExplicitConstructorInvocation ::= 'super' '(' <ArgumentListopt> ')' ';'
- */
-public void testWrapperSuper() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " Bar() { \n" +
- " super(fred().xyz); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " super(<CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on wrapper super>"
- );
-}
-/*
- * ExplicitConstructorInvocation ::= 'this' '(' <ArgumentListopt> ')' ';'
- */
-public void testWrapperThis() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " Bar() { \n" +
- " this(fred().xyz); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " this(<CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on wrapper this>"
- );
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ExplicitConstructorInvocationSelectionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ExplicitConstructorInvocationSelectionTest.java
deleted file mode 100644
index 541b7f2..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ExplicitConstructorInvocationSelectionTest.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-/**
- * Selection is expected to be wrapped with an explicit constructor invocation.
- */
-public class ExplicitConstructorInvocationSelectionTest extends AbstractSelectionTest {
-public ExplicitConstructorInvocationSelectionTest(String testName) {
- super(testName);
-}
-/*
- * ExplicitConstructorInvocation ::= Name '.' 'super' '(' <ArgumentListopt> ')' ';'
- */
-public void testNameSuper() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " static Bar x; \n" +
- " public class InnerBar { \n" +
- " InnerBar(Bar x) { \n" +
- " } \n" +
- " } \n" +
- " public class SubInnerBar extends InnerBar { \n" +
- " SubInnerBar() { \n" +
- " Bar.super(fred()); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // selectionStartBehind:
- "Bar.super(",
- // selectionEndBehind:
- "fred",
- // expectedSelectionNodeToString:
- "<SelectOnMessageSend:fred()>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " public class InnerBar {\n" +
- " InnerBar(Bar x) {\n" +
- " }\n" +
- " }\n" +
- " public class SubInnerBar extends InnerBar {\n" +
- " SubInnerBar() {\n" +
- " super(<SelectOnMessageSend:fred()>);\n" +
- " }\n" +
- " }\n" +
- " static Bar x;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedSelectionIdentifier:
- "fred",
- // expectedReplacedSource:
- "fred()",
- // testName:
- "<select on explicit constructor invocation name super>"
- );
-}
-/*
- * ExplicitConstructorInvocation ::= Name '.' 'this' '(' <ArgumentListopt> ')' ';'
- */
-public void testNameThis() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " static Bar x; \n" +
- " public class InnerBar { \n" +
- " InnerBar(Bar x) { \n" +
- " } \n" +
- " } \n" +
- " public class SubInnerBar extends InnerBar { \n" +
- " SubInnerBar() { \n" +
- " Bar.this(fred()); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // selectionStartBehind:
- "Bar.this(",
- // selectionEndBehind:
- "fred",
- // expectedSelectionNodeToString:
- "<SelectOnMessageSend:fred()>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " public class InnerBar {\n" +
- " InnerBar(Bar x) {\n" +
- " }\n" +
- " }\n" +
- " public class SubInnerBar extends InnerBar {\n" +
- " SubInnerBar() {\n" +
- " this(<SelectOnMessageSend:fred()>);\n" +
- " }\n" +
- " }\n" +
- " static Bar x;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedSelectionIdentifier:
- "fred",
- // expectedReplacedSource:
- "fred()",
- // testName:
- "<select on explicit constructor invocation name this>"
- );
-}
-/*
- * ExplicitConstructorInvocation ::= Primary '.' 'this' '(' <ArgumentListopt> ')' ';'
- */
-public void testPrimarySuper() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " static Bar x; \n" +
- " public class InnerBar { \n" +
- " InnerBar(Bar x) { \n" +
- " } \n" +
- " } \n" +
- " public class SubInnerBar extends InnerBar { \n" +
- " SubInnerBar(Bar x) { \n" +
- " primary().super(fred()); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // selectionStartBehind:
- "super(",
- // selectionEndBehind:
- "fred",
- // expectedSelectionNodeToString:
- "<SelectOnMessageSend:fred()>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " public class InnerBar {\n" +
- " InnerBar(Bar x) {\n" +
- " }\n" +
- " }\n" +
- " public class SubInnerBar extends InnerBar {\n" +
- " SubInnerBar(Bar x) {\n" +
- " super(<SelectOnMessageSend:fred()>);\n" +
- " }\n" +
- " }\n" +
- " static Bar x;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedSelectionIdentifier:
- "fred",
- // expectedReplacedSource:
- "fred()",
- // testName:
- "<select on explicit constructor invocation primary super>"
- );
-}
-/*
- * ExplicitConstructorInvocation ::= 'super' '(' <ArgumentListopt> ')' ';'
- */
-public void testSuper() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " Bar() { \n" +
- " super(fred()); \n" +
- " } \n" +
- "} \n",
- // selectionStartBehind:
- "super(",
- // selectionEndBehind:
- "fred",
- // expectedSelectionNodeToString:
- "<SelectOnMessageSend:fred()>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " super(<SelectOnMessageSend:fred()>);\n" +
- " }\n" +
- "}\n",
- // expectedSelectionIdentifier:
- "fred",
- // expectedReplacedSource:
- "fred()",
- // testName:
- "<select on explicit constructor invocation super>"
- );
-}
-/*
- * ExplicitConstructorInvocation ::= 'this' '(' <ArgumentListopt> ')' ';'
- */
-public void testThis() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " Bar() { \n" +
- " this(fred()); \n" +
- " } \n" +
- "} \n",
- // selectionStartBehind:
- "this(",
- // selectionEndBehind:
- "fred",
- // expectedSelectionNodeToString:
- "<SelectOnMessageSend:fred()>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " this(<SelectOnMessageSend:fred()>);\n" +
- " }\n" +
- "}\n",
- // expectedSelectionIdentifier:
- "fred",
- // expectedReplacedSource:
- "fred()",
- // testName:
- "<select on explicit constructor invocation this>"
- );
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/FieldAccessCompletionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/FieldAccessCompletionTest.java
deleted file mode 100644
index f02fb25..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/FieldAccessCompletionTest.java
+++ /dev/null
@@ -1,2424 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-/**
- * Completion is expected to be a FieldAccess.
- */
-public class FieldAccessCompletionTest extends AbstractCompletionTest {
-public FieldAccessCompletionTest(String testName) {
- super(testName);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(FieldAccessCompletionTest.class);
-}
-/*
- * AdditiveExpression ::= AdditiveExpression '-' <MultiplicativeExpression>
- */
-public void testAdditiveExpressionMinus() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " int foo() { \n" +
- " return 1 - fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " int foo() {\n" +
- " (1 - <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on additive expression minus>"
- );
-}
-/*
- * AdditiveExpression ::= AdditiveExpression '+' <MultiplicativeExpression>
- */
-public void testAdditiveExpressionPlus() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " int foo() { \n" +
- " return 1 + fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " int foo() {\n" +
- " (1 + <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on additive expression plus>"
- );
-}
-/*
- * AndExpression ::= AndExpression '&' <EqualityExpression>
- */
-public void testAndExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " boolean foo() { \n" +
- " return isTrue & fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " boolean foo() {\n" +
- " (isTrue & <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // expectedReplacedSource:
- "<complete on and expression>"
- );
-}
-/*
- * ArgumentList ::= ArgumentList ',' <Expression>
- */
-public void testArgumentList() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " bizz(1, \"2\", fred().xyz); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " bizz(1, \"2\", <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on argument list>"
- );
-}
-/*
- * ArrayAccess ::= Name '[' <Expression> ']'
- */
-public void testArrayAccess() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " int foo() { \n" +
- " return v[fred().xyz]; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " int foo() {\n" +
- " v[<CompleteOnMemberAccess:fred().x>];\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on array access>"
- );
-}
-/*
- * ArrayAccess ::= PrimaryNoNewArray '[' <Expression> ']'
- */
-public void testArrayAccessPrimaryNoNewArray() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " int foo() { \n" +
- " return buzz()[fred().xyz]; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " int foo() {\n" +
- " buzz()[<CompleteOnMemberAccess:fred().x>];\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on array access primary no new array>"
- );
-}
-/*
- * ArrayInitializer ::= '{' <VariableInitializers> '}'
- */
-public void testArrayInitializer() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int[] i = new int[] {fred().xyz} \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int[] i = new int[]{<CompleteOnMemberAccess:fred().x>};\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on array initializer>"
- );
-}
-/*
- * ArrayInitializer ::= '{' <VariableInitializers> , '}'
- */
-public void testArrayInitializerComma() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int[] i = new int[] {fred().xyz,} \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int[] i = new int[]{<CompleteOnMemberAccess:fred().x>};\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on array initializer comma>"
- );
-}
-/*
- * Assignment ::= LeftHandSide AssignmentOperator <AssignmentExpression>
- */
-public void testAssignment() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " i = fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " i = <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on assignment>"
- );
-}
-/*
- * Block ::= OpenBlock '{' <BlockStatementsopt> '}'
- */
-public void testBlock() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " try { \n" +
- " fred().xyz = new Foo(); \n" +
- " } catch (Exception e) {} \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on block>"
- );
-}
-/*
- * BlockStatements ::= BlockStatements <BlockStatement>
- */
-public void testBlockStatements() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 0; \n" +
- " fred().xyz = new Foo(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on block statements>"
- );
-}
-/*
- * ConstructorBody ::= NestedMethod '{' ExplicitConstructorInvocation <BlockStatements> '}'
- */
-public void testBlockStatementsInConstructorBody() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " Bar() { \n" +
- " super(); \n" +
- " fred().xyz = new Foo(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " super();\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on block statements in constructor body>"
- );
-}
-/*
- * BlockStatements ::= BlockStatements <BlockStatement>
- *
- * in a non static initializer.
- */
-public void testBlockStatementsInInitializer() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " { \n" +
- " int i = 0; \n" +
- " fred().xyz = new Foo(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " {\n" +
- " int i;\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on block statements in initializer>"
- );
-}
-/*
- * BlockStatements ::= BlockStatements <BlockStatement>
- *
- * in a static initializer.
- */
-public void testBlockStatementsInStaticInitializer() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " static { \n" +
- " int i = 0; \n" +
- " fred().xyz = new Foo(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " static {\n" +
- " int i;\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- " <clinit>() {\n" +
- " }\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on block statements in static initializer>"
- );
-}
-/*
- * CastExpression ::= PushLPAREN <Expression> PushRPAREN UnaryExpressionNotPlusMinus
- *
- * NB: Valid syntaxically but not semantically
- */
-public void testCastExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " Bar foo() { \n" +
- " return (fred().xyz)buzz(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " Bar foo() {\n" +
- " return <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on cast expression>"
- );
-}
-/*
- * CastExpression ::= PushLPAREN PrimitiveType Dimsopt PushRPAREN <UnaryExpression>
- * or
- * CastExpression ::= PushLPAREN Name Dims PushRPAREN <UnaryExpressionNotPlusMinus>
- * or
- * CastExpression ::= PushLPAREN Expression PushRPAREN <UnaryExpressionNotPlusMinus>
- */
-public void testCastExpressionUnaryExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " Bar foo() { \n" +
- " return (Bar)(fred().xyz); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " Bar foo() {\n" +
- " (Bar) <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on cast expression unary expression>"
- );
-}
-/*
- * ClassInstanceCreationExpression ::= 'new' ClassType '(' <ArgumentListopt> ')' ClassBodyopt
- */
-public void testClassInstanceCreationExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " new Bar(fred().xyz); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new Bar(<CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on class instance creation expression>"
- );
-}
-/*
- * ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
- */
-public void testClassInstanceCreationExpressionName() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " Bar.new Bar(fred().xyz); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Bar.new Bar(<CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on class instance creation expression name>"
- );
-}
-/*
- * ClassInstanceCreationExpression ::= Primary '.' 'new' SimpleName '(' <ArgumentListopt> ')' ClassBodyopt
- */
-public void testClassInstanceCreationExpressionPrimary() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " bizz().new Bar(fred().xyz); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " bizz().new Bar(<CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on class instance creation expression primary>"
- );
-}
-/*
- * ConditionalAndExpression ::= ConditionalAndExpression '&&' <InclusiveOrExpression>
- */
-public void testConditionalAndExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " boolean foo() { \n" +
- " return isTrue && fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " boolean foo() {\n" +
- " (isTrue && <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on conditional and expression>"
- );
-}
-/*
- * ConditionalExpression ::= ConditionalOrExpression '?' <Expression> ':' ConditionalExpression
- */
-public void testConditionalExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " Bar foo() { \n" +
- " return fred().xyz == null ? null : new Bar(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " Bar foo() {\n" +
- " return <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on conditional expression>"
- );
-}
-/*
- * ConditionalExpression ::= ConditionalOrExpression '?' Expression ':' <ConditionalExpression>
- */
-public void testConditionalExpressionConditionalExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " boolean foo() { \n" +
- " return isTrue ? true : fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " boolean foo() {\n" +
- " (isTrue ? true : <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on conditional expression conditional expression>"
- );
-}
-/*
- * ConditionalOrExpression ::= ConditionalOrExpression '||' <ConditionalAndExpression>
- */
-public void testConditionalOrExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " boolean foo() { \n" +
- " return isTrue || fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " boolean foo() {\n" +
- " (isTrue || <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on conditional or expression>"
- );
-}
-/*
- * ConstructorBody ::= NestedMethod '{' <BlockStatementsopt> '}'
- */
-public void testConstructorBody() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " Bar() { \n" +
- " fred().xyz = new Foo(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " super();\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on constructor body>"
- );
-}
-/*
- * DimWithOrWithOutExpr ::= '[' <Expression> ']'
- */
-public void testDimWithOrWithOutExpr() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int[] v = new int[fred().xyz]; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int[] v = new int[<CompleteOnMemberAccess:fred().x>];\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on dim with or without expr>"
- );
-}
-/*
- * DoStatement ::= 'do' Statement 'while' '(' <Expression> ')' ';'
- */
-public void testDoExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " do \n" +
- " System.out.println(); \n" +
- " while (fred().xyz); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on do expression>"
- );
-}
-/*
- * DoStatement ::= 'do' <Statement> 'while' '(' Expression ')' ';'
- */
-public void testDoStatement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " do \n" +
- " fred().xyz = new Foo(); \n" +
- " while (true); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on do statement>"
- );
-}
-/*
- * EqualityExpression ::= EqualityExpression '==' <RelationalExpression>
- */
-public void testEqualityExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " boolean foo() { \n" +
- " return 1 == fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " boolean foo() {\n" +
- " (1 == <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on equality expression>"
- );
-}
-/*
- * EqualityExpression ::= EqualityExpression '!=' <RelationalExpression>
- */
-public void testEqualityExpressionNot() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " boolean foo() { \n" +
- " return 1 != fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " boolean foo() {\n" +
- " (1 != <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on equality expression not>"
- );
-}
-/*
- * ExclusiveOrExpression ::= ExclusiveOrExpression '^' <AndExpression>
- */
-public void testExclusiveOrExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " boolean foo() { \n" +
- " return isTrue ^ fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " boolean foo() {\n" +
- " (isTrue ^ <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on exclusive or expression>"
- );
-}
-/*
- * ConstructorBody ::= NestedMethod '{' <ExplicitConstructorInvocation> '}'
- * or
- * ConstructorBody ::= NestedMethod '{' <ExplicitConstructorInvocation> BlockStatements '}'
- */
-public void testExplicitConstructorInvocationInConstructorBody() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " static Bar x; \n" +
- " public class InnerBar { \n" +
- " } \n" +
- " public class SubInnerBar extends InnerBar { \n" +
- " SubInnerBar() { \n" +
- " Bar.x.x.super(); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "Bar.x.x",
- // expectedCompletionNodeToString:
- "<CompleteOnName:Bar.x.x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " public class InnerBar {\n" +
- " public InnerBar() {\n" +
- " }\n" +
- " }\n" +
- " public class SubInnerBar extends InnerBar {\n" +
- " SubInnerBar() {\n" +
- " super();\n" +
- " <CompleteOnName:Bar.x.x>;\n" +
- " }\n" +
- " }\n" +
- " static Bar x;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "Bar.x.x",
- // test name
- "<complete on explicit constructor invocation in constructor body>"
- );
-}
-/*
- * ForStatement ::= 'for' '(' <ForInitopt> ';' Expressionopt ';' ForUpdateopt ')' Statement
- * or
- * ForStatementNoShortIf ::= 'for' '(' <ForInitopt> ';' Expressionopt ';' ForUpdateopt ')' StatementNoShortIf
- */
-public void testForInit() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " for (int i = fred().xyz; i < 2; i++) \n" +
- " System.out.println(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i = <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on for init>"
- );
-}
-/*
- * ForStatement ::= 'for' '(' ForInitopt ';' Expressionopt ';' ForUpdateopt ')' <Statement>
- * or
- * ForStatementNoShortIf ::= 'for' '(' ForInitopt ';' Expressionopt ';' ForUpdateopt ')' <StatementNoShortIf>
- */
-public void testForStatement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " for (int i = 0; i < 2; i++) \n" +
- " fred().xyz = new Foo(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on for statement>"
- );
-}
-/*
- * ForStatement ::= 'for' '(' ForInitopt ';' <Expressionopt> ';' ForUpdateopt ')' Statement
- * or
- * ForStatementNoShortIf ::= 'for' '(' ForInitopt ';' <Expressionopt> ';' ForUpdateopt ')' StatementNoShortIf
- */
-public void testForStatementExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " for (int i = 0; fred().xyz > i; i++) \n" +
- " Systemout.println(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on for statement expression>"
- );
-}
-/*
- * ForStatement ::= 'for' '(' ForInitopt ';' Expressionopt ';' <ForUpdateopt> ')' Statement
- * or
- * ForStatementNoShortIf ::= 'for' '(' ForInitopt ';' Expressionopt ';' <ForUpdateopt> ')' StatementNoShortIf
- */
-public void testForUpdate() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " for (int i = 0; i < 2; i+= fred().xyz) \n" +
- " System.out.println(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " i += <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on for update>"
- );
-}
-/*
- * IfThenStatement ::= 'if' '(' <Expression> ')' Statement
- */
-public void testIfExpresionThen() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " if (fred().xyz) \n" +
- " System.out.println(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on \"if expression then\">"
- );
-}
-/*
- * IfThenElseStatement ::= 'if' '(' <Expression> ')' StatementNoShortIf 'else' Statement
- * or
- * IfThenElseStatementNoShortIf ::= 'if' '(' <Expression> ')' StatementNoShortIf 'else' StatementNoShortIf
- */
-public void testIfExpresionThenElse() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " if (fred().xyz) \n" +
- " System.out.println(); \n" +
- " else \n" +
- " System.out.println(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on \"if expression then else\">"
- );
-}
-/*
- * IfThenElseStatement ::= 'if' '(' Expression ')' StatementNoShortIf 'else' <Statement>
- * or
- * IfThenElseStatementNoShortIf ::= 'if' '(' Expression ')' StatementNoShortIf 'else' <StatementNoShortIf>
- */
-public void testIfThenElseStatement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " if (false) \n" +
- " System.out.println(); \n" +
- " else \n" +
- " fred().xyz = new Foo(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on \"if then else\" statement>"
- );
-}
-/*
- * IfThenStatement ::= 'if' '(' Expression ')' <Statement>
- */
-public void testIfThenStatement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " if (true) \n" +
- " fred().xyz = new Foo(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on \"if then\" statement>"
- );
-}
-/*
- * IfThenStatementElse ::= 'if' '(' Expression ')' <StatementNoShortIf> 'else' Statement
- * or
- * IfThenElseStatementNoShortIf ::= 'if' '(' Expression ')' <StatementNoShortIf> 'else' StatementNoShortIf
- */
-public void testIfThenStatementElse() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " if (true) \n" +
- " fred().xyz = new Foo(); \n" +
- " else \n" +
- " System.out.println(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on \"if then statement else\">"
- );
-}
-/*
- * InclusiveOrExpression ::= InclusiveOrExpression '|' <ExclusiveOrExpression>
- */
-public void testInclusiveOrExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " boolean foo() { \n" +
- " return isTrue | fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " boolean foo() {\n" +
- " (isTrue | <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on inclusive or expression>"
- );
-}
-/*
- * LabeledStatement ::= 'Identifier' ':' <Statement>
- * or
- * LabeledStatementNoShortIf ::= 'Identifier' ':' <StatementNoShortIf>
- */
-public void testLabeledStatement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " fredCall: fred().xyz = new Foo(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // expectedLabels:
- new String[] {"fredCall"},
- // test name
- "<complete on labeled statement>"
- );
-}
-/*
- * MethodBody ::= NestedMethod '{' <BlockStatementsopt> '}'
- */
-public void testMethodBody() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " fred().xyz = new Foo(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on method body>"
- );
-}
-/*
- * FunctionInvocation ::= Name '(' <ArgumentListopt> ')'
- */
-public void testMethodInvocation() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " bizz(fred().xyz); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " bizz(<CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on method invocation>"
- );
-}
-/*
- * FunctionInvocation ::= Primary '.' 'Identifier' '(' <ArgumentListopt> ')'
- */
-public void testMethodInvocationPrimary() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " buzz().bizz(fred().xyz); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " buzz().bizz(<CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on method invocation primary>"
- );
-}
-/*
- * FunctionInvocation ::= 'super' '.' 'Identifier' '(' <ArgumentListopt> ')'
- */
-public void testMethodInvocationSuper() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " super.bizz(fred().xyz); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " super.bizz(<CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on method invocation super>"
- );
-}
-/*
- * MultiplicativeExpression ::= MultiplicativeExpression '/' <UnaryExpression>
- */
-public void testMultiplicativeExpressiondDivision() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " double foo() { \n" +
- " return 2 / fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " double foo() {\n" +
- " (2 / <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on multiplicative expression division>"
- );
-}
-/*
- * MultiplicativeExpression ::= MultiplicativeExpression '*' <UnaryExpression>
- */
-public void testMultiplicativeExpressionMultiplication() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " int foo() { \n" +
- " return 2 * fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " int foo() {\n" +
- " (2 * <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on multiplicative expression multiplication>"
- );
-}
-/*
- * MultiplicativeExpression ::= MultiplicativeExpression '%' <UnaryExpression>
- */
-public void testMultiplicativeExpressionRemainder() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " int foo() { \n" +
- " return 2 % fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " int foo() {\n" +
- " (2 % <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on multiplicative expression remainder>"
- );
-}
-/*
- * PreDecrementExpression ::= '--' PushPosition <UnaryExpression>
- */
-public void testPreIncrementExpressionMinusMinus() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " -- fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " -- <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on pre increment expression minus minus>"
- );
-}
-/*
- * PreIncrementExpression ::= '++' PushPosition <UnaryExpression>
- */
-public void testPreIncrementExpressionPlusPlus() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " ++ fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " ++ <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on pre increment expression plus plus>"
- );
-}
-/*
- * PrimaryNoNewArray ::= PushLPAREN <Expression> PushRPAREN
- */
-public void testPrimaryNoNewArray() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " (fred().xyz).zzz(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on primary no new array>"
- );
-}
-/*
- * RelationalExpression ::= RelationalExpression '>' <ShiftExpression>
- */
-public void testRelationalExpressionGreaterThan() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " boolean foo() { \n" +
- " return 1 > fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " boolean foo() {\n" +
- " (1 > <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on relational expression greater than>"
- );
-}
-/*
- * RelationalExpression ::= RelationalExpression '>=' <ShiftExpression>
- */
-public void testRelationalExpressionGreaterThanOrEquals() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " boolean foo() { \n" +
- " return 1 >= fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " boolean foo() {\n" +
- " (1 >= <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on relational expression greater than or equal>"
- );
-}
-/*
- * RelationalExpression ::= RelationalExpression '<' <ShiftExpression>
- */
-public void testRelationalExpressionLessThan() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " boolean foo() { \n" +
- " return 1 < fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " boolean foo() {\n" +
- " (1 < <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on relational expression less than>"
- );
-}
-/*
- * RelationalExpression ::= RelationalExpression '<=' <ShiftExpression>
- */
-public void testRelationalExpressionLessThanOrEqual() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " boolean foo() { \n" +
- " return 1 <= fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " boolean foo() {\n" +
- " (1 <= <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on relational expression less than or equal>"
- );
-}
-/*
- * ReturnStatement ::= 'return' <Expressionopt> ';
- */
-public void testReturnStatement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " int foo() { \n" +
- " return fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " int foo() {\n" +
- " return <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on return statement>"
- );
-}
-/*
- * ShiftExpression ::= ShiftExpression '<<' <AdditiveExpression>
- */
-public void testShiftExpressionLeft() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " int foo() { \n" +
- " return i << fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " int foo() {\n" +
- " (i << <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on shift expression left>"
- );
-}
-/*
- * ShiftExpression ::= ShiftExpression '>>' <AdditiveExpression>
- */
-public void testShiftExpressionRight() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " int foo() { \n" +
- " return i >> fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " int foo() {\n" +
- " (i >> <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on shift expression right>"
- );
-}
-/*
- * ShiftExpression ::= ShiftExpression '>>>' <AdditiveExpression>
- */
-public void testShiftExpressionRightUnSigned() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " int foo() { \n" +
- " return i >>> fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " int foo() {\n" +
- " (i >>> <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on shift expression right unsigned>"
- );
-}
-/*
- * StatementExpressionList ::= StatementExpressionList ',' <StatementExpression>
- */
-public void testStatementExpressionList() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " for (int i = 0, length = fred().xyz; i < 2; i++) \n" +
- " System.out.println(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " int length = <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on statement expression list>"
- );
-}
-/*
- * SwitchBlockStatement ::= SwitchLabels <BlockStatements>
- */
-public void testSwitchBlockStatement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 0; \n" +
- " switch (i) { \n" +
- " case 0: fred().xyz = new Foo(); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on switch block statement>"
- );
-}
-/*
- * SwitchStatement ::= 'switch' OpenBlock '(' <Expression> ')' SwitchBlock
- */
-public void testSwitchExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " switch (fred().xyz) { \n" +
- " case 0: System.out.println(); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on switch expression>"
- );
-}
-/*
- * SwitchLabel ::= 'case' <ConstantExpression> ':'
- */
-public void testSwitchLabel() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 0; \n" +
- " switch (i) { \n" +
- " case fred().xyz: System.out.println(); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " {\n" +
- " switch (i) {\n" +
- " case <CompleteOnMemberAccess:fred().x> : ;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on switch label>"
- );
-}
-/*
- * SynchronizedStatement ::= OnlySynchronized '(' <Expression> ')' Block
- */
-public void testSynchronizedStatement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " synchronized (fred().xyz) { \n" +
- " System.out.println(); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on synchronized expression>"
- );
-}
-/*
- * ThrowStatement ::= 'throw' <Expression> ';'
- */
-public void testThrowExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " throw fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on throw expression>"
- );
-}
-/*
- * UnaryExpressionNotPlusMinus ::= '~' PushPosition <UnaryExpression>
- */
-public void testUnaryExpressionBitwiseComplement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " i = ~ fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " (~ <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on unary expression bitwise complement>"
- );
-}
-/*
- * UnaryExpressionNotPlusMinus ::= '!' PushPosition <UnaryExpression>
- */
-public void testUnaryExpressionLogicalComplement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " i = ! fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " (! <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on unary expression logical complement>"
- );
-}
-/*
- * UnaryExpression ::= '-' PushPosition <UnaryExpression>
- */
-public void testUnaryExpressionMinus() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " i = - fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " (- <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on unary expression minus>"
- );
-}
-/*
- * UnaryExpression ::= '+' PushPosition <UnaryExpression>
- */
-public void testUnaryExpressionPlus() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " i = + fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " (+ <CompleteOnMemberAccess:fred().x>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on unary expression plus>"
- );
-}
-/*
- * VariableDeclarator ::= VariableDeclaratorId EnterField '=' ForceNoDiet <VariableInitializer> RestoreDiet ExitField
- */
-public void testVariableDeclarator() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i = <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on variable declarator>"
- );
-}
-/*
- * VariableInitializers ::= VariableInitializers ',' <VariableInitializer>
- */
-public void testVariableInitializers() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 0, j = fred().xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " int j = <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on variable initializers>"
- );
-}
-/*
- * WhileStatement ::= 'while' '(' <Expression> ')' Statement
- * or
- * WhileStatementNoShortIf ::= 'while' '(' <Expression> ')' StatementNoShortIf
- */
-public void testWhileExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " while (fred().xyz) \n" +
- " System.out.println(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on while expresion>"
- );
-}
-/*
- * WhileStatement ::= 'while' '(' Expression ')' <Statement>
- * or
- * WhileStatementNoShortIf ::= 'while' '(' Expression ')' <StatementNoShortIf>
- */
-public void testWhileStatement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " while (true) \n" +
- " fred().xyz = new Foo(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on while statement>"
- );
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/InMemoryNameEnvironment.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/InMemoryNameEnvironment.java
deleted file mode 100644
index bfeb591..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/InMemoryNameEnvironment.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.env.*;
-import org.eclipse.wst.jsdt.internal.compiler.impl.ITypeRequestor;
-import org.eclipse.wst.jsdt.internal.compiler.lookup.Binding;
-import org.eclipse.wst.jsdt.core.compiler.CharOperation;
-import org.eclipse.wst.jsdt.internal.compiler.util.HashtableOfObject;
-
-public class InMemoryNameEnvironment implements INameEnvironment {
- INameEnvironment[] classLibs;
- HashtableOfObject compilationUnits = new HashtableOfObject();
-public InMemoryNameEnvironment(String[] compilationUnits, INameEnvironment[] classLibs) {
- this.classLibs = classLibs;
- for (int i = 0, length = compilationUnits.length - 1; i < length; i += 2) {
- String fileName = compilationUnits[i];
- char[] contents = compilationUnits[i + 1].toCharArray();
- String dirName = "";
- int lastSlash = -1;
- if ((lastSlash = fileName.lastIndexOf('/')) != -1) {
- dirName = fileName.substring(0, lastSlash);
- }
- char[] packageName = dirName.replace('/', '.').toCharArray();
- char[] cuName = fileName.substring(lastSlash == -1 ? 0 : lastSlash + 1, fileName.length() - 5).toCharArray(); // remove ".java"
- HashtableOfObject cus = (HashtableOfObject)this.compilationUnits.get(packageName);
- if (cus == null) {
- cus = new HashtableOfObject();
- this.compilationUnits.put(packageName, cus);
- }
- CompilationUnit unit = new CompilationUnit(contents, fileName, null);
- cus.put(cuName, unit);
- }
-}
-public NameEnvironmentAnswer findType(char[][] compoundTypeName, ITypeRequestor requestor) {
- return findType(
- compoundTypeName[compoundTypeName.length - 1],
- CharOperation.subarray(compoundTypeName, 0, compoundTypeName.length - 1),requestor);
-}
-public NameEnvironmentAnswer findBinding(char[] typeName, char[][] packageName, int type, ITypeRequestor requestor, boolean returnMultiple, String excludePath) {
- HashtableOfObject cus = (HashtableOfObject)this.compilationUnits.get(CharOperation.concatWith(packageName, '.'));
- if (cus == null) {
- return this.findTypeFromClassLibs(typeName, packageName,type,requestor);
- }
- CompilationUnit unit = (CompilationUnit)cus.get(typeName);
- if (unit == null) {
- return this.findTypeFromClassLibs(typeName, packageName,type,requestor);
- }
- return new NameEnvironmentAnswer(unit, null /*no access restriction*/);
-}
-
-public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, ITypeRequestor requestor) {
- return findBinding(typeName, packageName, Binding.TYPE|Binding.PACKAGE,requestor, false, null);
-// HashtableOfObject cus = (HashtableOfObject)this.compilationUnits.get(CharOperation.concatWith(packageName, '.'));
-// if (cus == null) {
-// return this.findTypeFromClassLibs(typeName, packageName);
-// }
-// JavaScriptUnit unit = (JavaScriptUnit)cus.get(typeName);
-// if (unit == null) {
-// return this.findTypeFromClassLibs(typeName, packageName);
-// }
-// return new NameEnvironmentAnswer(unit, null /*no access restriction*/);
-}
-private NameEnvironmentAnswer findTypeFromClassLibs(char[] typeName, char[][] packageName, int type, ITypeRequestor requestor) {
- for (int i = 0; i < this.classLibs.length; i++) {
- NameEnvironmentAnswer answer = this.classLibs[i].findBinding(typeName, packageName, type,requestor, false, null);
- if (answer != null) {
- return answer;
- }
- }
- return null;
-}
-public boolean isPackage(char[][] parentPackageName, char[] packageName) {
- char[] pkg = CharOperation.concatWith(parentPackageName, packageName, '.');
- return
- this.compilationUnits.get(pkg) != null ||
- this.isPackageFromClassLibs(parentPackageName, packageName);
-}
-public boolean isPackageFromClassLibs(char[][] parentPackageName, char[] packageName) {
- for (int i = 0; i < this.classLibs.length; i++) {
- if (this.classLibs[i].isPackage(parentPackageName, packageName)) {
- return true;
- }
- }
- return false;
-}
-public void cleanup() {
- for (int i = 0, max = this.classLibs.length; i < max; i++) {
- this.classLibs[i].cleanup();
- }
- this.compilationUnits = new HashtableOfObject();
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/InnerTypeCompletionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/InnerTypeCompletionTest.java
deleted file mode 100644
index 6ff33c9..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/InnerTypeCompletionTest.java
+++ /dev/null
@@ -1,456 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-/**
- * Completion is expected to be in an inner type
- */
-public class InnerTypeCompletionTest extends AbstractCompletionTest {
-public InnerTypeCompletionTest(String testName) {
- super(testName);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(InnerTypeCompletionTest.class);
-}
-/*
- * Test completion in the first method of an anonymous inner class
- */
-public void testAnonymousFirstMethod() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " Object o = new Object() { \n" +
- " void buzz() { \n" +
- " int i = fred().xyz; \n" +
- " } \n" +
- " void fuzz() { \n" +
- " } \n" +
- " }; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " new Object() {\n" +
- " void buzz() {\n" +
- " int i = <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- " void fuzz() {\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete in anonymous inner class in first method>"
- );
-}
-/*
- * Test completion in anonymous inner class with no statement defined before.
- */
-public void testAnonymousNoStatementBefore() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " Object o = new Object() { \n" +
- " void buzz() { \n" +
- " int i = fred().xyz; \n" +
- " } \n" +
- " }; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " new Object() {\n" +
- " void buzz() {\n" +
- " int i = <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete in anonymous inner class with no statement before>"
- );
-}
-/*
- * Test completion in anonymous inner class with one field defined before
- * the method containing the completion.
- */
-public void testAnonymousOneFieldBefore() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " Object o = new Object() { \n" +
- " int field = 1; \n" +
- " void buzz() { \n" +
- " int i = fred().xyz; \n" +
- " } \n" +
- " }; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " new Object() {\n" +
- " int field;\n" +
- " void buzz() {\n" +
- " int i = <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete in anonymous inner class with one field before>"
- );
-}
-/*
- * Test completion in anonymous inner class with one statement defined before.
- */
-public void testAnonymousOneStatementBefore() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 1; \n" +
- " Object o = new Object() { \n" +
- " void buzz() { \n" +
- " int i = fred().xyz; \n" +
- " } \n" +
- " }; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " Object o;\n" +
- " new Object() {\n" +
- " void buzz() {\n" +
- " int i = <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete in anonymous inner class with one statement before>"
- );
-}
-/*
- * Test completion in the second method of an anonymous inner class
- */
-public void testAnonymousSecondMethod() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " Object o = new Object() { \n" +
- " void fuzz() { \n" +
- " } \n" +
- " void buzz() { \n" +
- " int i = fred().xyz; \n" +
- " } \n" +
- " }; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Object o;\n" +
- " new Object() {\n" +
- " void fuzz() {\n" +
- " }\n" +
- " void buzz() {\n" +
- " int i = <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete in anonymous inner class in second method>"
- );
-}
-/*
- * Test completion in the first method of a local type declaration
- */
-public void testLocalTypeFirstMethod() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " class InnerBar { \n" +
- " void buzz() { \n" +
- " int i = fred().xyz; \n" +
- " } \n" +
- " void fuzz() { \n" +
- " } \n" +
- " }; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " class InnerBar {\n" +
- " InnerBar() {\n" +
- " }\n" +
- " void buzz() {\n" +
- " int i = <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- " void fuzz() {\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete in local type declaration in first method>"
- );
-}
-/*
- * Test completion in local type declaration with no statement defined before.
- */
-public void testLocalTypeNoStatementBefore() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " class InnerBar { \n" +
- " void buzz() { \n" +
- " int i = fred().xyz; \n" +
- " } \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " class InnerBar {\n" +
- " InnerBar() {\n" +
- " }\n" +
- " void buzz() {\n" +
- " int i = <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete in local type declaration with no statement before>"
- );
-}
-/*
- * Test completion in local type declaration with one field defined before
- * the method containing the completion.
- */
-public void testLocalTypeOneFieldBefore() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " class InnerBar { \n" +
- " int field = 1; \n" +
- " void buzz() { \n" +
- " int i = fred().xyz; \n" +
- " } \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " class InnerBar {\n" +
- " int field;\n" +
- " InnerBar() {\n" +
- " }\n" +
- " void buzz() {\n" +
- " int i = <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete in local type declaration with one field before>"
- );
-}
-/*
- * Test completion in local type declaration with one statement defined before.
- */
-public void testLocalTypeOneStatementBefore() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 1; \n" +
- " class InnerBar { \n" +
- " void buzz() { \n" +
- " int i = fred().xyz; \n" +
- " } \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " class InnerBar {\n" +
- " InnerBar() {\n" +
- " }\n" +
- " void buzz() {\n" +
- " int i = <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete in local type declaration with 1 statement before>"
- );
-}
-/*
- * Test completion in the second method of a local type declaration
- */
-public void testLocalTypeSecondMethod() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " class InnerBar { \n" +
- " void fuzz() { \n" +
- " } \n" +
- " void buzz() { \n" +
- " int i = fred().xyz; \n" +
- " } \n" +
- " }; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:fred().x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " class InnerBar {\n" +
- " InnerBar() {\n" +
- " }\n" +
- " void fuzz() {\n" +
- " }\n" +
- " void buzz() {\n" +
- " int i = <CompleteOnMemberAccess:fred().x>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete in local type declaration in second method>"
- );
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/JavadocCompletionParserTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/JavadocCompletionParserTest.java
deleted file mode 100644
index 809ee43..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/JavadocCompletionParserTest.java
+++ /dev/null
@@ -1,545 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import java.util.Locale;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import junit.framework.Test;
-
-import org.eclipse.wst.jsdt.internal.codeassist.complete.CompletionJavadoc;
-import org.eclipse.wst.jsdt.internal.codeassist.complete.CompletionOnJavadocTag;
-import org.eclipse.wst.jsdt.internal.codeassist.complete.CompletionParser;
-import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
-import org.eclipse.wst.jsdt.internal.compiler.DefaultErrorHandlingPolicies;
-import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
-import org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.wst.jsdt.internal.compiler.parser.JavadocTagConstants;
-import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblemFactory;
-import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
-
-public class JavadocCompletionParserTest extends AbstractCompletionTest implements JavadocTagConstants {
- public static int INLINE_ALL_TAGS_LENGTH = 0;
- public static int BLOCK_ALL_TAGS_LENGTH = 0;
- static {
- for (int i=0; i<INLINE_TAGS_LENGTH; i++) {
- INLINE_ALL_TAGS_LENGTH += INLINE_TAGS[i].length;
- }
- for (int i=0; i<BLOCK_TAGS_LENGTH; i++) {
- BLOCK_ALL_TAGS_LENGTH += BLOCK_TAGS[i].length;
- }
- }
-
- CompletionJavadoc javadoc;
- String sourceLevel;
-
-public JavadocCompletionParserTest(String testName) {
- super(testName);
-}
-
-static {
- // org.eclipse.wst.jsdt.internal.codeassist.CompletionEngine.DEBUG = true;
-// TESTS_NUMBERS = new int[] { 8 };
-// TESTS_RANGE = new int[] { 20, -1 };
-}
-
-public static Test suite() {
- return buildAllCompliancesTestSuite(JavadocCompletionParserTest.class);
-}
-
-/* (non-Javadoc)
- * @see org.eclipse.test.performance.PerformanceTestCase#setUp()
- */
-protected void setUp() throws Exception {
- super.setUp();
- this.sourceLevel = null;
-}
-
-protected void assertCompletionNodeResult(String source, String expected) {
- ASTNode completionNode = this.javadoc.getCompletionNode();
- assertNotNull("Javadoc should have a completion node!!!", completionNode);
- String actual = this.javadoc.getCompletionNode().toString();
- if (!expected.equals(actual)) {
- System.out.println("********************************************************************************");
- System.out.print(getName());
- System.out.println(" expect following result:");
- String toDisplay = new String(org.eclipse.wst.jsdt.core.tests.util.Util.displayString(new String(actual), 2).toCharArray());
- System.out.println(toDisplay);
- System.out.println("--------------------------------------------------------------------------------");
- System.out.println(source);
- }
- assertEquals(
- "Completion node is not correct!",
- expected,
- actual
- );
-}
-protected Map getCompilerOptions() {
- Map options = super.getCompilerOptions();
- if (this.sourceLevel == null) {
- return options;
- }
- options.put(CompilerOptions.OPTION_Source, this.sourceLevel);
- return options;
-}
-protected void verifyCompletionInJavadoc(String source, String after) {
- CompilerOptions options = new CompilerOptions(getCompilerOptions());
- CompletionParser parser = new CompletionParser(new ProblemReporter(DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- options,
- new DefaultProblemFactory(Locale.getDefault())));
-
- ICompilationUnit sourceUnit = new CompilationUnit(source.toCharArray(), "Test.java", null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- int cursorLocation = source.indexOf(after) + after.length() - 1;
- parser.dietParse(sourceUnit, compilationResult, cursorLocation);
-
- assertNotNull("Parser should have an assist node parent", parser.assistNodeParent);
- assertEquals("Expecting completion in javadoc!", CompletionJavadoc.class, parser.assistNodeParent.getClass());
- this.javadoc = (CompletionJavadoc) parser.assistNodeParent;
-}
-
-protected void verifyCompletionOnJavadocTag(char[] tag, char[][] expectedTags, boolean inline) {
- assertTrue("Invalid javadoc completion node!", this.javadoc.getCompletionNode() instanceof CompletionOnJavadocTag);
- CompletionOnJavadocTag completionTag = (CompletionOnJavadocTag) this.javadoc.getCompletionNode();
- StringBuffer expected = new StringBuffer("<CompleteOnJavadocTag:");
- if (inline) expected.append('{');
- expected.append('@');
- if (tag != null) expected.append(tag);
- if (inline) expected.append('}');
- if (expectedTags != null) {
- expected.append("\npossible tags:");
- int length = expectedTags.length;
- for (int i=0; i<length; i++) {
- expected.append("\n - ");
- expected.append(expectedTags[i]);
- }
- expected.append('\n');
- }
- expected.append(">");
- if (expectedTags == null) {
- assertEquals("Invalid completion tag", expected.toString(), completionTag.toString());
- } else {
- String completionTagString = completionTag.toString();
- StringTokenizer completionTagTokenizer = new StringTokenizer(completionTagString, "\n");
- StringBuffer completionTagBuffer = new StringBuffer(completionTagString.length());
- boolean possibleLine = false, newLine = false;
- while (completionTagTokenizer.hasMoreTokens()) {
- String line = completionTagTokenizer.nextToken();
- if (line.startsWith("possible")) {
- if (!possibleLine) {
- possibleLine = true;
- completionTagBuffer.append("\npossible tags:");
- }
- } else {
- if (newLine) completionTagBuffer.append('\n');
- completionTagBuffer.append(line);
- }
- newLine = true;
- }
- assertEquals("Invalid completion tag", expected.toString(), completionTagBuffer.toString());
- }
-}
-
-protected void verifyAllTagsCompletion() {
- char[][] allTags = {
- // Block tags
- TAG_AUTHOR, TAG_DEPRECATED, TAG_EXCEPTION, TAG_PARAM, TAG_RETURN, TAG_SEE, TAG_VERSION,
- TAG_SINCE,
-// TAG_SERIAL, TAG_SERIAL_DATA, TAG_SERIAL_FIELD ,
- TAG_THROWS,
- // Inline tags
- TAG_LINK
- };
- verifyCompletionOnJavadocTag(null, allTags, false);
-}
-
-/**
- * @tests Test completions for javadoc tag names
- */
-public void test001() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * Completion on empty tag name:\n" +
- " * @\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "@");
- verifyAllTagsCompletion();
-}
-
-public void test002() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * Completion on impossible tag name:\n" +
- " * @none\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "@none");
- verifyCompletionOnJavadocTag("none".toCharArray(), null, false);
-}
-
-public void test003() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * Completion on one letter:\n" +
- " * @v\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "@v");
- char[][] allTags = this.complianceLevel.equals(COMPLIANCE_1_3)
- ? new char[][] { TAG_VERSION }
- : new char[][] { TAG_VERSION };
- verifyCompletionOnJavadocTag(new char[] { 'v' }, allTags, false);
-}
-
-public void test004() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * Completion with several letters:\n" +
- " * @deprec\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "@deprec");
- verifyCompletionOnJavadocTag("deprec".toCharArray(), new char[][] { TAG_DEPRECATED }, false);
-}
-
-public void test005() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * Completion on full tag name:\n" +
- " * @link\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "@link");
- char[][] allTags = this.complianceLevel.equals(COMPLIANCE_1_3)
- ? new char[][] { TAG_LINK }
- : new char[][] { TAG_LINK };
- verifyCompletionOnJavadocTag("link".toCharArray(), allTags, false);
-}
-
-public void test006() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * Completion on empty tag name @ but inside text\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "@");
- char[][] allTags = {
- TAG_LINK
- };
- verifyCompletionOnJavadocTag(null, allTags, false);
-}
-
-public void test007() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * Completion on :\n" +
- " * @\n" +
- " * - with following lines:\n" +
- " * + \"@ {@link }\"\n" +
- " * + \"@ {@linkplain }\"\n" +
- " * + \"@ {@literal }\"\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "@");
- verifyAllTagsCompletion();
-}
-/**
- * @bug [javadoc][assist] @linkplain no longer proposed when 1.4 compliance is used
- * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=123096"
- */
-public void test008() {
- this.sourceLevel = CompilerOptions.VERSION_1_3;
- String source = "package javadoc;\n" +
- "/**\n" +
- " * Completion on empty tag name:\n" +
- " * @\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "@");
- verifyAllTagsCompletion();
-}
-
-/**
- * @tests Tests to verify completion node flags
- * @bug 113506: [javadoc][assist] No tag proposals when there is a prefix on a line
- * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=113506"
- */
-public void test010() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * @see \n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "@see ");
- assertCompletionNodeResult(source,
- "<CompletionOnJavadocSingleTypeReference:\n" +
- " infos:formal reference\n" +
- ">"
- );
-}
-
-public void test011() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * {@link }\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "@link ");
- assertCompletionNodeResult(source,
- "<CompletionOnJavadocSingleTypeReference:\n" +
- " infos:formal reference\n" +
- ">"
- );
-}
-public void test012() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * @see Str\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "Str");
- assertCompletionNodeResult(source,
- "<CompletionOnJavadocSingleTypeReference:Str\n" +
- " infos:formal reference\n" +
- ">"
- );
-}
-
-public void test013() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * {@link Str}\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "Str");
- assertCompletionNodeResult(source,
- "<CompletionOnJavadocSingleTypeReference:Str\n" +
- " infos:formal reference\n" +
- ">"
- );
-}
-public void test014() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * @see String Subclass of Obj\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "Obj");
- assertCompletionNodeResult(source,
- "<CompletionOnJavadocSingleTypeReference:Obj\n" +
- " infos:text\n" +
- ">"
- );
-}
-
-public void test015() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * {@link String Subclass of Obj}\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "Obj");
- assertCompletionNodeResult(source,
- "<CompletionOnJavadocSingleTypeReference:Obj\n" +
- " infos:formal reference\n" +
- ">"
- );
-}
-
-/**
- * @test Bug 113469: CompletionOnJavadocTag token is not correct
- * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=113649"
- */
-public void test020() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * @see\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "@s");
- verifyCompletionOnJavadocTag("s".toCharArray(), new char[][] { TAG_SEE, TAG_SINCE/*, TAG_SERIAL, TAG_SERIAL_DATA, TAG_SERIAL_FIELD*/ }, false);
- CompletionOnJavadocTag completionTag = (CompletionOnJavadocTag) this.javadoc.getCompletionNode();
- assertEquals("Invalid tag start position", 24, completionTag.tagSourceStart);
- assertEquals("Invalid tag end position", 28, completionTag.tagSourceEnd+1);
-}
-
-public void test021() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * @see\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "@se");
- verifyCompletionOnJavadocTag("se".toCharArray(), new char[][] { TAG_SEE/*, TAG_SERIAL, TAG_SERIAL_DATA, TAG_SERIAL_FIELD */}, false);
- CompletionOnJavadocTag completionTag = (CompletionOnJavadocTag) this.javadoc.getCompletionNode();
- assertEquals("Invalid tag start position", 24, completionTag.tagSourceStart);
- assertEquals("Invalid tag end position", 28, completionTag.tagSourceEnd+1);
-}
-
-public void test022() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * @see\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "@see");
- verifyCompletionOnJavadocTag("see".toCharArray(), new char[][] { TAG_SEE }, false);
- CompletionOnJavadocTag completionTag = (CompletionOnJavadocTag) this.javadoc.getCompletionNode();
- assertEquals("Invalid tag start position", 24, completionTag.tagSourceStart);
- assertEquals("Invalid tag end position", 28, completionTag.tagSourceEnd+1);
-}
-
-public void test023() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * @ebj-tag\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "ebj");
- verifyCompletionOnJavadocTag("ebj".toCharArray(), null, false);
- CompletionOnJavadocTag completionTag = (CompletionOnJavadocTag) this.javadoc.getCompletionNode();
- assertEquals("Invalid tag start position", 24, completionTag.tagSourceStart);
- assertEquals("Invalid tag end position", 32, completionTag.tagSourceEnd+1);
-}
-
-public void test024() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * @ebj-tag\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "tag");
- verifyCompletionOnJavadocTag("ebj-tag".toCharArray(), null, false);
- CompletionOnJavadocTag completionTag = (CompletionOnJavadocTag) this.javadoc.getCompletionNode();
- assertEquals("Invalid tag start position", 24, completionTag.tagSourceStart);
- assertEquals("Invalid tag end position", 32, completionTag.tagSourceEnd+1);
-}
-
-/**
- * @test Bug 114091: [assist][javadoc] eternal loop
- * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=114091"
- */
-public void test025() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * {@</code>\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "{@");
- char[][] allTags = {
- TAG_LINK
- };
- verifyCompletionOnJavadocTag("".toCharArray(), allTags, false);
- CompletionOnJavadocTag completionTag = (CompletionOnJavadocTag) this.javadoc.getCompletionNode();
- int start = source.indexOf("{@");
- assertEquals("Invalid tag start position", start, completionTag.tagSourceStart);
- int end = source.indexOf('>');
- assertEquals("Invalid tag end position", end, completionTag.tagSourceEnd);
-}
-
-public void test026() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * {@li</code>\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "{@li");
- char[][] allTags = complianceLevel.equals(COMPLIANCE_1_3)
- ? new char[][] { TAG_LINK }
- : (complianceLevel.equals(COMPLIANCE_1_4)
- ? new char[][] { TAG_LINK}
- : new char[][] { TAG_LINK });
- verifyCompletionOnJavadocTag("li".toCharArray(), allTags, false);
- CompletionOnJavadocTag completionTag = (CompletionOnJavadocTag) this.javadoc.getCompletionNode();
- int start = source.indexOf("{@");
- assertEquals("Invalid tag start position", start, completionTag.tagSourceStart);
- int end = source.indexOf('>');
- assertEquals("Invalid tag end position", end, completionTag.tagSourceEnd);
-}
-
-public void test027() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * {@link</code>\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "{@link");
- char[][] allTags = complianceLevel.equals(COMPLIANCE_1_3)
- ? new char[][] { TAG_LINK }
- : new char[][] { TAG_LINK };
- verifyCompletionOnJavadocTag("link".toCharArray(), allTags, false);
- CompletionOnJavadocTag completionTag = (CompletionOnJavadocTag) this.javadoc.getCompletionNode();
- int start = source.indexOf("{@");
- assertEquals("Invalid tag start position", start, completionTag.tagSourceStart);
- int end = source.indexOf('>');
- assertEquals("Invalid tag end position", end, completionTag.tagSourceEnd);
-}
-public void test028() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * {@|\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "{@");
- char[][] allTags = {
- TAG_LINK
- };
- verifyCompletionOnJavadocTag("".toCharArray(), allTags, false);
- CompletionOnJavadocTag completionTag = (CompletionOnJavadocTag) this.javadoc.getCompletionNode();
- int start = source.indexOf("{@");
- assertEquals("Invalid tag start position", start, completionTag.tagSourceStart);
- int end = source.indexOf('|');
- assertEquals("Invalid tag end position", end, completionTag.tagSourceEnd);
-}
-
-public void test029() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * {@li/\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "{@li");
- char[][] allTags = complianceLevel.equals(COMPLIANCE_1_3)
- ? new char[][] { TAG_LINK }
- : (complianceLevel.equals(COMPLIANCE_1_4)
- ? new char[][] { TAG_LINK }
- : new char[][] { TAG_LINK });
- verifyCompletionOnJavadocTag("li".toCharArray(), allTags, false);
- CompletionOnJavadocTag completionTag = (CompletionOnJavadocTag) this.javadoc.getCompletionNode();
- int start = source.indexOf("{@");
- assertEquals("Invalid tag start position", start, completionTag.tagSourceStart);
- int end = source.indexOf("/\n");
- assertEquals("Invalid tag end position", end, completionTag.tagSourceEnd);
-}
-
-public void test030() {
- String source = "package javadoc;\n" +
- "/**\n" +
- " * {@link+\n" +
- " */\n" +
- "public class Test {}\n";
- verifyCompletionInJavadoc(source, "{@link");
- char[][] allTags = complianceLevel.equals(COMPLIANCE_1_3)
- ? new char[][] { TAG_LINK }
- : new char[][] { TAG_LINK };
- verifyCompletionOnJavadocTag("link".toCharArray(), allTags, false);
- CompletionOnJavadocTag completionTag = (CompletionOnJavadocTag) this.javadoc.getCompletionNode();
- int start = source.indexOf("{@");
- assertEquals("Invalid tag start position", start, completionTag.tagSourceStart);
- int end = source.indexOf('+');
- assertEquals("Invalid tag end position", end, completionTag.tagSourceEnd);
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/LabelStatementCompletionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/LabelStatementCompletionTest.java
deleted file mode 100644
index 5745f15..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/LabelStatementCompletionTest.java
+++ /dev/null
@@ -1,492 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-/**
- * Completion is expected to be in a LabeledStatement.
- */
-public class LabelStatementCompletionTest extends AbstractCompletionTest {
-public LabelStatementCompletionTest(String testName) {
- super(testName);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(LabelStatementCompletionTest.class);
-}
-/*
- * Completion inside an inner class defined inside a labeled statement.
- */
-public void test1FTEO9L() {
- String cu =
- "package p; \n" +
- " \n" +
- "class CCHelper { \n" +
- " class Member1 { \n" +
- " } \n" +
- " class Member2 { \n" +
- " } \n" +
- " void foo() { \n" +
- " } \n" +
- "} \n" +
- " \n" +
- "public class CC { \n" +
- " void foo() { \n" +
- " new CCHelper() \n" +
- " .new CCHelper() \n" +
- " .new M \n" +
- " } \n" +
- "} \n";
- // first case
- this.runTestCheckMethodParse(
- // compilationUnit:
- cu,
- // completeBehind:
- " .n",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:new CCHelper().n>",
- // expectedUnitDisplayString:
- "package p;\n" +
- "class CCHelper {\n" +
- " class Member1 {\n" +
- " Member1() {\n" +
- " }\n" +
- " }\n" +
- " class Member2 {\n" +
- " Member2() {\n" +
- " }\n" +
- " }\n" +
- " CCHelper() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n" +
- "public class CC {\n" +
- " public CC() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:new CCHelper().n>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "n",
- // expectedReplacedSource:
- "new",
- // test name
- "<regression test 1FTEO9L (first case)>"
- );
- // second case
- this.runTestCheckMethodParse(
- // compilationUnit:
- cu,
- // completeBehind:
- " .new CC",
- // expectedCompletionNodeToString:
- "<CompleteOnType:CC>",
- // expectedUnitDisplayString:
- "package p;\n" +
- "class CCHelper {\n" +
- " class Member1 {\n" +
- " Member1() {\n" +
- " }\n" +
- " }\n" +
- " class Member2 {\n" +
- " Member2() {\n" +
- " }\n" +
- " }\n" +
- " CCHelper() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n" +
- "public class CC {\n" +
- " public CC() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new CCHelper().new <CompleteOnType:CC>();\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "CC",
- // expectedReplacedSource:
- "CCHelper",
- // test name
- "<regression test 1FTEO9L (second case)>"
- );
- // third case
- this.runTestCheckMethodParse(
- // compilationUnit:
- cu,
- // completeBehind:
- " .new CCHelper() \n" +
- " .n",
- // expectedCompletionNodeToString:
- "<CompleteOnMemberAccess:new CCHelper().new CCHelper().n>",
- // expectedUnitDisplayString:
- "package p;\n" +
- "class CCHelper {\n" +
- " class Member1 {\n" +
- " Member1() {\n" +
- " }\n" +
- " }\n" +
- " class Member2 {\n" +
- " Member2() {\n" +
- " }\n" +
- " }\n" +
- " CCHelper() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n" +
- "public class CC {\n" +
- " public CC() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMemberAccess:new CCHelper().new CCHelper().n>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "n",
- // expectedReplacedSource:
- "new",
- // test name
- "<regression test 1FTEO9L (third case)>"
- );
- // fourth case
- this.runTestCheckMethodParse(
- // compilationUnit:
- cu,
- // completeBehind:
- " .new CCHelper() \n" +
- " .new M",
- // expectedCompletionNodeToString:
- "<CompleteOnType:M>",
- // expectedUnitDisplayString:
- "package p;\n" +
- "class CCHelper {\n" +
- " class Member1 {\n" +
- " Member1() {\n" +
- " }\n" +
- " }\n" +
- " class Member2 {\n" +
- " Member2() {\n" +
- " }\n" +
- " }\n" +
- " CCHelper() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n" +
- "public class CC {\n" +
- " public CC() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new CCHelper().new CCHelper().new <CompleteOnType:M>();\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "M",
- // expectedReplacedSource:
- "M",
- // test name
- "<regression test 1FTEO9L (fourth case)>"
- );
-}
-/*
- * Completion inside a case that has an identifier as its constant expression.
- */
-public void testInCaseWithIdentifier() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " label1: { \n" +
- " switch (i) { \n" +
- " case a: label2: X o = new Object(); \n" +
- " } \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " {\n" +
- " <CompleteOnName:X>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "X",
- // expectedLabels:
- new String[] {"label1", "label2"},
- // test name
- "<complete in case with identifier>"
- );
-}
-/*
- * Completion inside a case that has a number as its constant expression.
- */
-public void testInCaseWithNumberConstant() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " label1: { \n" +
- " switch (i) { \n" +
- " case 1: label2: X o = new Object(); \n" +
- " } \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " {\n" +
- " <CompleteOnName:X>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "X",
- // expectedLabels:
- new String[] {"label1", "label2"},
- // test name
- "<complete in case with number>"
- );
-}
-/*
- * Completion inside an inner class defined inside a labeled statement.
- */
-public void testInLabeledInnerClass() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " label1: { \n" +
- " Object o = new Object() { \n" +
- " void fred() { \n" +
- " label2: { \n" +
- " X o = new Object(); \n" +
- " } \n" +
- " } \n" +
- " }; \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " Object o;\n" +
- " new Object() {\n" +
- " void fred() {\n" +
- " {\n" +
- " <CompleteOnName:X>;\n" +
- " }\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "X",
- // expectedLabels:
- new String[] {"label2"},
- // test name
- "<complete in labeled inner class>"
- );
-}
-/*
- * Completion inside an inner class defined inside a labeled statement with a syntax error
- * just before the labeled statement.
- */
-public void testInLabeledInnerClassWithErrorBefore() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i == 2; \n" +
- " label1: { \n" +
- " Object o = new Object() { \n" +
- " void fred() { \n" +
- " label2: { \n" +
- " X o = new Object(); \n" +
- " } \n" +
- " } \n" +
- " }; \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " {\n" +
- " Object o;\n" +
- " new Object() {\n" +
- " void fred() {\n" +
- " {\n" +
- " <CompleteOnName:X>;\n" +
- " }\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "X",
- // expectedLabels:
- new String[] {"label2"},
- // test name
- "<complete in labeled inner class with syntax error before>"
- );
-}
-/*
- * Completion inside a labeled statement one level deep.
- */
-public void testOneLevelDeep() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " label1: X o = new Object(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:X>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "X",
- // expectedLabels:
- new String[] {"label1"},
- // test name
- "<complete in one level deep>"
- );
-}
-/*
- * Completion inside a labeled statement which is the second one in the method.
- */
-public void testSecondLabel() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " label1: buzz(); \n" +
- " label2: X o = new Object(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:X>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "X",
- // expectedLabels:
- new String[] {"label2"},
- // test name
- "<complete in second labeled statement>"
- );
-}
-/*
- * Completion inside a labeled statement two level deep.
- */
-public void testTwoLevelDeep() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " label1: { \n" +
- " label2: X o = new Object(); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " <CompleteOnName:X>;\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "X",
- // expectedLabels:
- new String[] {"label1", "label2"},
- // test name
- "<complete in two level deep>"
- );
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/MethodInvocationCompletionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/MethodInvocationCompletionTest.java
deleted file mode 100644
index e96a683..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/MethodInvocationCompletionTest.java
+++ /dev/null
@@ -1,863 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-/**
- * Completion is expected to be a FunctionInvocation.
- */
-public class MethodInvocationCompletionTest extends AbstractCompletionTest {
-public MethodInvocationCompletionTest(String testName) {
- super(testName);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(MethodInvocationCompletionTest.class);
-}
-/*
- * Completion with no receiver inside a for statement.
- */
-public void test1FVVWS8_1() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class X { \n" +
- " void foo() { \n" +
- " for (int i = 10; i > 0; --i) \n" +
- " fred( \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:fred()>",
- // expectedUnitDisplayString:
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " <CompleteOnMessageSend:fred()>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(",
- // test name
- "<1FVVWS8_1>"
- );
-}
-/*
- * Completion with no receiver inside an if statement.
- */
-public void test1FVVWS8_2() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class X { \n" +
- " void foo() { \n" +
- " if (true) \n" +
- " fred( \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:fred()>",
- // expectedUnitDisplayString:
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:fred()>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(",
- // test name
- "<1FVVWS8_2>"
- );
-}
-/*
- * Completion with no receiver inside a for statement
- * and after a field access.
- */
-public void test1FW2ZTB_1() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class X { \n" +
- " int[] array; \n" +
- " void foo() { \n" +
- " for (int i = this.array.length; i > 0; --i) \n" +
- " fred( \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:fred()>",
- // expectedUnitDisplayString:
- "class X {\n" +
- " int[] array;\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " <CompleteOnMessageSend:fred()>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(",
- // test name
- "<1FW2ZTB_1"
- );
-}
-/*
- * Completion with no receiver inside another message send
- * and after a field access in a previous argument.
- */
-public void test1FW2ZTB_2() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class X { \n" +
- " int[] array; \n" +
- " void foo() { \n" +
- " bar(this.array.length, 10, fred( \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:fred()>",
- // expectedUnitDisplayString:
- "class X {\n" +
- " int[] array;\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:fred()>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(",
- // test name
- "<1FW2ZTB_2"
- );
-}
-/*
- * Complete on method invocation with expression receiver
- * inside another invocation with no receiver.
- */
-public void test1FW35YZ_1() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " bar(primary().fred( \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:primary().fred()>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:primary().fred()>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(",
- // test name
- "<1FW35YZ_1>"
- );
-}
-/*
- * Complete on qualified allocation expression
- * inside an invocation with no receiver.
- */
-public void test1FW35YZ_2() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " bar(primary().new X( \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X(",
- // expectedCompletionNodeToString:
- "<CompleteOnQualifiedAllocationExpression:primary().new X()>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnQualifiedAllocationExpression:primary().new X()>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<1FW35YZ_2>"
- );
-}
-/*
- * Completion with primary receiver.
- */
-public void test1FWYBKF() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class X { \n" +
- " void foo() { \n" +
- " this.x.bar( \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "bar(",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:this.x.bar()>",
- // expectedUnitDisplayString:
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:this.x.bar()>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "bar(",
- // test name
- "<1FWYBKF>"
- );
-}
-/*
- * Completion just after a parameter which is a message send.
- */
-public void test1GAJBUQ() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " x.y.Z.fred(buzz()); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(buzz()",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:x.y.Z.fred(buzz())>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:x.y.Z.fred(buzz())>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(buzz()",
- // test name
- "<1GAJBUQ>"
- );
-}
-/*
- * Completion just before the second parameter, the first parameter being an empty
- * anonymous class.
- */
-public void testAfterEmptyAnonymous() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " this.fred(new Runnable() {}, 2, i); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(new Runnable() {}, ",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:this.fred(new Runnable() {\n})>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:this.fred(new Runnable() {\n" +
- "})>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(new Runnable() {}, ",
- // test name
- "<completion just before second parameter, the first parameter being an empty anonymous class>"
- );
-}
-/*
- * Completion just after the first parameter.
- */
-public void testAfterFirstParameter() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " this.fred(\"abc\" , 2, i); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(\"abc\" ",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:this.fred(\"abc\")>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:this.fred(\"abc\")>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(\"abc\" ",
- // test name
- "<completion just after first parameter>"
- );
-}
-/*
- * Completion just before the first parameter.
- */
-public void testBeforeFirstParameter() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " this.fred(1, 2, i); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:this.fred()>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:this.fred()>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(",
- // test name
- "<completion just before first parameter>"
- );
-}
-/*
- * Completion just before the last parameter.
- */
-public void testBeforeLastParameter() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " this.fred(1, 2, i); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(1, 2,",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:this.fred(1, 2)>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:this.fred(1, 2)>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(1, 2,",
- // test name
- "<completion just before last parameter>"
- );
-}
-/*
- * Completion just before the second parameter.
- */
-public void testBeforeSecondParameter() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " this.fred(1, 2, i); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(1, ",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:this.fred(1)>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:this.fred(1)>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(1, ",
- // test name
- "<completion just before second parameter>"
- );
-}
-/*
- * Completion on empty name inside the expression of the first parameter.
- */
-public void testEmptyInFirstParameter() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " this.fred(\"abc\" + , 2, i); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(\"abc\" +",
- // expectedCompletionNodeToString:
- "<CompleteOnName:>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " (\"abc\" + <CompleteOnName:>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<completion empty in first parameter>"
- );
-}
-/*
- * Completion inside the expression of the first parameter.
- */
-public void testInFirstParameter() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " this.fred(\"abc\" + bizz, 2, i); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(\"abc\" + bi",
- // expectedCompletionNodeToString:
- "<CompleteOnName:bi>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " (\"abc\" + <CompleteOnName:bi>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "bi",
- // expectedReplacedSource:
- "bizz",
- // test name
- "<completion inside first parameter>"
- );
-}
-/*
- * Completion inside an if statement.
- */
-public void testInIfStatement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class X { \n" +
- " void foo() { \n" +
- " if (true) { \n" +
- " bar.fred(); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:bar.fred()>",
- // expectedUnitDisplayString:
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " <CompleteOnMessageSend:bar.fred()>;\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(",
- // test name
- "<completion inside a if statement>"
- );
-}
-/*
- * Completion in labeled method invocation with expression receiver.
- */
-public void testLabeledWithExpressionReceiver() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class X { \n" +
- " void foo() { \n" +
- " label1: bar().fred(1, 2, o); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(1, 2,",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:bar().fred(1, 2)>",
- // expectedUnitDisplayString:
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:bar().fred(1, 2)>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(1, 2,",
- // expectedLabels:
- new String[] {"label1"},
- // test name
- "<completion in labeled method invocation with expression receiver>"
- );
-}
-/*
- * Completion in labeled method invocation without receiver.
- */
-public void testLabeledWithoutReceiver() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " label1: fred(1, 2, o); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(1, 2,",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:fred(1, 2)>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:fred(1, 2)>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(1, 2,",
- // expectedLabels:
- new String[] {"label1"},
- // test name
- "<completion in labeled method invocation without receiver>"
- );
-}
-/*
- * FunctionInvocation ::= Name '(' ArgumentListopt ')'
- */
-public void testNoReceiver() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " fred(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:fred()>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:fred()>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(",
- // test name
- "<completion on method invocation with no receiver>"
- );
-}
-/*
- * Completion just before the first parameter with a space after the open parenthesis.
- */
-public void testSpaceThenFirstParameter() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " this.fred( 1, 2, i); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred( ",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:this.fred()>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:this.fred()>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred( ",
- // test name
- "<completion just before first parameter with a space after open parenthesis>"
- );
-}
-/*
- * FunctionInvocation ::= 'super' '.' 'Identifier' '(' ArgumentListopt ')'
- */
-public void testSuper() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " super.fred(1, 2, i); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:super.fred()>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:super.fred()>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(",
- // test name
- "<completion on super method invocation>"
- );
-}
-/*
- * Complete on method invocation with expression receiver.
- */
-public void testWithExpressionReceiver() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " bar().fred(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:bar().fred()>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:bar().fred()>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(",
- // test name
- "<completion on method invocation with expression receiver>"
- );
-}
-/*
- * Completion with a name receiver.
- */
-public void testWithNameReceiver() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " Vector v = new Vector(); \n" +
- " v.addElement(\"1\"); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "addElement(",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:v.addElement()>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Vector v;\n" +
- " <CompleteOnMessageSend:v.addElement()>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "addElement(",
- // test name
- "<completion with name receiver>"
- );
-}
-/*
- * Completion with a name receiver after conditional expression.
- */
-public void testWithNameReceiverAfterConditionalExpression() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class X { \n" +
- " void foo() { \n" +
- " buzz.test(cond ? max : min); \n" +
- " bar.fred(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred(",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:bar.fred()>",
- // expectedUnitDisplayString:
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnMessageSend:bar.fred()>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(",
- // expectedLabels:
- new String[] {},
- // test name
- "<completion with name receiver after conditional expression>"
- );
-}
-/*
- * Completion with a name receiver and 2 arguments.
- */
-public void testWithNameReceiverAndTwoArgs() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " X x = new X(); \n" +
- " x.fred(1, 2, o); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x.fred(1, 2,",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:x.fred(1, 2)>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " X x;\n" +
- " <CompleteOnMessageSend:x.fred(1, 2)>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(1, 2,",
- // test name
- "<completion with name receiver and 2 arguments>"
- );
-}
-/*
- * Completion with a qualified name receiver.
- */
-public void testWithQualifiedNameReceiver() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " X x = new X(); \n" +
- " y.x.fred(1, 2, o); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x.fred(1, 2,",
- // expectedCompletionNodeToString:
- "<CompleteOnMessageSend:y.x.fred(1, 2)>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " X x;\n" +
- " <CompleteOnMessageSend:y.x.fred(1, 2)>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "fred(1, 2,",
- // test name
- "<completion with qualified name receiver>"
- );
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/NameReferenceCompletionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/NameReferenceCompletionTest.java
deleted file mode 100644
index ffb632c..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/NameReferenceCompletionTest.java
+++ /dev/null
@@ -1,923 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-/**
- * Completion is expected to be a name reference.
- */
-public class NameReferenceCompletionTest extends AbstractCompletionTest {
-public NameReferenceCompletionTest(String testName) {
- super(testName);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(NameReferenceCompletionTest.class);
-}
-/*
- * Regression test for 1FTZ849.
- * The instance creation before the completion is not properly closed, and thus
- * the completion parser used to think the completion was on a type.
- */
-public void test1FTZ849() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " X o = new X; \n" +
- " fred.xyz; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "fred.x",
- // expectedCompletionNodeToString:
- "<CompleteOnName:fred.x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " X o;\n" +
- " <CompleteOnName:fred.x>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "fred.xyz",
- // test name
- "<1FTZ849>"
- );
-}
-/*
- * Completion in a field initializer with no syntax error.
- */
-public void test1FUUP73() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "public class A { \n" +
- " String s = \"hello\"; \n" +
- " Object o = s.concat(\"boo\"); \n",
- // completeBehind:
- "Object o = s",
- // expectedCompletionNodeToString:
- "<CompleteOnName:s>",
- // expectedUnitDisplayString:
- "public class A {\n" +
- " String s;\n" +
- " Object o = <CompleteOnName:s>;\n" +
- " public A() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "s",
- // expectedReplacedSource:
- "s",
- // test name
- "<1FUUP73>"
- );
- this.runTestCheckDietParse(
- // compilationUnit:
- "public class A { \n" +
- " String s = \"hello\"; \n" +
- " Object o = s.concat(\"boo\"); \n",
- // completeBehind:
- "Object o = s.c",
- // expectedCompletionNodeToString:
- "<CompleteOnName:s.c>",
- // expectedUnitDisplayString:
- "public class A {\n" +
- " String s;\n" +
- " Object o = <CompleteOnName:s.c>;\n" +
- " public A() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "c",
- // expectedReplacedSource:
- "s.concat",
- // test name
- "<1FUUP73>"
- );
-}
-/*
- * Regression test for 1FVRQQA.
- */
-public void test1FVRQQA_1() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class X { \n" +
- " void foo() { \n" +
- " Enumeration e = null; \n" +
- " e.to \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "e.to",
- // expectedCompletionNodeToString:
- "<CompleteOnName:e.to>",
- // expectedUnitDisplayString:
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Enumeration e;\n" +
- " <CompleteOnName:e.to>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "to",
- // expectedReplacedSource:
- "e.to",
- // test name
- "<1FVRQQA_1>"
- );
-}
-/*
- * Regression test for 1FVRQQA.
- */
-public void test1FVRQQA_2() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class X { \n" +
- " void foo() { \n" +
- " for (Enumeration e = getSomeEnumeration(); e.has \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "e.has",
- // expectedCompletionNodeToString:
- "<CompleteOnName:e.has>",
- // expectedUnitDisplayString:
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Enumeration e;\n" +
- " <CompleteOnName:e.has>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "has",
- // expectedReplacedSource:
- "e.has",
- // test name
- "<1FVRQQA_2>"
- );
-}
-/*
- * Regression test for 1FVT66Q.
- */
-public void test1FVT66Q_1() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "package test; \n" +
- " \n" +
- "public class Test { \n" +
- " public void foo() { \n" +
- " final int codeAssistTarget= 3; \n" +
- " \n" +
- " Thread t= new Thread() { \n" +
- " public void run() { \n" +
- " codeAss \n" +
- " } \n" +
- " }; \n" +
- " codeA \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- " codeAss",
- // expectedCompletionNodeToString:
- "<CompleteOnName:codeAss>",
- // expectedUnitDisplayString:
- "package test;\n" +
- "public class Test {\n" +
- " public Test() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " final int codeAssistTarget;\n" +
- " Thread t;\n" +
- " new Thread() {\n" +
- " public void run() {\n" +
- " <CompleteOnName:codeAss>;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "codeAss",
- // expectedReplacedSource:
- "codeAss",
- // test name
- "<1FVT66Q_1>"
- );
-}
-/*
- * Regression test for 1FVT66Q.
- */
-public void test1FVT66Q_2() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "package test; \n" +
- " \n" +
- "public class Test { \n" +
- " public void foo() { \n" +
- " final int codeAssistTarget= 3; \n" +
- " \n" +
- " Thread t= new Thread() { \n" +
- " public void run() { \n" +
- " codeAss \n" +
- " } \n" +
- " }; \n" +
- " codeA \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "\n codeA",
- // expectedCompletionNodeToString:
- "<CompleteOnName:codeA>",
- // expectedUnitDisplayString:
- "package test;\n" +
- "public class Test {\n" +
- " public Test() {\n" +
- " }\n" +
- " public void foo() {\n" +
- " final int codeAssistTarget;\n" +
- " Thread t;\n" +
- " <CompleteOnName:codeA>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "codeA",
- // expectedReplacedSource:
- "codeA",
- // test name
- "<1FVT66Q_2>"
- );
-}
-/*
- * Regression test for 1G8DE30.
- */
-public void test1G8DE30() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " new Runnable() { \n" +
- " public void run() { \n" +
- " Bar \n" +
- " } \n" +
- " }; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "public void run() { \n ",
- // expectedCompletionNodeToString:
- "<CompleteOnName:>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new Runnable() {\n" +
- " public void run() {\n" +
- " <CompleteOnName:>;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<1G8DE30>"
- );
-}
-/*
- * Completion on an empty name reference.
- */
-public void testEmptyNameReference() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 0; \n" +
- " \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "int i = 0; \n ",
- // expectedCompletionNodeToString:
- "<CompleteOnName:>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " <CompleteOnName:>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete on empty name reference>"
- );
-}
-/*
- * Completion on an empty name reference after a cast.
- */
-public void testEmptyNameReferenceAfterCast() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class X { \n" +
- " void foo() { \n" +
- " X x = (X) \n" +
- " \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "(X)",
- // expectedCompletionNodeToString:
- "<CompleteOnName:>",
- // expectedUnitDisplayString:
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " X x = (X) <CompleteOnName:>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete on empty name reference after cast>"
- );
-}
-/*
- * Completion on an empty name reference after + operator.
- */
-public void testEmptyNameReferenceAfterPlus() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class X { \n" +
- " void foo() { \n" +
- " 1 + \n" +
- " \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "1 +",
- // expectedCompletionNodeToString:
- "<CompleteOnName:>",
- // expectedUnitDisplayString:
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete on empty name reference after + operator>"
- );
-}
-/*
- * Completion on an empty name reference in an array dimension.
- */
-public void testEmptyNameReferenceInArrayDim() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class X { \n" +
- " void foo() { \n" +
- " int[] \n" +
- " \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "int[",
- // expectedCompletionNodeToString:
- "<CompleteOnName:>",
- // expectedUnitDisplayString:
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete on empty name reference in array dim>"
- );
-}
-/*
- * Completion on an empty name reference in inner class.
- */
-public void testEmptyNameReferenceInInnerClass() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class X { \n" +
- " void foo() { \n" +
- " class Y { \n" +
- " void bar() { \n" +
- " \n" +
- " } \n" +
- " } \n" +
- " \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "\n ",
- // expectedCompletionNodeToString:
- "<CompleteOnName:>",
- // expectedUnitDisplayString:
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " class Y {\n" +
- " Y() {\n" +
- " }\n" +
- " void bar() {\n" +
- " <CompleteOnName:>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete on empty name reference in inner class>"
- );
-}
-/*
- * Completion in the statement following an if expression.
- */
-public void testInIfThenStatement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " if (bar()) \n" +
- " \n" +
- " \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "\n ",
- // expectedCompletionNodeToString:
- "<CompleteOnName:>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete in if then statement>"
- );
-}
-/*
- * Completion on a name reference inside an inner class in a field initializer.
- */
-public void testInnerClassFieldInitializer() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar { \n" +
- " Object o = new Object() { \n" +
- " void foo() { \n" +
- " xyz \n" +
- " } \n" +
- " }; \n" +
- "} \n",
- // completeBehind:
- "xyz",
- // expectedCompletionNodeToString:
- "<CompleteOnName:xyz>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Object o = new Object() {\n" +
- " void foo() {\n" +
- " <CompleteOnName:xyz>;\n" +
- " }\n" +
- " };\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "xyz",
- // expectedReplacedSource:
- "xyz",
- // test name
- "<complete on name reference in inner class in field initializer>"
- );
-}
-/*
- * Completion on an empty name reference inside an invocation in a field initializer.
- */
-public void testInvocationFieldInitializer() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar { \n" +
- " String s = fred(1 + ); \n" +
- " void foo() { \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "(1 + ",
- // expectedCompletionNodeToString:
- "<CompleteOnName:>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " String s = (1 + <CompleteOnName:>);\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "",
- // test name
- "<complete on empty name reference in invocation in field initializer>"
- );
-}
-/*
- * Completion inside an anonymous inner class which is
- * inside a method invocation with receiver.
- */
-public void testMethodInvocationAnonymousInnerClass() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " primary().bizz( \n" +
- " new X() { \n" +
- " void fuzz() { \n" +
- " x.y.z \n" +
- " } \n" +
- " } \n" +
- " ); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x.",
- // expectedCompletionNodeToString:
- "<CompleteOnName:x.>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new X() {\n" +
- " void fuzz() {\n" +
- " <CompleteOnName:x.>;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "x.",
- // test name
- "<complete inside anonymous inner class inside method invocation 1>"
- );
-}
-/*
- * Completion on a qualified name reference, where the cursor is in the
- * first type reference.
- */
-public void testQualifiedNameReferenceShrinkAll() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 0; \n" +
- " a.b.c.Xxx o = new Y(i); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- " a",
- // expectedCompletionNodeToString:
- "<CompleteOnName:a>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " <CompleteOnName:a>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "a",
- // expectedReplacedSource:
- "a",
- // test name
- "<complete on qualified name reference (shrink all)>"
- );
-}
-/*
- * Completion on a qualified name reference, where the cursor is right after the first dot.
- */
-public void testQualifiedNameReferenceShrinkAllButOne() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " static Bar x; \n" +
- " public class InnerBar { \n" +
- " } \n" +
- " public class SubInnerBar extends InnerBar { \n" +
- " SubInnerBar() { \n" +
- " Bar.x.x.super(); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "Bar.",
- // expectedCompletionNodeToString:
- "<CompleteOnName:Bar.>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " public class InnerBar {\n" +
- " public InnerBar() {\n" +
- " }\n" +
- " }\n" +
- " public class SubInnerBar extends InnerBar {\n" +
- " SubInnerBar() {\n" +
- " super();\n" +
- " <CompleteOnName:Bar.>;\n" +
- " }\n" +
- " }\n" +
- " static Bar x;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "Bar.",
- // test name
- "<complete on qualified name reference (shrink all but one)>"
- );
-}
-/*
- * Completion on a qualified name reference, where the cursor is right after the first dot.
- */
-public void testQualifiedNameReferenceShrinkAllButOne2() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 0; \n" +
- " a.b.c.X o = new Y(i); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- " a.",
- // expectedCompletionNodeToString:
- "<CompleteOnName:a.>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " <CompleteOnName:a.>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "a.",
- // test name
- "<complete on qualified name reference (shrink all but one) 2>"
- );
-}
-/*
- * Completion on a qualified name reference,where the cursor is right after the end
- * of the last name reference.
- */
-public void testQualifiedNameReferenceShrinkNone() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " static Bar x; \n" +
- " public class InnerBar { \n" +
- " } \n" +
- " public class SubInnerBar extends InnerBar { \n" +
- " SubInnerBar() { \n" +
- " Bar.x.x.super(); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "Bar.x.x",
- // expectedCompletionNodeToString:
- "<CompleteOnName:Bar.x.x>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " public class InnerBar {\n" +
- " public InnerBar() {\n" +
- " }\n" +
- " }\n" +
- " public class SubInnerBar extends InnerBar {\n" +
- " SubInnerBar() {\n" +
- " super();\n" +
- " <CompleteOnName:Bar.x.x>;\n" +
- " }\n" +
- " }\n" +
- " static Bar x;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "x",
- // expectedReplacedSource:
- "Bar.x.x",
- // test name
- "<complete on qualified name reference (shrink none)>"
- );
-}
-/*
- * Completion on a qualified name reference, where the cursor is right after the end
- * of the last type reference.
- */
-public void testQualifiedNameReferenceShrinkNone2() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 0; \n" +
- " a.b.c.Xxx o = new Y(i); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:a.b.c.X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " <CompleteOnName:a.b.c.X>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "a.b.c.Xxx",
- // test name
- "<complete on qualified name reference (shrink none) 2>"
- );
-}
-/*
- * Completion on a qualified name reference, where the cursor is right after the
- * last dot.
- */
-public void testQualifiedNameReferenceShrinkOne() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " static Bar x; \n" +
- " public class InnerBar { \n" +
- " } \n" +
- " public class SubInnerBar extends InnerBar { \n" +
- " SubInnerBar() { \n" +
- " Bar.x.x.super(); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "Bar.x.",
- // expectedCompletionNodeToString:
- "<CompleteOnName:Bar.x.>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " public class InnerBar {\n" +
- " public InnerBar() {\n" +
- " }\n" +
- " }\n" +
- " public class SubInnerBar extends InnerBar {\n" +
- " SubInnerBar() {\n" +
- " super();\n" +
- " <CompleteOnName:Bar.x.>;\n" +
- " }\n" +
- " }\n" +
- " static Bar x;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "Bar.x.",
- // test name
- "<complete on qualified name reference (shrink one)>"
- );
-}
-/*
- * Completion on a qualified name reference, where the cursor is right after the
- * last dot.
- */
-public void testQualifiedNameReferenceShrinkOne2() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 0; \n" +
- " a.b.c.X o = new Y(i); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "a.b.c.",
- // expectedCompletionNodeToString:
- "<CompleteOnName:a.b.c.>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " <CompleteOnName:a.b.c.>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "a.b.c.",
- // test name
- "<complete on qualified name reference (shrink one) 2>"
- );
-}
-/*
- * Completion on a qualified name reference that contains a unicode.
- */
-public void testUnicode() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class X { \n" +
- " void foo() { \n" +
- " bar.\\u005ax \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x",
- // expectedCompletionNodeToString:
- "<CompleteOnName:bar.Zx>",
- // expectedUnitDisplayString:
- "class X {\n" +
- " X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:bar.Zx>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "Zx",
- // expectedReplacedSource:
- "bar.\\u005ax",
- // test name
- "<complete on unicode>"
- );
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ParserTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ParserTest.java
deleted file mode 100644
index 2d80c97..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ParserTest.java
+++ /dev/null
@@ -1,693 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.eclipse.wst.jsdt.core.tests.compiler.regression.AbstractRegressionTest;
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-
-public class ParserTest extends AbstractRegressionTest {
-static {
-// TESTS_NAMES = new String[] { "test000" };
-// TESTS_NUMBERS = new int[] { 18 };
-// TESTS_RANGE = new int[] { 11, -1 };
-}
-public ParserTest(String name) {
- super(name);
-}
-public void test001() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function foo(){\n" +
- " throws\n" +
- "}\n"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " throws\n" +
- " ^^^^^^\n" +
- "Syntax error on token \"throws\", delete this token\n" +
- "----------\n"
- );
-}
-public void test002() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function foo(){\n" +
- " throws new\n" +
- "}\n"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " throws new\n" +
- " ^^^^^^^^^^\n" +
- "Syntax error on tokens, delete these tokens\n" +
- "----------\n"
- );
-}
-public void test003() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function foo(){\n" +
- " throws new X\n" +
- "}\n"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " throws new X\n" +
- " ^^^^^^\n" +
- "Syntax error on token \"throws\", throw expected\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 2)\n" +
- " throws new X\n" +
- " ^\n" +
- "Syntax error, unexpected end of method\n" +
- "----------\n"
- );
-}
-//public void test004() {
-// this.runNegativeTest(
-// new String[] {
-// "X.js",
-// "public class X {\n" +
-// " {\n" +
-// " throws\n" +
-// " }\n" +
-// "}\n"
-// },
-// "----------\n" +
-// "1. ERROR in X.js (at line 3)\n" +
-// " throws\n" +
-// " ^^^^^^\n" +
-// "Syntax error on token \"throws\", delete this token\n" +
-// "----------\n"
-// );
-//}
-//public void test005() {
-// this.runNegativeTest(
-// new String[] {
-// "X.js",
-// "public class X {\n" +
-// " {\n" +
-// " throws new\n" +
-// " }\n" +
-// "}\n"
-// },
-// "----------\n" +
-// "1. ERROR in X.js (at line 3)\n" +
-// " throws new\n" +
-// " ^^^^^^^^^^\n" +
-// "Syntax error on tokens, delete these tokens\n" +
-// "----------\n"
-// );
-//}
-public void test006() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " {\n" +
- " throws new X\n" +
- "}\n"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 3)\n" +
- " throws new X\n" +
- " ^^^^^^\n" +
- "Syntax error on token \"throws\", throw expected\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 3)\n" +
- " throws new X\n" +
- " ^\n" +
- "Syntax error, unexpected end of initializer\n" +
- "----------\n"
- );
-}
-//public void test007() {
-// this.runNegativeTest(
-// new String[] {
-// "X.js",
-// "public class X {\n" +
-// " void foo()throw {\n" +
-// " }\n" +
-// "}\n"
-// },
-// "----------\n" +
-// "1. ERROR in X.js (at line 1)\n" +
-// " public class X {\n" +
-// " ^\n" +
-// "Syntax error, insert \"}\" to complete ClassBody\n" +
-// "----------\n" +
-// "2. ERROR in X.js (at line 2)\n" +
-// " void foo()throw {\n" +
-// " ^^^^^\n" +
-// "Syntax error on token \"throw\", { expected\n" +
-// "----------\n"
-// );
-//}
-//public void test008() {
-// this.runNegativeTest(
-// new String[] {
-// "X.js",
-// "public class X {\n" +
-// " void foo()throw E {\n" +
-// " }\n" +
-// "}\n"
-// },
-// "----------\n" +
-// "1. ERROR in X.js (at line 1)\n" +
-// " public class X {\n" +
-// " ^\n" +
-// "Syntax error, insert \"}\" to complete ClassBody\n" +
-// "----------\n" +
-// "2. ERROR in X.js (at line 2)\n" +
-// " void foo()throw E {\n" +
-// " ^^^^^\n" +
-// "Syntax error on token \"throw\", throws expected\n" +
-// "----------\n" +
-// "3. ERROR in X.js (at line 4)\n" +
-// " }\n" +
-// " ^\n" +
-// "Syntax error on token \"}\", delete this token\n" +
-// "----------\n"
-// );
-//}
-public void test009() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function foo(){\n" +
- " throws e\n" +
- "}\n"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " throws e\n" +
- " ^^^^^^^^\n" +
- "Syntax error on tokens, delete these tokens\n" +
- "----------\n"
- );
-}
-//public void test010() {
-// this.runNegativeTest(
-// new String[] {
-// "X.js",
-// "public class X {\n" +
-// " void foo(){\n" +
-// " throws e;\n" +
-// " }\n" +
-// "}\n"
-// },
-// "----------\n" +
-// "1. ERROR in X.js (at line 3)\n" +
-// " throws e;\n" +
-// " ^^^^^^\n" +
-// "Syntax error on token \"throws\", throw expected\n" +
-// "----------\n"
-// );
-//}
-//public void test011() {
-// this.runNegativeTest(
-// new String[] {
-// "X.js",
-// "public class X {\n" +
-// " public void foo(X, Object o, String s) {\n" +
-// " }\n" +
-// " public void bar(){}\n" +
-// "}\n"
-// },
-// "----------\n" +
-// "1. ERROR in X.js (at line 2)\n" +
-// " public void foo(X, Object o, String s) {\n" +
-// " ^\n" +
-// "Syntax error on token \",\", . expected\n" +
-// "----------\n"
-// );
-//}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=40681
- */
-public void test012() {
- Hashtable nls = new Hashtable();
- nls.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function foo() {\n" +
- " \"foo\".equals(\"bar\");\n" +
- " ;\n" +
- "}\n"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " \"foo\".equals(\"bar\");\n" +
- " ^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 2)\n" +
- " \"foo\".equals(\"bar\");\n" +
- " ^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n",
- null, // custom classpath
- true, // flush previous output dir content
- nls // custom options
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=40681
- */
-public void test013() {
- Hashtable nls = new Hashtable();
- nls.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function foo() {\n" +
- " \"foo\".equals(\"bar\");\n" +
- " //;\n" +
- "}\n"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " \"foo\".equals(\"bar\");\n" +
- " ^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 2)\n" +
- " \"foo\".equals(\"bar\");\n" +
- " ^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n",
- null, // custom classpath
- true, // flush previous output dir content
- nls // custom options
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=47227
- */
-//public void test014() {
-// this.runNegativeTest(
-// new String[] {
-// "X.js",
-// "public class X {\n" +
-// " public void foo() { \n" +
-// " import java.lang.*;\n" +
-// " } \n" +
-// "}\n"
-// },
-// "----------\n" +
-// "1. ERROR in X.js (at line 3)\n" +
-// " import java.lang.*;\n" +
-// " ^^^^^^\n" +
-// "Syntax error on token \"import\", delete this token\n" +
-// "----------\n" +
-// "2. ERROR in X.js (at line 3)\n" +
-// " import java.lang.*;\n" +
-// " ^^^^^^^^^^^^^^^^^\n" +
-// "Syntax error on token(s), misplaced construct(s)\n" +
-// "----------\n"
-// );
-//}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=60848
- */
-public void _test015() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function foo() {\n" +
- "// some code\n" +
- "}\n" +
- "/*\n" +
- "// some comments\n"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 4)\n" +
- " /*\n" +
- "// some comments\n" +
- "\n" +
- " ^^^^^^^^^^^^^^^^^^^^\n" +
- "Unexpected end of comment\n" +
- "----------\n"
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=60848
- */
-public void test016() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function foo() {\n" +
- " var s = \""
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " var s = \"\n" +
- " ^\n" +
- "String literal is not properly closed by a double-quote\n" +
- "----------\n"
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=60848
- */
-public void test017() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function foo() {\n" +
- " var c = '"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " var c = \'\n" +
- " ^\n" +
- "Invalid character constant\n" +
- "----------\n"
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=60848
- */
-public void test018() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function foo() {\n" +
- " var c = '\\u0"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " var c = \'\\u0\n" +
- " ^^^\n" +
- "Invalid unicode\n" +
- "----------\n"
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=12287
- */
-public void test019() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function doit() {\n" +
- " var foo = null;\n" +
- " foo[0] = \n" +
- "}"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 3)\n" +
- " foo[0] = \n" +
- " ^\n" +
- "Syntax error, insert \"AssignmentOperator Expression\" to complete Assignment\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 3)\n" +
- " foo[0] = \n" +
- " ^\n" +
- "Syntax error, insert \";\" to complete Statement\n" +
- "----------\n"
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=38895
- */
-public void test020() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function main( args) {\n" +
- " }\n" +
- " function newLibraryEntry() {\n" +
-
- " if (sourceAttachmentPath != null) {\n" +
- " if (sourceAttachmentPath.isEmpty()) { && !\n" +
- "sourceAttachmentPath.isAbsolute()) {\n" +
- " foo();\n" +
- " }\n" +
- " return null;\n" +
- " }\n" +
- " }\n" +
- " function foo() {\n" +
- " }\n" +
- " function bar() {\n" +
- " }\n" +
- ""
- },
- "----------\n" +
- "1. ERROR in X.js (at line 5)\n" +
- " if (sourceAttachmentPath.isEmpty()) { && !\n" +
- " ^^\n" +
- "Syntax error on token \"&&\", invalid (\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 6)\n" +
- " sourceAttachmentPath.isAbsolute()) {\n" +
- " ^\n" +
- "Syntax error on token \"{\", invalid AssignmentOperator\n" +
- "----------\n"
- );
-}
-public void test021() {
- StringBuffer buffer = new StringBuffer();
-// buffer.append("public class X {\n");
- for (int i = 0; i < 1000; i++) {
- buffer.append("\tvar field_" + i + " = 0; \n");
- }
- for (int i = 0; i < 1000; i++) {
- if (i == 0)
- buffer.append("\tfunction method_" + i + "() { /* default */ } \n");
- else
- buffer.append("\tfunction method_" + i + "() { method_" + (i - 1) + "() \n");
- }
-// buffer.append("}\n");
-
- Hashtable options = new Hashtable();
- options.put(CompilerOptions.OPTION_MaxProblemPerUnit, "10");
- this.runNegativeTest(
- new String[] {
- "X.js",
- buffer.toString()
- },
- "----------\n" +
- "1. ERROR in X.js (at line 1002)\n" +
- " void method_1() { method_0() \n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete MethodBody\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 1002)\n" +
- " void method_1() { method_0() \n" +
- " ^\n" +
- "Syntax error, insert \";\" to complete BlockStatements\n" +
- "----------\n" +
- "3. ERROR in X.js (at line 1003)\n" +
- " void method_2() { method_1() \n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete MethodBody\n" +
- "----------\n" +
- "4. ERROR in X.js (at line 1003)\n" +
- " void method_2() { method_1() \n" +
- " ^\n" +
- "Syntax error, insert \";\" to complete BlockStatements\n" +
- "----------\n" +
- "5. ERROR in X.js (at line 1004)\n" +
- " void method_3() { method_2() \n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete MethodBody\n" +
- "----------\n" +
- "6. ERROR in X.js (at line 1004)\n" +
- " void method_3() { method_2() \n" +
- " ^\n" +
- "Syntax error, insert \";\" to complete BlockStatements\n" +
- "----------\n" +
- "7. ERROR in X.js (at line 1005)\n" +
- " void method_4() { method_3() \n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete MethodBody\n" +
- "----------\n" +
- "8. ERROR in X.js (at line 1005)\n" +
- " void method_4() { method_3() \n" +
- " ^\n" +
- "Syntax error, insert \";\" to complete BlockStatements\n" +
- "----------\n" +
- "9. ERROR in X.js (at line 1006)\n" +
- " void method_5() { method_4() \n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete MethodBody\n" +
- "----------\n" +
- "10. ERROR in X.js (at line 2001)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n",
- null, // custom classpath
- true, // flush previous output dir content
- options // custom options
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=156119
- */
-public void test022() {
- Map options = getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportEmptyStatement, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- "interface X {\n" +
- " int f= 1;;\n" +
- "}"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " int f= 1;;\n" +
- " ^\n" +
- "Unnecessary semicolon\n" +
- "----------\n",
- null, // custom classpath
- true, // flush previous output dir content
- options // custom options
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=156119
- */
-public void test023() {
- Map options = getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportEmptyStatement, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- "class X {\n" +
- " int f= 1;;\n" +
- "}"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " int f= 1;;\n" +
- " ^\n" +
- "Unnecessary semicolon\n" +
- "----------\n",
- null, // custom classpath
- true, // flush previous output dir content
- options // custom options
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=156119
- */
-public void test024() {
- Map options = getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportEmptyStatement, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- "interface X {\n" +
- " int f= 1;\\u003B\n" +
- "}"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " int f= 1;\\u003B\n" +
- " ^^^^^^\n" +
- "Unnecessary semicolon\n" +
- "----------\n",
- null, // custom classpath
- true, // flush previous output dir content
- options // custom options
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=160337
- */
-public void test025() {
- Map options = getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportUndocumentedEmptyBlock, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- "public class X {\n" +
- " static class Y {\n" +
- " public void foo(int i) {}\n" +
- " }\n" +
- " static Y FakeInvocationSite = new Y(){\n" +
- " public void foo(int i) {}\n" +
- " };\n" +
- "}"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 3)\n" +
- " public void foo(int i) {}\n" +
- " ^^\n" +
- "Empty block should be documented\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 6)\n" +
- " public void foo(int i) {}\n" +
- " ^^\n" +
- "Empty block should be documented\n" +
- "----------\n",
- null, // custom classpath
- true, // flush previous output dir content
- options // custom options
- );
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=160337
- */
-public void test026() {
- Map options = getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportUndocumentedEmptyBlock, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- "public class X {\n" +
- " static class Y {\n" +
- " public void foo(int i) {}\n" +
- " }\n" +
- " static Y FakeInvocationSite = new Y(){\n" +
- " public void foo(int i) {\n" +
- " class A {\n" +
- " A() {}\n" +
- " public void bar() {}\n" +
- " }\n" +
- " new A().bar();\n" +
- " }\n" +
- " };\n" +
- "}"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 3)\n" +
- " public void foo(int i) {}\n" +
- " ^^\n" +
- "Empty block should be documented\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 8)\n" +
- " A() {}\n" +
- " ^^\n" +
- "Empty block should be documented\n" +
- "----------\n" +
- "3. ERROR in X.js (at line 9)\n" +
- " public void bar() {}\n" +
- " ^^\n" +
- "Empty block should be documented\n" +
- "----------\n",
- null, // custom classpath
- true, // flush previous output dir content
- options // custom options
- );
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ReferenceTypeCompletionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ReferenceTypeCompletionTest.java
deleted file mode 100644
index bc4427a..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ReferenceTypeCompletionTest.java
+++ /dev/null
@@ -1,1553 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-/**
- * Completion is expected to be a ReferenceType.
- */
-public class ReferenceTypeCompletionTest extends AbstractCompletionTest {
-public ReferenceTypeCompletionTest(String testName) {
- super(testName);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(ReferenceTypeCompletionTest.class);
-}
-/*
- * Regression test for 1FTZCIG.
- */
-public void test1FTZCIG() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " new X() { \n" +
- " protected void bar() { \n" +
- " } \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "p",
- // expectedCompletionNodeToString:
- "<CompleteOnType:p>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new X() {\n" +
- " <CompleteOnType:p>;\n" +
- " void bar() {\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "p",
- // expectedReplacedSource:
- "protected",
- // test name
- "<1FTZCIG>"
- );
-}
-/*
- * Block ::= OpenBlock '{' <BlockStatementsopt> '}'
- */
-public void testBlock() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " try { \n" +
- " Xxx o = new Y(); \n" +
- " } catch (Exception e) { \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " <CompleteOnName:X>;\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on block>"
- );
-}
-/*
- * BlockStatements ::= BlockStatements <BlockStatement>
- */
-public void testBlockStatements() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 0; \n" +
- " Xxx o = new Y(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " <CompleteOnName:X>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on block statements>"
- );
-}
-/*
- * CatchClause ::= 'catch' '(' <FormalParameter> ')' Block
- */
-public void testCatchClause1() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " try { \n" +
- " fred(); \n" +
- " } catch (Xxx e) { \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnException:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " try \n" +
- " {\n" +
- " fred();\n" +
- " }\n" +
- " catch (<CompleteOnException:X> ) {\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on catch clause 1>"
- );
-}
-/*
- * CatchClause ::= 'catch' '(' <FormalParameter> ')' Block
- */
-public void testCatchClause2() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " try { \n" +
- " fred(); \n" +
- " } catch (final Xxx e) { \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnException:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " try \n" +
- " {\n" +
- " fred();\n" +
- " }\n" +
- " catch (<CompleteOnException:X> ) {\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on catch clause 2>"
- );
-}
-/*
- * CatchClause ::= 'catch' '(' <FormalParameter> ')' Block
- */
-public void testCatchClause3() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " try { \n" +
- " fred(); \n" +
- " } catch (x.y.Xxx e) { \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "x.y.X",
- // expectedCompletionNodeToString:
- "<CompleteOnException:x.y.X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " try \n" +
- " {\n" +
- " fred();\n" +
- " }\n" +
- " catch (<CompleteOnException:x.y.X> ) {\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "x.y.Xxx",
- // test name
- "<complete on catch clause 3>"
- );
-}
-/*
- * ClassBody ::= '{' <ClassBodyDeclarationsopt> '}'
- */
-public void testClassBody() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar { \n" +
- " Xxx foo() { \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " <CompleteOnType:X>\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on class body>"
- );
-}
-/*
- * ClassBodyDeclarations ::= ClassBodyDeclarations <ClassBodyDeclaration>
- */
-public void testClassBodyDeclarations() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar { \n" +
- " int i = 0; \n" +
- " Xxx foo() { \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " int i;\n" +
- " Bar() {\n" +
- " }\n" +
- " <CompleteOnType:X>\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on class body declarations>"
- );
-}
-/*
- * ClassInstanceCreationExpression ::= 'new' <ClassType> '(' ArgumentListopt ')' ClassBodyopt
- */
-public void testClassInstanceCreationExpression1() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " new Xxx().zzz(); \n" +
- " } \n" +
- "}\n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new <CompleteOnType:X>();\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on class instance creation expression 1>"
- );
-}
-/*
- * ClassInstanceCreationExpression ::= 'new' <ClassType> '(' ArgumentListopt ')' ClassBodyopt
- */
-public void testClassInstanceCreationExpression2() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " new Y(new Xxx()).zzz(); \n" +
- " } \n" +
- "}\n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new Y(new <CompleteOnType:X>());\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on class instance creation expression 2>"
- );
-}
-/*
- * ClassInstanceCreationExpression ::= 'new' <ClassType> '(' ArgumentListopt ')' ClassBodyopt
- */
-public void testClassInstanceCreationExpression3() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " new Y(1, true, new Xxx()).zzz(); \n" +
- " } \n" +
- "}\n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new Y(1, true, new <CompleteOnType:X>());\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on class instance creation expression 3>"
- );
-}
-/*
- * ClassInstanceCreationExpression ::= 'new' <ClassType> '(' ArgumentListopt ')' ClassBodyopt
- */
-public void testClassInstanceCreationExpression4() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " fred().new Y(new Xxx()).zzz(); \n" +
- " } \n" +
- "}\n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " fred().new Y(new <CompleteOnType:X>());\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on class instance creation expression 4>"
- );
-}
-/*
- * ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
- */
-public void testClassInstanceCreationExpressionName1() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "public class Bar { \n" +
- " static Bar baz; \n" +
- " public class X { \n" +
- " void foo() { \n" +
- " Bar.baz.new Xxx(); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "new X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "public class Bar {\n" +
- " public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " Bar.baz.new <CompleteOnType:X>();\n" +
- " }\n" +
- " }\n" +
- " static Bar baz;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on class instance creation expression with name 1>"
- );
-}
-/*
- * ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
- */
-public void testClassInstanceCreationExpressionName2() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "public class Bar { \n" +
- " static Bar baz; \n" +
- " public class X { \n" +
- " void foo() { \n" +
- " new Y(Bar.baz.new Xxx()); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "new X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "public class Bar {\n" +
- " public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new Y(Bar.baz.new <CompleteOnType:X>());\n" +
- " }\n" +
- " }\n" +
- " static Bar baz;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on class instance creation expression with name 2>"
- );
-}
-/*
- * ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
- */
-public void testClassInstanceCreationExpressionName3() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "public class Bar { \n" +
- " static Bar baz; \n" +
- " public class X { \n" +
- " void foo() { \n" +
- " new Y(1, true, Bar.baz.new Xxx()); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "new X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "public class Bar {\n" +
- " public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new Y(1, true, Bar.baz.new <CompleteOnType:X>());\n" +
- " }\n" +
- " }\n" +
- " static Bar baz;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on class instance creation expression with name 3>"
- );
-}
-/*
- * ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
- */
-public void testClassInstanceCreationExpressionName4() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "public class Bar { \n" +
- " static Bar baz; \n" +
- " public class X { \n" +
- " void foo() { \n" +
- " fred().new Y(Bar.baz.new Xxx()); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "new X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "public class Bar {\n" +
- " public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " fred().new Y(Bar.baz.new <CompleteOnType:X>());\n" +
- " }\n" +
- " }\n" +
- " static Bar baz;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " public Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on class instance creation expression with name 4>"
- );
-}
-/*
- * ClassInstanceCreationExpression ::= Primary '.' 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
- */
-public void testClassInstanceCreationExpressionPrimary1() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "public class Bar { \n" +
- " public class X { \n" +
- " void foo() { \n" +
- " new Bar().new Xxx(); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "new X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "public class Bar {\n" +
- " public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new Bar().new <CompleteOnType:X>();\n" +
- " }\n" +
- " }\n" +
- " public Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on class instance creation expression with primary 1>"
- );
-}
-/*
- * ClassInstanceCreationExpression ::= Primary '.' 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
- */
-public void testClassInstanceCreationExpressionPrimary2() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "public class Bar { \n" +
- " public class X { \n" +
- " void foo() { \n" +
- " new Y(new Bar().new Xxx()); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "new X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "public class Bar {\n" +
- " public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new Y(new Bar().new <CompleteOnType:X>());\n" +
- " }\n" +
- " }\n" +
- " public Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on class instance creation expression with primary 2>"
- );
-}
-/*
- * ClassInstanceCreationExpression ::= Primary '.' 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
- */
-public void testClassInstanceCreationExpressionPrimary3() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "public class Bar { \n" +
- " public class X { \n" +
- " void foo() { \n" +
- " fred().new Y(new Bar().new Xxx()); \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "new X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "public class Bar {\n" +
- " public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " fred().new Y(new Bar().new <CompleteOnType:X>());\n" +
- " }\n" +
- " }\n" +
- " public Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on class instance creation expression with primary 3>"
- );
-}
-/*
- * ClassInstanceCreationExpression ::= Primary '.' 'new' SimpleName '(' ArgumentListopt ')' ClassBodyopt
- */
-public void testClassInstanceCreationExpressionPrimary4() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "public class Bar { \n" +
- " public class X { \n" +
- " void foo() { \n" +
- " new Y(1, true, new Bar().new Xxx());\n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "new X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "public class Bar {\n" +
- " public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " new Y(1, true, new Bar().new <CompleteOnType:X>());\n" +
- " }\n" +
- " }\n" +
- " public Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on class instance creation expression with primary 4>"
- );
-}
-/*
- * ClassTypeList ::= ClassTypeList ',' <ClassTypeElt>
- */
-public void testClassTypeList() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() throws Exception, Xxx { \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnException:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() throws Exception, <CompleteOnException:X> {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on class type list>"
- );
-}
-/*
- * ConstructorBody ::= NestedMethod '{' <BlockStatementsopt> '}'
- */
-public void testConstructorBody() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " Bar() { \n" +
- " Xxx o = new Y(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " super();\n" +
- " <CompleteOnName:X>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on constructor body>"
- );
-}
-/*
- * ConstructorDeclarator ::= 'Identifier' '(' <FormalParameterListopt> ')'
- */
-public void testConstructorDeclarator() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar { \n" +
- " Bar(Xxx o) { \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar(<CompleteOnType:X> o) {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on constructor declarator>"
- );
-}
-/*
- * The reference type is burried in several blocks
- */
-public void testDeepReference() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " if (a == 2) { \n" +
- " } \n" +
- " try { \n" +
- " } finally { \n" +
- " if (1 == fgh) { \n" +
- " Xxx o = null; \n" +
- " } \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " {\n" +
- " <CompleteOnName:X>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on deep type>"
- );
-}
-/*
- * Super ::= 'extends' <ClassType>
- */
-public void testExtendsClass() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar extends Xxx { \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnClass:X>",
- // expectedUnitDisplayString:
- "class Bar extends <CompleteOnClass:X> {\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on extends>"
- );
-}
-/*
- * ExtendsInterfaces ::= 'extends' <InterfaceTypeList>
- */
-public void testExtendsInterface() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "interface Bar extends Xxx { \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnInterface:X>",
- // expectedUnitDisplayString:
- "interface Bar extends <CompleteOnInterface:X> {\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on extends>"
- );
-}
-/*
- * FieldDeclaration ::= Modifiersopt <Type> VariableDeclarators ';'
- * where Modifiersopt is not empty
- */
-public void testFieldDeclarationWithModifiers() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar { \n" +
- " public final Xxx foo; \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>;",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " <CompleteOnType:X>;\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on field declaration with modifiers>"
- );
-}
-/*
- * FieldDeclaration ::= Modifiersopt <Type> VariableDeclarators ';'
- * where Modifiersopt is empty
- */
-public void testFieldDeclarationWithoutModifiers() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar { \n" +
- " Xxx foo; \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>;",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " <CompleteOnType:X>;\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on field declaration without modifiers>"
- );
-}
-/*
- * FormalParameter ::= Modifiers <Type> VariableDeclaratorId
- */
-public void testFormalParameter() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo(final Xxx x) { \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo(final <CompleteOnType:X> x) {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on formal parameter>"
- );
-}
-/*
- * FormalParameterList ::= FormalParameterList ',' <FormalParameter>
- */
-public void testFormalParameterList() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo(int i, final Object o, Xxx x) {\n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo(int i, final Object o, <CompleteOnType:X> x) {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on formal parameter list>"
- );
-}
-/*
- * ForStatement ::= 'for' '(' <ForInitopt> ';' Expressionopt ';' ForUpdateopt ')' Statement
- * or
- * ForStatementNoShortIf ::= 'for' '(' <ForInitopt> ';' Expressionopt ';' ForUpdateopt ')' StatementNoShortIf
- */
-public void testForStatement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " for (Xxx o = new Y(); o.size() < 10; ) {\n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:X>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on for statement>"
- );
-}
-/*
- * Interfaces ::= 'implements' <InterfaceTypeList>
- */
-public void testImplements() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar implements Xxx { \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnInterface:X>",
- // expectedUnitDisplayString:
- "class Bar implements <CompleteOnInterface:X> {\n" +
- " Bar() {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on implements>"
- );
-}
-/*
- * RelationalExpression ::= RelationalExpression 'instanceof' <ReferenceType>
- */
-public void testInstanceOf() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " boolean foo() { \n" +
- " return this instanceof Xxx; \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " boolean foo() {\n" +
- " (this instanceof <CompleteOnType:X>);\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on instanceof>"
- );
-}
-/*
- * InterfaceBody ::= '{' <InterfaceMemberDeclarationsopt> '}'
- */
-public void testInterfaceBody() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "interface Bar { \n" +
- " Xxx foo(); \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "interface Bar {\n" +
- " <CompleteOnType:X>\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on interface body>"
- );
-}
-/*
- * InterfaceMemberDeclarations ::= InterfaceMemberDeclarations <InterfaceMemberDeclaration>
- */
-public void testInterfaceMemberDeclarations() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "interface Bar { \n" +
- " int CONSTANT = 0; \n" +
- " Xxx foo(); \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "interface Bar {\n" +
- " int CONSTANT;\n" +
- " <clinit>() {\n" +
- " }\n" +
- " <CompleteOnType:X>\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on interface member declarations>"
- );
-}
-/*
- * InterfaceTypeList ::= InterfaceTypeList ',' <InterfaceType>
- */
-public void testInterfaceTypeList() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "interface Bar extends Comparable, Xxx { \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnInterface:X>",
- // expectedUnitDisplayString:
- "interface Bar extends Comparable, <CompleteOnInterface:X> {\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on interface list>"
- );
-}
-/*
- * LocalVariableDeclaration ::= Modifiers <Type> VariableDeclarators
- */
-public void testLocalVariableDeclaration() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " final Xxx o = new Y(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:X>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on local variable declaration>"
- );
-}
-/*
- * MethodBody ::= NestedMethod '{' <BlockStatementsopt> '}'
- */
-public void testMethodBody() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " Xxx o = new Y(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " <CompleteOnName:X>;\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on method body>"
- );
-}
-/*
- * MethodDeclarator ::= 'Identifier' '(' <FormalParameterListopt> ')' Dimsopt
- */
-public void testMethodDeclarator() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo(Xxx o) { \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo(<CompleteOnType:X> o) {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on method declarator>"
- );
-}
-/*
- * MethodHeader ::= Modifiersopt <Type> MethodDeclarator Throwsopt
- * where Modifiersopt is not empty
- */
-public void testMethodHeaderWithModifiers() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar { \n" +
- " public static Xxx foo() { \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " <CompleteOnType:X>\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on method header with modifiers>"
- );
-}
-/*
- * MethodHeader ::= Modifiersopt <Type> MethodDeclarator Throwsopt
- * where Modifiersopt is empty
- */
-public void testMethodHeaderWithoutModifiers() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar { \n" +
- " Xxx foo() { \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " <CompleteOnType:X>\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on method header without modifiers>"
- );
-}
-/*
- * Completion on a qualified type reference, where the cursor is in the
- * first type reference.
- */
-public void testQualifiedTypeReferenceShrinkAll() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 0; \n" +
- " new a.b.c.Xxx(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- " new a",
- // expectedCompletionNodeToString:
- "<CompleteOnType:a>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " new <CompleteOnType:a>();\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "a",
- // expectedReplacedSource:
- "a",
- // test name
- "<complete on qualified type reference (shrink all)>"
- );
-}
-/*
- * Completion on a qualified type reference, where the cursor is right after the first dot.
- */
-public void testQualifiedTypeReferenceShrinkAllButOne() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 0; \n" +
- " new a.b.c.Xxx(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "a.",
- // expectedCompletionNodeToString:
- "<CompleteOnType:a.>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " new <CompleteOnType:a.>();\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "a.",
- // test name
- "<complete on qualified type reference (shrink all but one)>"
- );
-}
-/*
- * Completion on a qualified type reference, where the cursor is right after the end
- * of the last type reference.
- */
-public void testQualifiedTypeReferenceShrinkNone() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 0; \n" +
- " new a.b.c.Xxx(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnType:a.b.c.X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " new <CompleteOnType:a.b.c.X>();\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "a.b.c.Xxx",
- // test name
- "<complete on qualified type reference (shrink none)>"
- );
-}
-/*
- * Completion on a qualified type reference, where the cursor is right after the
- * last dot.
- */
-public void testQualifiedTypeReferenceShrinkOne() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 0; \n" +
- " new a.b.c.Xxx(); \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "a.b.c.",
- // expectedCompletionNodeToString:
- "<CompleteOnType:a.b.c.>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " new <CompleteOnType:a.b.c.>();\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "",
- // expectedReplacedSource:
- "a.b.c.",
- // test name
- "<complete on qualified type reference (shrink one)>"
- );
-}
-/*
- * SwitchBlockStatement ::= SwitchLabels <BlockStatements>
- */
-public void testSwitchBlockStatement() {
- this.runTestCheckMethodParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() { \n" +
- " int i = 1; \n" +
- " switch (i) { \n" +
- " case 1: \n" +
- " Xxx o = fred(i); \n" +
- " break; \n" +
- " default: \n" +
- " } \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnName:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() {\n" +
- " int i;\n" +
- " {\n" +
- " <CompleteOnName:X>;\n" +
- " }\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on switch block statement>"
- );
-}
-/*
- * Throws ::= 'throws' <ClassTypeList>
- */
-public void testThrows() {
- this.runTestCheckDietParse(
- // compilationUnit:
- "class Bar { \n" +
- " void foo() throws Xxx { \n" +
- " } \n" +
- "} \n",
- // completeBehind:
- "X",
- // expectedCompletionNodeToString:
- "<CompleteOnException:X>",
- // expectedUnitDisplayString:
- "class Bar {\n" +
- " Bar() {\n" +
- " }\n" +
- " void foo() throws <CompleteOnException:X> {\n" +
- " }\n" +
- "}\n",
- // expectedCompletionIdentifier:
- "X",
- // expectedReplacedSource:
- "Xxx",
- // test name
- "<complete on throws>"
- );
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/RunCompletionParserTests.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/RunCompletionParserTests.java
deleted file mode 100644
index 0c7d6d9..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/RunCompletionParserTests.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.jsdt.core.tests.junit.extension.TestCase;
-import org.eclipse.wst.jsdt.core.tests.util.AbstractCompilerTest;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class RunCompletionParserTests extends junit.framework.TestCase {
-
- public final static List TEST_CLASSES = new ArrayList();
- public final static List TEST_CLASSES_1_5 = new ArrayList();
- static {
- TEST_CLASSES.add(AllocationExpressionCompletionTest.class);
- TEST_CLASSES.add(CompletionParserTest.class);
- TEST_CLASSES.add(CompletionParserTest2.class);
- TEST_CLASSES.add(CompletionParserTestKeyword.class);
- TEST_CLASSES.add(CompletionRecoveryTest.class);
- TEST_CLASSES.add(FieldAccessCompletionTest.class);
- TEST_CLASSES.add(JavadocCompletionParserTest.class);
- TEST_CLASSES.add(LabelStatementCompletionTest.class);
- TEST_CLASSES.add(MethodInvocationCompletionTest.class);
- TEST_CLASSES.add(NameReferenceCompletionTest.class);
-
- }
-
- public RunCompletionParserTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- ArrayList testClasses = new ArrayList();
-
- testClasses.addAll(RunCompletionParserTests.TEST_CLASSES);
-
- TestSuite all = new TestSuite(TestAll.class.getName());
- int possibleComplianceLevels = AbstractCompilerTest.getPossibleComplianceLevels();
- if ((possibleComplianceLevels & AbstractCompilerTest.F_1_3) != 0) {
- ArrayList tests_1_3 = (ArrayList)testClasses.clone();
- // Reset forgotten subsets tests
- TestCase.TESTS_PREFIX = null;
- TestCase.TESTS_NAMES = null;
- TestCase.TESTS_NUMBERS= null;
- TestCase.TESTS_RANGE = null;
- TestCase.RUN_ONLY_ID = null;
- all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_3, tests_1_3));
- }
- if ((possibleComplianceLevels & AbstractCompilerTest.F_1_4) != 0) {
- ArrayList tests_1_4 = (ArrayList)testClasses.clone();
- // Reset forgotten subsets tests
- TestCase.TESTS_PREFIX = null;
- TestCase.TESTS_NAMES = null;
- TestCase.TESTS_NUMBERS= null;
- TestCase.TESTS_RANGE = null;
- TestCase.RUN_ONLY_ID = null;
- all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_4, tests_1_4));
- }
- if ((possibleComplianceLevels & AbstractCompilerTest.F_1_5) != 0) {
- ArrayList tests_1_5 = (ArrayList)testClasses.clone();
- tests_1_5.addAll(TEST_CLASSES_1_5);
- // Reset forgotten subsets tests
- TestCase.TESTS_PREFIX = null;
- TestCase.TESTS_NAMES = null;
- TestCase.TESTS_NUMBERS= null;
- TestCase.TESTS_RANGE = null;
- TestCase.RUN_ONLY_ID = null;
- all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_5, tests_1_5));
- }
- if ((possibleComplianceLevels & AbstractCompilerTest.F_1_6) != 0) {
- ArrayList tests_1_6 = (ArrayList)testClasses.clone();
- tests_1_6.addAll(TEST_CLASSES_1_5);
- // Reset forgotten subsets tests
- TestCase.TESTS_PREFIX = null;
- TestCase.TESTS_NAMES = null;
- TestCase.TESTS_NUMBERS= null;
- TestCase.TESTS_RANGE = null;
- TestCase.RUN_ONLY_ID = null;
- all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_6, tests_1_6));
- }
- if ((possibleComplianceLevels & AbstractCompilerTest.F_1_7) != 0) {
- ArrayList tests_1_7 = (ArrayList)testClasses.clone();
- tests_1_7.addAll(TEST_CLASSES_1_5);
- // Reset forgotten subsets tests
- TestCase.TESTS_PREFIX = null;
- TestCase.TESTS_NAMES = null;
- TestCase.TESTS_NUMBERS= null;
- TestCase.TESTS_RANGE = null;
- TestCase.RUN_ONLY_ID = null;
- all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_7, tests_1_7));
- }
-
-
- return all;
- }
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SelectionJavadocTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SelectionJavadocTest.java
deleted file mode 100644
index 3bc19ba..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SelectionJavadocTest.java
+++ /dev/null
@@ -1,865 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import java.util.Locale;
-
-import org.eclipse.wst.jsdt.core.tests.util.Util;
-import org.eclipse.wst.jsdt.internal.codeassist.select.SelectionJavadoc;
-import org.eclipse.wst.jsdt.internal.codeassist.select.SelectionParser;
-import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
-import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
-import org.eclipse.wst.jsdt.internal.compiler.DefaultErrorHandlingPolicies;
-import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.ast.ConstructorDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.ast.MethodDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
-import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
-import org.eclipse.wst.jsdt.internal.compiler.lookup.CompilationUnitScope;
-import org.eclipse.wst.jsdt.internal.compiler.lookup.MethodScope;
-import org.eclipse.wst.jsdt.internal.compiler.lookup.Scope;
-import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblemFactory;
-import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
-
-import junit.framework.Test;
-
-/**
- * Class to test selection in Javadoc comments.
- * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=54968"
- */
-public class SelectionJavadocTest extends AbstractSelectionTest {
-
- String source;
- StringBuffer result;
- ICompilationUnit unit;
-
- public SelectionJavadocTest(String testName) {
- super(testName);
- }
-
- static {
-// TESTS_NUMBERS = new int[] { 9, 10 };
-// TESTS_RANGE = new int[] { 26, -1 };
- }
-
- public static Test suite() {
- return buildAllCompliancesTestSuite(SelectionJavadocTest.class);
- }
-
- class SelectionVisitor extends ASTVisitor {
-
- public boolean visit(ConstructorDeclaration constructor, ClassScope scope) {
- if (constructor.javadoc != null) {
- assertTrue("Invalid type for Javadoc on " + constructor, constructor.javadoc instanceof SelectionJavadoc);
- SelectionJavadocTest.this.result.append(constructor.javadoc.toString());
- }
- return super.visit(constructor, scope);
- }
-
- public boolean visit(FieldDeclaration field, MethodScope scope) {
- if (field.javadoc != null) {
- assertTrue("Invalid type for Javadoc on " + field, field.javadoc instanceof SelectionJavadoc);
- SelectionJavadocTest.this.result.append(field.javadoc.toString());
- }
- return super.visit(field, scope);
- }
-
- public boolean visit(MethodDeclaration method, Scope scope) {
- if (method.javadoc != null) {
- assertTrue("Invalid type for Javadoc on " + method, method.javadoc instanceof SelectionJavadoc);
- SelectionJavadocTest.this.result.append(method.javadoc.toString());
- }
- return super.visit(method, scope);
- }
-
- public boolean visit(TypeDeclaration type, BlockScope scope) {
- if (type.javadoc != null) {
- assertTrue("Invalid type for Javadoc on " + type, type.javadoc instanceof SelectionJavadoc);
- SelectionJavadocTest.this.result.append(type.javadoc.toString());
- }
- return super.visit(type, scope);
- }
-
- public boolean visit(TypeDeclaration type, ClassScope scope) {
- if (type.javadoc != null) {
- assertTrue("Invalid type for Javadoc on " + type, type.javadoc instanceof SelectionJavadoc);
- SelectionJavadocTest.this.result.append(type.javadoc.toString());
- }
- return super.visit(type, scope);
- }
-
- public boolean visit(TypeDeclaration type, CompilationUnitScope scope) {
- if (type.javadoc != null) {
- assertTrue("Invalid type for Javadoc on " + type, type.javadoc instanceof SelectionJavadoc);
- SelectionJavadocTest.this.result.append(type.javadoc.toString());
- }
- return super.visit(type, scope);
- }
- }
-
- protected void assertValid(String expected) {
- String actual = this.result.toString();
- if (!actual.equals(expected)) {
- System.out.println("Expected result for test "+testName()+":");
- System.out.println(Util.displayString(actual, 3));
- System.out.println(" source: [");
- System.out.print(Util.indentString(this.source, 2));
- System.out.println("]\n");
- assertEquals("Invalid selection node", expected, actual);
- }
- }
- protected void setUp() throws Exception {
- super.setUp();
- this.unit = null;
- }
-
- void setUnit(String name, String source) {
- this.source = source;
- this.unit = new CompilationUnit(source.toCharArray(), name, null);
- this.result = new StringBuffer();
- }
-
- /*
- * Parse a method with selectionNode check
- */
- protected void findJavadoc(String selection) {
- findJavadoc(selection, 1);
- }
-
- protected void findJavadoc(String selection, int occurences) {
-
- // Verify unit
- assertNotNull("Missing compilation unit!", this.unit);
-
- // Get selection start and end
- int selectionStart = source.indexOf(selection);
- int length = selection.length();
- int selectionEnd = selectionStart + length - 1;
- for (int i = 1; i < occurences; i++) {
- selectionStart = source.indexOf(selection, selectionEnd);
- selectionEnd = selectionStart + length - 1;
- }
-
- // Parse unit
- CompilerOptions options = new CompilerOptions(getCompilerOptions());
- SelectionParser parser = new SelectionParser(new ProblemReporter(DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- options,
- new DefaultProblemFactory(Locale.getDefault())));
- CompilationUnitDeclaration unitDecl = parser.dietParse(this.unit, new CompilationResult(this.unit, 0, 0, 0), selectionStart, selectionEnd);
- parser.getMethodBodies(unitDecl);
-
- // Visit compilation unit declaration to find javadoc
- unitDecl.traverse(new SelectionVisitor(), unitDecl.scope);
- }
-
- public void test01() {
- setUnit("Test.java",
- "public class Test {\n" +
- " /** @see #foo() */\n" +
- " void bar() {\n" +
- " foo();\n" +
- " }\n" +
- " void foo() {}\n" +
- "}\n"
- );
- findJavadoc("foo");
- assertValid("/**<SelectOnMethod:#foo()>*/\n");
- }
-
- public void test02() {
- setUnit("Test.java",
- "public class Test {\n" +
- " /** {@link #foo() foo} */\n" +
- " void bar() {\n" +
- " foo();\n" +
- " }\n" +
- " void foo() {}\n" +
- "}\n"
- );
- findJavadoc("foo");
- assertValid("/**<SelectOnMethod:#foo()>*/\n");
- }
-
- public void test03() {
- setUnit("Test.java",
- "public class Test {\n" +
- " /** @see Test */\n" +
- " void foo() {}\n" +
- "}\n"
- );
- findJavadoc("Test", 2);
- assertValid("/**<SelectOnType:Test>*/\n");
- }
-
- public void test04() {
- setUnit("Test.java",
- "public class Test {\n" +
- " /** Javadoc {@link Test} */\n" +
- " void foo() {}\n" +
- "}\n"
- );
- findJavadoc("Test", 2);
- assertValid("/**<SelectOnType:Test>*/\n");
- }
-
- public void test05() {
- setUnit("Test.java",
- "public class Test {\n" +
- " int field;\n" +
- " /** @see #field */\n" +
- " void foo() {}\n" +
- "}\n"
- );
- findJavadoc("field", 2);
- assertValid("/**<SelectOnField:#field>*/\n");
- }
-
- public void test06() {
- setUnit("Test.java",
- "public class Test {\n" +
- " int field;\n" +
- " /**{@link #field}*/\n" +
- " void foo() {}\n" +
- "}\n"
- );
- findJavadoc("field", 2);
- assertValid("/**<SelectOnField:#field>*/\n");
- }
-
- public void test07() {
- setUnit("Test.java",
- "public class Test {\n" +
- " /**\n" +
- " * @see Test#field\n" +
- " * @see #foo(int, String)\n" +
- " * @see Test#foo(int, String)\n" +
- " */\n" +
- " void bar() {\n" +
- " foo(0, \"\");\n" +
- " }\n" +
- " int field;\n" +
- " void foo(int x, String s) {}\n" +
- "}\n"
- );
- findJavadoc("foo");
- findJavadoc("String");
- findJavadoc("Test", 2);
- findJavadoc("foo", 2);
- findJavadoc("String", 2);
- findJavadoc("Test", 3);
- findJavadoc("field");
- assertValid(
- "/**<SelectOnMethod:#foo(int , String )>*/\n" +
- "/**<SelectOnType:String>*/\n" +
- "/**<SelectOnType:Test>*/\n" +
- "/**<SelectOnMethod:Test#foo(int , String )>*/\n" +
- "/**<SelectOnType:String>*/\n" +
- "/**<SelectOnType:Test>*/\n" +
- "/**<SelectOnField:Test#field>*/\n"
- );
- }
-
- public void test08() {
- setUnit("Test.java",
- "public class Test {\n" +
- " /**\n" +
- " * First {@link #foo(int, String)}\n" +
- " * Second {@link Test#foo(int, String) method foo}\n" +
- " * Third {@link Test#field field}\n" +
- " */\n" +
- " void bar() {\n" +
- " foo(0, \"\");\n" +
- " }\n" +
- " int field;\n" +
- " void foo(int x, String s) {}\n" +
- "}\n"
- );
- findJavadoc("foo");
- findJavadoc("String");
- findJavadoc("Test", 2);
- findJavadoc("foo", 2);
- findJavadoc("String", 2);
- findJavadoc("Test", 3);
- findJavadoc("field");
- assertValid(
- "/**<SelectOnMethod:#foo(int , String )>*/\n" +
- "/**<SelectOnType:String>*/\n" +
- "/**<SelectOnType:Test>*/\n" +
- "/**<SelectOnMethod:Test#foo(int , String )>*/\n" +
- "/**<SelectOnType:String>*/\n" +
- "/**<SelectOnType:Test>*/\n" +
- "/**<SelectOnField:Test#field>*/\n"
- );
- }
-
- public void test09() {
- setUnit("test/junit/Test.java",
- "package test.junit;\n" +
- "public class Test {\n" +
- " /**\n" +
- " * @see test.junit.Test\n" +
- " * @see test.junit.Test#field\n" +
- " * @see test.junit.Test#foo(Object[] array)\n" +
- " */\n" +
- " void bar() {\n" +
- " foo(null);\n" +
- " }\n" +
- " int field;\n" +
- " void foo(Object[] array) {}\n" +
- "}\n"
- );
- findJavadoc("test", 2);
- findJavadoc("junit", 2);
- findJavadoc("Test", 2);
- findJavadoc("test", 3);
- findJavadoc("junit", 3);
- findJavadoc("Test", 3);
- findJavadoc("field");
- findJavadoc("test", 4);
- findJavadoc("junit", 4);
- findJavadoc("Test", 4);
- findJavadoc("foo");
- findJavadoc("Object");
- findJavadoc("array");
- assertValid(
- "/**<SelectOnType:test>*/\n" +
- "/**<SelectOnType:test.junit>*/\n" +
- "/**<SelectOnType:test.junit.Test>*/\n" +
- "/**<SelectOnType:test>*/\n" +
- "/**<SelectOnType:test.junit>*/\n" +
- "/**<SelectOnType:test.junit.Test>*/\n" +
- "/**<SelectOnField:test.junit.Test#field>*/\n" +
- "/**<SelectOnType:test>*/\n" +
- "/**<SelectOnType:test.junit>*/\n" +
- "/**<SelectOnType:test.junit.Test>*/\n" +
- "/**<SelectOnMethod:test.junit.Test#foo(Object[] array)>*/\n" +
- "/**<SelectOnType:Object>*/\n" +
- "/**\n" +
- " */\n"
- );
- }
-
- public void test10() {
- setUnit("test/junit/Test.java",
- "package test.junit;\n" +
- "public class Test {\n" +
- " /** Javadoc {@linkplain test.junit.Test}\n" +
- " * {@linkplain test.junit.Test#field field}\n" +
- " * last line {@linkplain test.junit.Test#foo(Object[] array) foo(Object[])}\n" +
- " */\n" +
- " void bar() {\n" +
- " foo(null);\n" +
- " }\n" +
- " int field;\n" +
- " void foo(Object[] array) {}\n" +
- "}\n"
- );
- findJavadoc("test", 2);
- findJavadoc("junit", 2);
- findJavadoc("Test", 2);
- findJavadoc("test", 3);
- findJavadoc("junit", 3);
- findJavadoc("Test", 3);
- findJavadoc("field");
- findJavadoc("test", 4);
- findJavadoc("junit", 4);
- findJavadoc("Test", 4);
- findJavadoc("foo");
- findJavadoc("Object");
- findJavadoc("array");
- assertValid(
- "/**<SelectOnType:test>*/\n" +
- "/**<SelectOnType:test.junit>*/\n" +
- "/**<SelectOnType:test.junit.Test>*/\n" +
- "/**<SelectOnType:test>*/\n" +
- "/**<SelectOnType:test.junit>*/\n" +
- "/**<SelectOnType:test.junit.Test>*/\n" +
- "/**<SelectOnField:test.junit.Test#field>*/\n" +
- "/**<SelectOnType:test>*/\n" +
- "/**<SelectOnType:test.junit>*/\n" +
- "/**<SelectOnType:test.junit.Test>*/\n" +
- "/**<SelectOnMethod:test.junit.Test#foo(Object[] array)>*/\n" +
- "/**<SelectOnType:Object>*/\n" +
- "/**\n" +
- " */\n"
- );
- }
-
- public void test11() {
- setUnit("Test.java",
- "public class Test {\n" +
- " /**\n" +
- " * @throws RuntimeException runtime exception\n" +
- " * @throws InterruptedException interrupted exception\n" +
- " */\n" +
- " void foo() {}\n" +
- "}\n"
- );
- findJavadoc("RuntimeException");
- findJavadoc("InterruptedException");
- assertValid(
- "/**<SelectOnType:RuntimeException>*/\n" +
- "/**<SelectOnType:InterruptedException>*/\n"
- );
- }
-
- public void test12() {
- setUnit("Test.java",
- "public class Test {\n" +
- " /**\n" +
- " * @exception RuntimeException runtime exception\n" +
- " * @exception InterruptedException interrupted exception\n" +
- " */\n" +
- " void foo() {}\n" +
- "}\n"
- );
- findJavadoc("RuntimeException");
- findJavadoc("InterruptedException");
- assertValid(
- "/**<SelectOnType:RuntimeException>*/\n" +
- "/**<SelectOnType:InterruptedException>*/\n"
- );
- }
-
- public void test13() {
- setUnit("Test.java",
- "public class Test {\n" +
- " /**\n" +
- " * @param xxx integer param\n" +
- " * @param str string param\n" +
- " */\n" +
- " void foo(int xxx, String str) {}\n" +
- "}\n"
- );
- findJavadoc("xxx");
- findJavadoc("str");
- assertValid(
- "/**<SelectOnLocalVariable:xxx>*/\n" +
- "/**<SelectOnLocalVariable:str>*/\n"
- );
- }
-
- public void test14() {
- setUnit("Test.java",
- "/**\n" +
- " * Javadoc of {@link Test}\n" +
- " * @see Field#foo\n" +
- " */\n" +
- "public class Test {}\n" +
- "/**\n" +
- " * Javadoc on {@link Field} to test selection in javadoc field references\n" +
- " * @see #foo\n" +
- " */\n" +
- "class Field {\n" +
- " /**\n" +
- " * Javadoc on {@link #foo} to test selection in javadoc field references\n" +
- " * @see #foo\n" +
- " * @see Field#foo\n" +
- " */\n" +
- " int foo;\n" +
- "}\n"
- );
- findJavadoc("Field");
- findJavadoc("foo");
- findJavadoc("Field", 2);
- findJavadoc("foo", 2);
- findJavadoc("foo", 3);
- findJavadoc("foo", 4);
- findJavadoc("Field", 4);
- findJavadoc("foo", 5);
- assertValid(
- "/**<SelectOnType:Field>*/\n" +
- "/**<SelectOnField:Field#foo>*/\n" +
- "/**<SelectOnType:Field>*/\n" +
- "/**<SelectOnField:#foo>*/\n" +
- "/**<SelectOnField:#foo>*/\n" +
- "/**<SelectOnField:#foo>*/\n" +
- "/**<SelectOnType:Field>*/\n" +
- "/**<SelectOnField:Field#foo>*/\n"
- );
- }
-
- public void test15() {
- setUnit("Test.java",
- "/**\n" +
- " * Javadoc of {@link Test}\n" +
- " * @see Method#foo(int, String)\n" +
- " */\n" +
- "public class Test {}\n" +
- "/**\n" +
- " * Javadoc on {@link Method} to test selection in javadoc method references\n" +
- " * @see #foo(int, String)\n" +
- " */\n" +
- "class Method {\n" +
- " /**\n" +
- " * Javadoc on {@link #foo(int,String)} to test selection in javadoc method references\n" +
- " * @see #foo(int, String)\n" +
- " * @see Method#foo(int, String)\n" +
- " */\n" +
- " void bar() {}\n" +
- " /**\n" +
- " * Method with parameter and throws clause to test selection in javadoc\n" +
- " * @param xxx TODO\n" +
- " * @param str TODO\n" +
- " * @throws RuntimeException blabla\n" +
- " * @throws InterruptedException bloblo\n" +
- " */\n" +
- " void foo(int xxx, String str) throws RuntimeException, InterruptedException {}\n" +
- "}\n"
- );
- findJavadoc("Method");
- findJavadoc("foo");
- findJavadoc("Method", 2);
- findJavadoc("foo", 2);
- findJavadoc("foo", 3);
- findJavadoc("foo", 4);
- findJavadoc("Method", 4);
- findJavadoc("foo", 5);
- findJavadoc("xxx");
- findJavadoc("str");
- findJavadoc("RuntimeException");
- findJavadoc("InterruptedException");
- assertValid(
- "/**<SelectOnType:Method>*/\n" +
- "/**<SelectOnMethod:Method#foo(int , String )>*/\n" +
- "/**<SelectOnType:Method>*/\n" +
- "/**<SelectOnMethod:#foo(int , String )>*/\n" +
- "/**<SelectOnMethod:#foo(int , String )>*/\n" +
- "/**<SelectOnMethod:#foo(int , String )>*/\n" +
- "/**<SelectOnType:Method>*/\n" +
- "/**<SelectOnMethod:Method#foo(int , String )>*/\n" +
- "/**<SelectOnLocalVariable:xxx>*/\n" +
- "/**<SelectOnLocalVariable:str>*/\n" +
- "/**<SelectOnType:RuntimeException>*/\n" +
- "/**<SelectOnType:InterruptedException>*/\n"
- );
- }
-
- public void test16() {
- setUnit("Test.java",
- "/**\n" +
- " * Javadoc of {@link Test}\n" +
- " * @see Other\n" +
- " */\n" +
- "public class Test {}\n" +
- "/**\n" +
- " * Javadoc of {@link Other}\n" +
- " * @see Test\n" +
- " */\n" +
- "class Other {}\n"
- );
- findJavadoc("Test");
- findJavadoc("Other");
- findJavadoc("Test", 3);
- findJavadoc("Other", 2);
- assertValid(
- "/**<SelectOnType:Test>*/\n" +
- "/**<SelectOnType:Other>*/\n" +
- "/**<SelectOnType:Test>*/\n" +
- "/**<SelectOnType:Other>*/\n"
- );
- }
-
- public void test17() {
- setUnit("Test.java",
- "/**\n" +
- " * @see Test.Field#foo\n" +
- " */\n" +
- "public class Test {\n" +
- " /**\n" +
- " * @see Field#foo\n" +
- " */\n" +
- " class Field {\n" +
- " /**\n" +
- " * @see #foo\n" +
- " * @see Field#foo\n" +
- " * @see Test.Field#foo\n" +
- " */\n" +
- " int foo;\n" +
- " }\n" +
- "}\n"
- );
- findJavadoc("Test");
- findJavadoc("Field");
- findJavadoc("foo");
- findJavadoc("Field", 2);
- findJavadoc("foo", 2);
- findJavadoc("foo", 3);
- findJavadoc("Field", 4);
- findJavadoc("foo", 4);
- findJavadoc("Test", 3);
- findJavadoc("Field", 5);
- findJavadoc("foo", 5);
- assertValid(
- "/**<SelectOnType:Test>*/\n" +
- "/**<SelectOnType:Test.Field>*/\n" +
- "/**<SelectOnField:Test.Field#foo>*/\n" +
- "/**<SelectOnType:Field>*/\n" +
- "/**<SelectOnField:Field#foo>*/\n" +
- "/**<SelectOnField:#foo>*/\n" +
- "/**<SelectOnType:Field>*/\n" +
- "/**<SelectOnField:Field#foo>*/\n" +
- "/**<SelectOnType:Test>*/\n" +
- "/**<SelectOnType:Test.Field>*/\n" +
- "/**<SelectOnField:Test.Field#foo>*/\n"
- );
- }
-
- public void test18() {
- setUnit("Test.java",
- "/**\n" +
- " * @see Test.Method#foo()\n" +
- " */\n" +
- "public class Test {\n" +
- " /**\n" +
- " * @see Method#foo()\n" +
- " */\n" +
- " class Method {\n" +
- " /**\n" +
- " * @see #foo()\n" +
- " * @see Method#foo()\n" +
- " * @see Test.Method#foo()\n" +
- " */\n" +
- " void foo() {}\n" +
- " }\n" +
- "}"
- );
- findJavadoc("Test");
- findJavadoc("Method");
- findJavadoc("foo");
- findJavadoc("Method", 2);
- findJavadoc("foo", 2);
- findJavadoc("foo", 3);
- findJavadoc("Method", 4);
- findJavadoc("foo", 4);
- findJavadoc("Test", 3);
- findJavadoc("Method", 5);
- findJavadoc("foo", 5);
- assertValid(
- "/**<SelectOnType:Test>*/\n" +
- "/**<SelectOnType:Test.Method>*/\n" +
- "/**<SelectOnMethod:Test.Method#foo()>*/\n" +
- "/**<SelectOnType:Method>*/\n" +
- "/**<SelectOnMethod:Method#foo()>*/\n" +
- "/**<SelectOnMethod:#foo()>*/\n" +
- "/**<SelectOnType:Method>*/\n" +
- "/**<SelectOnMethod:Method#foo()>*/\n" +
- "/**<SelectOnType:Test>*/\n" +
- "/**<SelectOnType:Test.Method>*/\n" +
- "/**<SelectOnMethod:Test.Method#foo()>*/\n"
- );
- }
-
- public void test19() {
- setUnit("Test.java",
- "/**\n" +
- " * @see Test.Other\n" +
- " */\n" +
- "public class Test {\n" +
- " /**\n" +
- " * @see Test\n" +
- " * @see Other\n" +
- " * @see Test.Other\n" +
- " */\n" +
- " class Other {}\n" +
- "}"
- );
- findJavadoc("Test");
- findJavadoc("Other");
- findJavadoc("Test", 3);
- findJavadoc("Other", 2);
- findJavadoc("Test", 4);
- findJavadoc("Other", 3);
- assertValid(
- "/**<SelectOnType:Test>*/\n" +
- "/**<SelectOnType:Test.Other>*/\n" +
- "/**<SelectOnType:Test>*/\n" +
- "/**<SelectOnType:Other>*/\n" +
- "/**<SelectOnType:Test>*/\n" +
- "/**<SelectOnType:Test.Other>*/\n"
- );
- }
-
- public void test20() {
- setUnit("Test.java",
- "public class Test {\n" +
- " void bar() {\n" +
- " /**\n" +
- " * @see Field#foo\n" +
- " */\n" +
- " class Field {\n" +
- " /**\n" +
- " * @see #foo\n" +
- " * @see Field#foo\n" +
- " */\n" +
- " int foo;\n" +
- " }\n" +
- " }\n" +
- "}\n"
- );
- findJavadoc("Field");
- findJavadoc("foo");
- findJavadoc("foo", 2);
- findJavadoc("Field", 3);
- findJavadoc("foo", 3);
- assertValid(
- "/**<SelectOnType:Field>*/\n" +
- "/**<SelectOnField:Field#foo>*/\n" +
- "/**<SelectOnField:#foo>*/\n" +
- "/**<SelectOnType:Field>*/\n" +
- "/**<SelectOnField:Field#foo>*/\n"
- );
- }
-
- public void test21() {
- setUnit("Test.java",
- "public class Test {\n" +
- " void bar() {\n" +
- " /**\n" +
- " * @see Method#foo()\n" +
- " */\n" +
- " class Method {\n" +
- " /**\n" +
- " * @see #foo()\n" +
- " * @see Method#foo()\n" +
- " */\n" +
- " void foo() {}\n" +
- " }\n" +
- " }\n" +
- "}"
- );
- findJavadoc("Method");
- findJavadoc("foo");
- findJavadoc("foo", 2);
- findJavadoc("Method", 3);
- findJavadoc("foo", 3);
- assertValid(
- "/**<SelectOnType:Method>*/\n" +
- "/**<SelectOnMethod:Method#foo()>*/\n" +
- "/**<SelectOnMethod:#foo()>*/\n" +
- "/**<SelectOnType:Method>*/\n" +
- "/**<SelectOnMethod:Method#foo()>*/\n"
- );
- }
-
- public void test22() {
- setUnit("Test.java",
- "public class Test {\n" +
- " void bar() {\n" +
- " /**\n" +
- " * @see Test\n" +
- " * @see Other\n" +
- " */\n" +
- " class Other {}\n" +
- " }\n" +
- "}"
- );
- findJavadoc("Test", 2);
- findJavadoc("Other");
- assertValid(
- "/**<SelectOnType:Test>*/\n" +
- "/**<SelectOnType:Other>*/\n"
- );
- }
-
- public void test23() {
- setUnit("Test.java",
- "public class Test {\n" +
- " void bar() {\n" +
- " new Object() {\n" +
- " /**\n" +
- " * @see Field#foo\n" +
- " */\n" +
- " class Field {\n" +
- " /**\n" +
- " * @see #foo\n" +
- " * @see Field#foo\n" +
- " */\n" +
- " int foo;\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n"
- );
- findJavadoc("Field");
- findJavadoc("foo");
- findJavadoc("foo", 2);
- findJavadoc("Field", 3);
- findJavadoc("foo", 3);
- assertValid(
- "/**<SelectOnType:Field>*/\n" +
- "/**<SelectOnField:Field#foo>*/\n" +
- "/**<SelectOnField:#foo>*/\n" +
- "/**<SelectOnType:Field>*/\n" +
- "/**<SelectOnField:Field#foo>*/\n"
- );
- }
-
- public void test24() {
- setUnit("Test.java",
- "public class Test {\n" +
- " void bar() {\n" +
- " new Object() {\n" +
- " /**\n" +
- " * @see Method#foo()\n" +
- " */\n" +
- " class Method {\n" +
- " /**\n" +
- " * @see #foo()\n" +
- " * @see Method#foo()\n" +
- " */\n" +
- " void foo() {}\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}"
- );
- findJavadoc("Method");
- findJavadoc("foo");
- findJavadoc("foo", 2);
- findJavadoc("Method", 3);
- findJavadoc("foo", 3);
- assertValid(
- "/**<SelectOnType:Method>*/\n" +
- "/**<SelectOnMethod:Method#foo()>*/\n" +
- "/**<SelectOnMethod:#foo()>*/\n" +
- "/**<SelectOnType:Method>*/\n" +
- "/**<SelectOnMethod:Method#foo()>*/\n"
- );
- }
-
- public void test25() {
- setUnit("Test.java",
- "public class Test {\n" +
- " void bar() {\n" +
- " new Object() {\n" +
- " /**\n" +
- " * @see Test\n" +
- " * @see Other\n" +
- " */\n" +
- " class Other {}\n" +
- " };\n" +
- " }\n" +
- "}"
- );
- findJavadoc("Test", 2);
- findJavadoc("Other");
- assertValid(
- "/**<SelectOnType:Test>*/\n" +
- "/**<SelectOnType:Other>*/\n"
- );
- }
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SelectionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SelectionTest.java
deleted file mode 100644
index 3ac33c8..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SelectionTest.java
+++ /dev/null
@@ -1,2579 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import junit.framework.Test;
-
-public class SelectionTest extends AbstractSelectionTest {
-static {
-// TESTS_NUMBERS = new int[] { 53 };
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(SelectionTest.class);
-}
-
-public SelectionTest(String testName) {
- super(testName);
-}
-/*
- * Select superclass
- */
-public void test00() {
-
- String str =
- " var i=foo(); \n" +
- "";
-
- String selectionStartBehind = "=";
- String selectionEndBehind = "foo";
-
- String expectedCompletionNodeToString = "<SelectOnMessageSend:foo()>";
- String completionIdentifier = "foo";
- String expectedUnitDisplayString =
- "var i = <SelectOnMessageSend:foo()>;\n" +
- "" +
- "";
- String expectedReplacedSource = "foo()";
- String testName = "<select message send>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-
-public void test01() {
-
- String str =
- " var i=bb.foo(); \n" +
- "";
-
- String selectionStartBehind = "bb.";
- String selectionEndBehind = "foo";
-
- String expectedCompletionNodeToString = "<SelectOnMessageSend:bb.foo()>";
- String completionIdentifier = "foo";
- String expectedUnitDisplayString =
- "var i = <SelectOnMessageSend:bb.foo()>;\n" +
- "" +
- "";
- String expectedReplacedSource = "bb.foo()";
- String testName = "<select message send>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-
-///*
-// * Select superclass
-// */
-//public void test01() {
-//
-// String str =
-// "import java.io.*; \n" +
-// " \n" +
-// "public class X extends IOException { \n" +
-// "} \n";
-//
-// String selectionStartBehind = "extends ";
-// String selectionEndBehind = "IOException";
-//
-// String expectedCompletionNodeToString = "<SelectOnType:IOException>";
-// String completionIdentifier = "IOException";
-// String expectedUnitDisplayString =
-// "import java.io.*;\n" +
-// "public class X extends <SelectOnType:IOException> {\n" +
-// " public X() {\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "IOException";
-// String testName = "<select superclass>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkDietParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Select superinterface
- */
-//public void test02() {
-//
-// String str =
-// "import java.io.*; \n" +
-// " \n" +
-// "public class X extends IOException implements Serializable { \n" +
-// " int foo(){} \n" +
-// "} \n";
-//
-// String selectionStartBehind = "implements ";
-// String selectionEndBehind = "Serializable";
-//
-// String expectedCompletionNodeToString = "<SelectOnType:Serializable>";
-// String completionIdentifier = "Serializable";
-// String expectedUnitDisplayString =
-// "import java.io.*;\n" +
-// "public class X extends IOException implements <SelectOnType:Serializable> {\n" +
-// " public X() {\n" +
-// " }\n" +
-// " int foo() {\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "Serializable";
-// String testName = "<select superinterface>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkDietParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-///*
-// * Select qualified superclass
-// */
-//public void test03() {
-//
-// String str =
-// "public class X extends java.io.IOException { \n" +
-// "} \n";
-//
-// String selectionStartBehind = "java.io.";
-// String selectionEndBehind = "IOException";
-//
-// String expectedCompletionNodeToString = "<SelectOnType:java.io.IOException>";
-// String completionIdentifier = "IOException";
-// String expectedUnitDisplayString =
-// "public class X extends <SelectOnType:java.io.IOException> {\n" +
-// " public X() {\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "java.io.IOException";
-// String testName = "<select qualified superclass>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkDietParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-///*
-// * Select package from qualified superclass
-// */
-//public void test04() {
-//
-// String str =
-// "public class X extends java.io.IOException { \n" +
-// "} \n";
-//
-// String selectionStartBehind = "java.";
-// String selectionEndBehind = "java.io";
-//
-// String expectedCompletionNodeToString = "<SelectOnType:java.io>";
-// String completionIdentifier = "io";
-// String expectedUnitDisplayString =
-// "public class X extends <SelectOnType:java.io> {\n" +
-// " public X() {\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "java.io.IOException";
-// String testName = "<select package from qualified superclass>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkDietParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Select message send
- */
-public void test05() {
-
- String str =
- " function foo(){ \n" +
- " System.out.println(\"hello\"); \n";
-
- String selectionStartBehind = "System.out.";
- String selectionEndBehind = "println";
-
- String expectedCompletionNodeToString = "<SelectOnMessageSend:System.out.println(\"hello\")>";
- String completionIdentifier = "println";
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " <SelectOnMessageSend:System.out.println(\"hello\")>;\n" +
- "}\n" +
- "";
- String expectedReplacedSource = "System.out.println(\"hello\")";
- String testName = "<select message send>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-public void test05b() {
-
- String str =
- " System.out.println(\"hello\"); \n";
-
- String selectionStartBehind = "System.out.";
- String selectionEndBehind = "println";
-
- String expectedCompletionNodeToString = "<SelectOnMessageSend:System.out.println(\"hello\")>";
- String completionIdentifier = "println";
- String expectedUnitDisplayString =
- "<SelectOnMessageSend:System.out.println(\"hello\")>;\n" +
- "";
- String expectedReplacedSource = "System.out.println(\"hello\")";
- String testName = "<select message send>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-/*
- * Select message send with recovery before
- */
-public void test06() {
-
- String str =
- " function foo(){ \n" +
- " System.out.println(\"hello\"); \n";
-
- String selectionStartBehind = "System.out.";
- String selectionEndBehind = "println";
-
- String expectedCompletionNodeToString = "<SelectOnMessageSend:System.out.println(\"hello\")>";
- String completionIdentifier = "println";
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " <SelectOnMessageSend:System.out.println(\"hello\")>;\n" +
- "}\n" +
- "";
- String expectedReplacedSource = "System.out.println(\"hello\")";
- String testName = "<select message send with recovery before>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Select message send with sibling method
- */
-public void test07() {
-
- String str =
- " function foo(){ \n" +
- " this.bar(\"hello\"); \n" +
- " function bar( s){ \n" +
- " return s.length(); \n" +
- " } \n" +
- "";
-
- String selectionStartBehind = "this.";
- String selectionEndBehind = "this.bar";
-
- String expectedCompletionNodeToString = "<SelectOnMessageSend:this.bar(\"hello\")>";
- String completionIdentifier = "bar";
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " <SelectOnMessageSend:this.bar(\"hello\")>;\n" +
- "}\n" +
- "function bar(s) {\n" +
- "}\n" +
- "";
- String expectedReplacedSource = "this.bar(\"hello\")";
- String testName = "<select message send with sibling method>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Select field reference
- */
-public void test08() {
-
- String str =
- " var num = 0; \n" +
- " function foo(){ \n" +
- " var j = this.num; \n" +
- "";
-
- String selectionStartBehind = "this.";
- String selectionEndBehind = "this.num";
-
- String expectedCompletionNodeToString = "<SelectionOnFieldReference:this.num>";
- String completionIdentifier = "num";
- String expectedUnitDisplayString =
- "var num;\n" +
- "function foo() {\n" +
- " var j = <SelectionOnFieldReference:this.num>;\n" +
- "}\n" +
- "";
- String expectedReplacedSource = "this.num";
- String testName = "<select field reference>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Select field reference with syntax errors
- */
-public void test09() {
-
- String str =
- " var num \n" +
- " function foo(){ \n" +
- " var j = this.num; \n" +
- "} \n";
-
- String selectionStartBehind = "this.";
- String selectionEndBehind = "this.num";
-
- String expectedCompletionNodeToString = "<SelectionOnFieldReference:this.num>";
- String completionIdentifier = "num";
- String expectedUnitDisplayString =
- "var num;\n" +
- "function foo() {\n" +
- " var j = <SelectionOnFieldReference:this.num>;\n" +
- "}\n";
- String expectedReplacedSource = "this.num";
- String testName = "<select field reference with syntax errors>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Select field reference inside message receiver
- */
-public void test10() {
-
- String str =
- " var x; \n" +
- " function foo(){ \n" +
- " var j = this.x.foo(); \n" +
- "} \n";
-
- String selectionStartBehind = "this.";
- String selectionEndBehind = "this.x";
-
- String expectedCompletionNodeToString = "<SelectionOnFieldReference:this.x>";
- String completionIdentifier = "x";
- String expectedUnitDisplayString =
- "var x;\n" +
- "function foo() {\n" +
- " var j = <SelectionOnFieldReference:this.x>.foo();\n" +
- "}\n";
- String expectedReplacedSource = "this.x";
- String testName = "<select field reference inside message receiver>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Select allocation
- */
-public void test11() {
-
- String str =
- " function X(i){} \n" +
- " function foo(){ \n" +
- " var j = 0; \n" +
- " var x = new X(j); \n" +
- "} \n";
-
- String selectionStartBehind = "new ";
- String selectionEndBehind = "new X";
-
- String expectedCompletionNodeToString = "<SelectOnAllocationExpression:new X(j)>";
- String completionIdentifier = "X";
- String expectedUnitDisplayString =
- "function X(i) {\n" +
- " }\n" +
- "function foo() {\n" +
- " var j;\n" +
- " var x = <SelectOnAllocationExpression:new X(j)>;\n" +
- "}\n";
- String expectedReplacedSource = "new X(j)";
- String testName = "<select allocation>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Select qualified allocation
- */
-//public void test12() {
-//
-// String str =
-// "public class X { \n" +
-// " class Y { \n" +
-// " Y(int i){} \n" +
-// " } \n" +
-// " X(int i){} \n" +
-// " int foo(){ \n" +
-// " int j = 0; \n" +
-// " X x = new X(j); \n" +
-// " x.new Y(1); \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "x.new ";
-// String selectionEndBehind = "x.new Y";
-//
-// String expectedCompletionNodeToString = "<SelectOnQualifiedAllocationExpression:x.new Y(1)>";
-// String completionIdentifier = "Y";
-// String expectedUnitDisplayString =
-// "public class X {\n" +
-// " class Y {\n" +
-// " Y(int i) {\n" +
-// " }\n" +
-// " }\n" +
-// " X(int i) {\n" +
-// " }\n" +
-// " int foo() {\n" +
-// " int j;\n" +
-// " X x;\n" +
-// " <SelectOnQualifiedAllocationExpression:x.new Y(1)>;\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "x.new Y(1)";
-// String testName = "<select qualified allocation>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Select qualified name reference receiver
- */
-public void test13() {
-
- String str =
- " function foo(){ \n" +
- " java.lang.System.out.println(); \n" +
- "} \n";
-
- String selectionStartBehind = "java.lang.";
- String selectionEndBehind = "java.lang.System";
-
- String expectedCompletionNodeToString = "<SelectOnName:java.lang.System>";
- String completionIdentifier = "System";
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " <SelectOnName:java.lang.System>;\n" +
- "}\n";
- String expectedReplacedSource = "java.lang.System.out";
- String testName = "<select qualified name receiver>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Select qualified name reference
- */
-public void test14() {
-
- String str =
- " int foo(){ \n" +
- " var sys = java.lang.System; \n" +
- "} \n";
-
- String selectionStartBehind = "java.lang.";
- String selectionEndBehind = "java.lang.System";
-
- String expectedCompletionNodeToString = "<SelectOnName:java.lang.System>";
- String completionIdentifier = "System";
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " var sys = <SelectOnName:java.lang.System>;\n" +
- "}\n";
- String expectedReplacedSource = "java.lang.System";
- String testName = "<select qualified name>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-///*
-// * Select variable type with modifier
-// */
-//public void test15() {
-//
-// String str =
-// "public class X { \n" +
-// " int foo(){ \n" +
-// " final System sys = null; \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "final ";
-// String selectionEndBehind = "final System";
-//
-// String expectedCompletionNodeToString = "<SelectOnType:System>";
-// String completionIdentifier = "System";
-// String expectedUnitDisplayString =
-// "public class X {\n" +
-// " public X() {\n" +
-// " }\n" +
-// " int foo() {\n" +
-// " final <SelectOnType:System> sys;\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "System";
-// String testName = "<select variable type with modifier>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Select variable type
- */
-//public void test16() {
-//
-// String str =
-// "public class X { \n" +
-// " int foo(){ \n" +
-// " System sys = null; \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "\n ";
-// String selectionEndBehind = "\n System";
-//
-// String expectedCompletionNodeToString = "<SelectOnType:System>";
-// String completionIdentifier = "System";
-// String expectedUnitDisplayString =
-// "public class X {\n" +
-// " public X() {\n" +
-// " }\n" +
-// " int foo() {\n" +
-// " <SelectOnType:System> sys;\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "System";
-// String testName = "<select variable type>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Select name
- */
-public void test17() {
-
- String str =
- "function foo(){ \n" +
- " System \n" +
- "} \n";
-
- String selectionStartBehind = "\n ";
- String selectionEndBehind = "\n System";
-
- String expectedCompletionNodeToString = "<SelectOnName:System>";
- String completionIdentifier = "System";
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " <SelectOnName:System>;\n" +
- "}\n";
-
- String expectedReplacedSource = "System";
- String testName = "<select name>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Select anonymous type
- */
-//public void test18() {
-//
-// String str =
-// "public class X { \n" +
-// " int foo(){ \n" +
-// " new Object(){ \n" +
-// " int bar(){} \n" +
-// " } \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "new ";
-// String selectionEndBehind = "new Object";
-//
-// String expectedCompletionNodeToString =
-// "<SelectOnAllocationExpression:new Object() {\n" +
-// " () {\n" +
-// " super();\n" +
-// " }\n" +
-// "}>";
-// String completionIdentifier = "Object";
-// String expectedUnitDisplayString =
-// "public class X {\n" +
-// " public X() {\n" +
-// " }\n" +
-// " int foo() {\n" +
-// " <SelectOnAllocationExpression:new Object() {\n" +
-// " () {\n" +
-// " super();\n" +
-// " }\n" +
-// " }>;\n" +
-// " }\n" +
-// "}\n";
-//
-// String expectedReplacedSource = "new Object()";
-// String testName = "<select anonymous type>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Select cast type
- */
-//public void test19() {
-//
-// String str =
-// "public class X { \n" +
-// " Object foo(){ \n" +
-// " return (Object) this; \n" +
-// " } \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "return (";
-// String selectionEndBehind = "return (Object";
-//
-// String expectedCompletionNodeToString = "<SelectOnName:Object>";
-// String completionIdentifier = "Object";
-// String expectedUnitDisplayString =
-// "public class X {\n" +
-// " public X() {\n" +
-// " }\n" +
-// " Object foo() {\n" +
-// " <SelectOnName:Object>;\n" +
-// " }\n" +
-// "}\n";
-//
-// String expectedReplacedSource = "Object";
-// String testName = "<select cast type>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Select package
- */
-//public void test20() {
-//
-// String str =
-// "package x.y.other; \n" +
-// "public class X { \n" +
-// " int foo(){ \n" +
-// " } \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "x.";
-// String selectionEndBehind = "x.y";
-//
-// String expectedCompletionNodeToString = "<SelectOnPackage:x.y>";
-// String completionIdentifier = "y";
-// String expectedUnitDisplayString =
-// "package <SelectOnPackage:x.y>;\n" +
-// "public class X {\n" +
-// " public X() {\n" +
-// " }\n" +
-// " int foo() {\n" +
-// " }\n" +
-// "}\n";
-//
-// String expectedReplacedSource = "x.y.other";
-// String testName = "<select package>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkDietParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-///*
-// * Select import
-// */
-//public void test21() {
-//
-// String str =
-// "import x.y.Other; \n" +
-// "public class X { \n" +
-// " int foo(){ \n" +
-// " } \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "y.";
-// String selectionEndBehind = "y.Other";
-//
-// String expectedCompletionNodeToString = "<SelectOnImport:x.y.Other>";
-// String completionIdentifier = "Other";
-// String expectedUnitDisplayString =
-// "import <SelectOnImport:x.y.Other>;\n" +
-// "public class X {\n" +
-// " public X() {\n" +
-// " }\n" +
-// " int foo() {\n" +
-// " }\n" +
-// "}\n";
-//
-// String expectedReplacedSource = "x.y.Other";
-// String testName = "<select import>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkDietParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-///*
-// * Select import on demand
-// */
-//public void test22() {
-//
-// String str =
-// "import x.y.other.*; \n" +
-// "public class X { \n" +
-// " int foo(){ \n" +
-// " } \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "y.";
-// String selectionEndBehind = "y.other";
-//
-// String expectedCompletionNodeToString = "<SelectOnImport:x.y.other>";
-// String completionIdentifier = "other";
-// String expectedUnitDisplayString =
-// "import <SelectOnImport:x.y.other>;\n" +
-// "public class X {\n" +
-// " public X() {\n" +
-// " }\n" +
-// " int foo() {\n" +
-// " }\n" +
-// "}\n";
-//
-// String expectedReplacedSource = "x.y.other";
-// String testName = "<select import on demand>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkDietParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Select array initializer type
- */
-public void test23() {
-
- String str =
- "public class X { \n" +
- " int foo(){ \n" +
- " String[] p = new String[]{\"Left\"};\n" +
-// " } \n" +
- " } \n" +
- "} \n";
-
- String selectionStartBehind = "new ";
- String selectionEndBehind = "new String";
- String expectedCompletionNodeToString = "<SelectOnType:String>";
- String completionIdentifier = "String";
- String expectedUnitDisplayString =
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " int foo() {\n" +
- " String[] p = <SelectOnType:String>;\n" +
- " }\n" +
- "}\n";
-
- String expectedReplacedSource = "String";
- String testName = "<select array initializer type>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-///*
-// * Select nested type superclass with syntax error behind
-// */
-//public void test24() {
-//
-// String str =
-// "public class G { \n" +
-// " void foo() { \n" +
-// " class X { \n" +
-// " class Y extends G { \n" +
-// " int foo() \n" +
-// " } \n" +
-// " } \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "extends ";
-// String selectionEndBehind = "extends G";
-//
-// String expectedCompletionNodeToString = "<SelectOnType:G>";
-//
-// String completionIdentifier = "G";
-// String expectedUnitDisplayString =
-// "public class G {\n" +
-// " public G() {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " class X {\n" +
-// " class Y extends <SelectOnType:G> {\n" +
-// " Y() {\n" +
-// " }\n" +
-// " int foo() {\n" +
-// " }\n" +
-// " }\n" +
-// " X() {\n" +
-// " }\n" +
-// " }\n" +
-// " }\n" +
-// "}\n";
-//
-// String expectedReplacedSource = "G";
-// String testName = "<select nested type superclass>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Select super
- */
-//public void test25() {
-//
-// String str =
-// "public class G { \n" +
-// " Object foo() { \n" +
-// " return super.foo(); \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "return ";
-// String selectionEndBehind = "return super";
-//
-// String expectedCompletionNodeToString = "<SelectOnSuper:super>";
-//
-// String completionIdentifier = "super";
-// String expectedUnitDisplayString =
-// "public class G {\n" +
-// " public G() {\n" +
-// " }\n" +
-// " Object foo() {\n" +
-// " <SelectOnSuper:super>;\n" +
-// " }\n" +
-// "}\n";
-//
-// String expectedReplacedSource = "super";
-// String testName = "<select super>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Select qualified super
- */
-//public void test26() {
-//
-// String str =
-// "public class G { \n" +
-// " Object foo() { \n" +
-// " new X(){ \n" +
-// " Object bar(){ \n" +
-// " return G.super.foo(); \n" +
-// " } \n" +
-// " } \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "G.";
-// String selectionEndBehind = "G.super";
-//
-// String expectedCompletionNodeToString = "<SelectOnQualifiedSuper:G.super>";
-//
-// String completionIdentifier = "super";
-// String expectedUnitDisplayString =
-// "public class G {\n" +
-// " public G() {\n" +
-// " }\n" +
-// " Object foo() {\n" +
-// " new X() {\n" +
-// " () {\n" +
-// " }\n" +
-// " Object bar() {\n" +
-// " <SelectOnQualifiedSuper:G.super>;\n" +
-// " }\n" +
-// " };\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "G.super";
-// String testName = "<select qualified super>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Select super constructor call
- */
-//public void test27() {
-//
-// String str =
-// "public class G { \n" +
-// " G() { \n" +
-// " super(); \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "\n\t\t";
-// String selectionEndBehind = "super";
-//
-// String expectedCompletionNodeToString = "<SelectOnExplicitConstructorCall:super()>;";
-//
-// String completionIdentifier = "super";
-// String expectedUnitDisplayString =
-// "public class G {\n" +
-// " G() {\n" +
-// " <SelectOnExplicitConstructorCall:super()>;\n" +
-// " }\n" +
-// "}\n";
-//
-// String expectedReplacedSource = "super()";
-// String testName = "<select super constructor call>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Select qualified super constructor call
- */
-//public void test28() {
-//
-// String str =
-// "public class G { \n" +
-// " class M {} \n" +
-// " static Object foo() { \n" +
-// " class X extends M { \n" +
-// " X (){ \n" +
-// " new G().super(); \n" +
-// " } \n" +
-// " } \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "new G().";
-// String selectionEndBehind = "new G().super";
-//
-// String expectedCompletionNodeToString = "<SelectOnExplicitConstructorCall:new G().super()>;";
-//
-// String completionIdentifier = "super";
-// String expectedUnitDisplayString =
-// "public class G {\n" +
-// " class M {\n" +
-// " M() {\n" +
-// " }\n" +
-// " }\n" +
-// " public G() {\n" +
-// " }\n" +
-// " static Object foo() {\n" +
-// " class X extends M {\n" +
-// " X() {\n" +
-// " <SelectOnExplicitConstructorCall:new G().super()>;\n" +
-// " }\n" +
-// " }\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "new G().super()";
-// String testName = "<select qualified super constructor call>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Select qualified super constructor call with arguments
- */
-//public void test29() {
-//
-// String str =
-// "public class G { \n" +
-// " class M {} \n" +
-// " static Object foo() { \n" +
-// " class X extends M { \n" +
-// " X (){ \n" +
-// " new G().super(23 + \"hello\"); \n" +
-// " } \n" +
-// " } \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "new G().";
-// String selectionEndBehind = "new G().super";
-//
-// String expectedCompletionNodeToString = "<SelectOnExplicitConstructorCall:new G().super((23 + \"hello\"))>;";
-//
-// String completionIdentifier = "super";
-// String expectedUnitDisplayString =
-// "public class G {\n" +
-// " class M {\n" +
-// " M() {\n" +
-// " }\n" +
-// " }\n" +
-// " public G() {\n" +
-// " }\n" +
-// " static Object foo() {\n" +
-// " class X extends M {\n" +
-// " X() {\n" +
-// " <SelectOnExplicitConstructorCall:new G().super((23 + \"hello\"))>;\n" +
-// " }\n" +
-// " }\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "new G().super(23 + \"hello\")";
-// String testName = "<select qualified super constructor call with arguments>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Select super constructor call with arguments
- */
-//public void test30() {
-//
-// String str =
-// "public class G { \n" +
-// " G() { \n" +
-// " super(new G()); \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "\n\t\t";
-// String selectionEndBehind = "super";
-//
-// String expectedCompletionNodeToString = "<SelectOnExplicitConstructorCall:super(new G())>;";
-//
-// String completionIdentifier = "super";
-// String expectedUnitDisplayString =
-// "public class G {\n" +
-// " G() {\n" +
-// " <SelectOnExplicitConstructorCall:super(new G())>;\n" +
-// " }\n" +
-// "}\n";
-//
-// String expectedReplacedSource = "super(new G())";
-// String testName = "<select super constructor call with arguments>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Regression test for 1FVQ0LK
- */
-//public void test31() {
-//
-// String str =
-// "class X { \n" +
-// " Y f; \n" +
-// " void foo() { \n" +
-// " new Bar(fred()); \n" +
-// " Z z= new Z(); \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "\n\t";
-// String selectionEndBehind = "Y";
-//
-// String expectedCompletionNodeToString = "<SelectOnType:Y>";
-//
-// String completionIdentifier = "Y";
-// String expectedUnitDisplayString =
-// "class X {\n" +
-// " <SelectOnType:Y> f;\n" +
-// " X() {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " }\n" +
-// "}\n";
-//
-// String expectedReplacedSource = "Y";
-// String testName = "<regression test for 1FVQ0LK>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkDietParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Regression test for 1FWT4AJ: ITPCOM:WIN98 - SelectionParser produces duplicate type declaration
- */
-public void test32() {
-
- String str =
- "function containsPhrase(){ \n"+
- " var currentChar = \"hello\".toLowerCase() \n"+
- "} \n";
-
- String selectionStartBehind = "\"hello\".";
- String selectionEndBehind = "\"hello\".toLowerCase";
-
- String expectedCompletionNodeToString = "<SelectOnMessageSend:\"hello\".toLowerCase()>";
-
- String completionIdentifier = "toLowerCase";
- String expectedUnitDisplayString =
- "function containsPhrase() {\n" +
- " var currentChar = <SelectOnMessageSend:\"hello\".toLowerCase()>;\n" +
- "}\n";
-
- String expectedReplacedSource = "\"hello\".toLowerCase()";
- String testName = "<1FWT4AJ: ITPCOM:WIN98 - SelectionParser produces duplicate type declaration>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * Regression test for 1G4CLZM: ITPJUI:WINNT - 'Import Selection' - Set not found
- */
-//public void test33() {
-//
-// String str =
-// " import java.util.AbstractMap; \n"+
-// " public class c4 extends AbstractMap { \n"+
-// " /** \n"+
-// " * @see AbstractMap#entrySet \n"+
-// " */ \n"+
-// " public Set entrySet() { \n"+
-// " return null; \n"+
-// " } \n"+
-// " } \n";
-//
-// String selectionStartBehind = "\n\t\tpublic ";
-// String selectionEndBehind = "public Set";
-//
-// String expectedCompletionNodeToString = "<SelectOnType:Set>";
-//
-// String completionIdentifier = "Set";
-// String expectedUnitDisplayString =
-// "import java.util.AbstractMap;\n" +
-// "public class c4 extends AbstractMap {\n" +
-// " public c4() {\n" +
-// " }\n" +
-// " public <SelectOnType:Set> entrySet() {\n" +
-// " }\n" +
-// "}\n";
-//
-// String expectedReplacedSource = "Set";
-// String testName = "<1G4CLZM: ITPJUI:WINNT - 'Import Selection' - Set not found>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkDietParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * Regression test for 1GB99S3: ITPJUI:WINNT - SH: NPE in editor while getting hover help
- */
-public void test34() {
-
- String str =
- "function foo() { \n"+
- " var array = new Object(); \n"+
- " return array.length; \n"+
- "} \n";
-
- String selectionStartBehind = "\n\t\treturn ";
- String selectionEndBehind = "array.length";
-
- String expectedCompletionNodeToString = NONE;
-
- String completionIdentifier = NONE;
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " var array;\n" +
- " return array.length;\n" +
- "}\n";
-
- String expectedReplacedSource = NONE;
- String testName = "<1GB99S3: ITPJUI:WINNT - SH: NPE in editor while getting hover help>";
-
- int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
- int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-/*
- * Select this constructor call
- */
-//public void test35() {
-//
-// String str =
-// "public class G { \n" +
-// " G() { \n" +
-// " } \n" +
-// " G(int x) { \n" +
-// " this(); \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "\n\t\t";
-// String selectionEndBehind = "this";
-//
-// String expectedCompletionNodeToString = "<SelectOnExplicitConstructorCall:this()>;";
-//
-// String completionIdentifier = "this";
-// String expectedUnitDisplayString =
-// "public class G {\n" +
-// " G() {\n" +
-// " }\n" +
-// " G(int x) {\n" +
-// " <SelectOnExplicitConstructorCall:this()>;\n" +
-// " }\n" +
-// "}\n";
-//
-// String expectedReplacedSource = "this()";
-// String testName = "<select this constructor call>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-//
-///*
-// * Select qualified this constructor call
-// */
-//public void test36() {
-//
-// String str =
-// "public class G { \n" +
-// " static Object foo() { \n" +
-// " class X { \n" +
-// " X (){ \n" +
-// " } \n" +
-// " X (int x){ \n" +
-// " new G().this(); \n" +
-// " } \n" +
-// " } \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "new G().";
-// String selectionEndBehind = "new G().this";
-//
-// String expectedCompletionNodeToString = "<SelectOnExplicitConstructorCall:new G().this()>;";
-//
-// String completionIdentifier = "this";
-// String expectedUnitDisplayString =
-// "public class G {\n" +
-// " public G() {\n" +
-// " }\n" +
-// " static Object foo() {\n" +
-// " class X {\n" +
-// " X() {\n" +
-// " super();\n"+
-// " }\n" +
-// " X(int x) {\n" +
-// " <SelectOnExplicitConstructorCall:new G().this()>;\n" +
-// " }\n" +
-// " }\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "new G().this()";
-// String testName = "<select qualified this constructor call>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-///*
-// * Select qualified this constructor call with arguments
-// */
-//public void test37() {
-//
-// String str =
-// "public class G { \n" +
-// " static Object foo() { \n" +
-// " class X { \n" +
-// " X (){ \n" +
-// " } \n" +
-// " X (int x){ \n" +
-// " new G().this(23 + \"hello\"); \n" +
-// " } \n" +
-// " } \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "new G().";
-// String selectionEndBehind = "new G().this";
-//
-// String expectedCompletionNodeToString = "<SelectOnExplicitConstructorCall:new G().this((23 + \"hello\"))>;";
-//
-// String completionIdentifier = "this";
-// String expectedUnitDisplayString =
-// "public class G {\n" +
-// " public G() {\n" +
-// " }\n" +
-// " static Object foo() {\n" +
-// " class X {\n" +
-// " X() {\n" +
-// " super();\n"+
-// " }\n" +
-// " X(int x) {\n" +
-// " <SelectOnExplicitConstructorCall:new G().this((23 + \"hello\"))>;\n" +
-// " }\n" +
-// " }\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "new G().this(23 + \"hello\")";
-// String testName = "<select qualified this constructor call with arguments>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-///*
-// * Select this constructor call with arguments
-// */
-//public void test38() {
-//
-// String str =
-// "public class G { \n" +
-// " G() { \n" +
-// " this(new G()); \n" +
-// " } \n" +
-// "} \n";
-//
-// String selectionStartBehind = "\n\t\t";
-// String selectionEndBehind = "this";
-//
-// String expectedCompletionNodeToString = "<SelectOnExplicitConstructorCall:this(new G())>;";
-//
-// String completionIdentifier = "this";
-// String expectedUnitDisplayString =
-// "public class G {\n" +
-// " G() {\n" +
-// " <SelectOnExplicitConstructorCall:this(new G())>;\n" +
-// " }\n" +
-// "}\n";
-//
-// String expectedReplacedSource = "this(new G())";
-// String testName = "<select this constructor call with arguments>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-///*
-// * bugs 3293 search does not work in inner class (1GEUQHJ)
-// */
-//public void test39() {
-//
-// String str =
-// "public class X { \n" +
-// " Object hello = new Object(){ \n" +
-// " public void foo(String s){ \n" +
-// " s.length(); \n" +
-// " } \n" +
-// " }; \n" +
-// "} \n";
-//
-// String selectionStartBehind = "s.";
-// String selectionEndBehind = "length";
-//
-// String expectedCompletionNodeToString = "<SelectOnMessageSend:s.length()>";
-//
-// String completionIdentifier = "length";
-// String expectedUnitDisplayString =
-// "public class X {\n" +
-// " Object hello = new Object() {\n" +
-// " public void foo(String s) {\n" +
-// " <SelectOnMessageSend:s.length()>;\n" +
-// " }\n" +
-// " };\n" +
-// " public X() {\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "s.length()";
-// String testName = "<select message send in anonymous class>";
-//
-// int selectionStart = str.indexOf(selectionStartBehind) + selectionStartBehind.length();
-// int selectionEnd = str.indexOf(selectionEndBehind) + selectionEndBehind.length() - 1;
-//
-// this.checkDietParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-
-///*
-// * bugs 3229 OpenOnSelection - strange behaviour of code resolve (1GAVL08)
-// */
-//public void test40() {
-//
-// String str =
-// "public class X { \n" +
-// " Object \n" +
-// "} \n";
-//
-// String selection = "Object";
-//
-// String expectedCompletionNodeToString = "<SelectOnType:Object>";
-//
-// String completionIdentifier = "Object";
-// String expectedUnitDisplayString =
-// "public class X {\n" +
-// " <SelectOnType:Object>;\n" +
-// " public X() {\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "Object";
-// String testName = "<select fake field>";
-//
-// int selectionStart = str.indexOf(selection);
-// int selectionEnd = str.indexOf(selection) + selection.length() - 1;
-//
-// this.checkDietParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * bugs 11475 selection on local name.
- */
-public void test41() {
-
- String str =
- "function foo(){ \n" +
- " var vari; \n" +
- "} \n";
-
- String selection = "vari";
-
- String expectedCompletionNodeToString = "<SelectionOnLocalName:vari>;";
-
- String completionIdentifier = "vari";
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " <SelectionOnLocalName:vari>;\n" +
- "}\n";
- String expectedReplacedSource = "vari";
- String testName = "<select local name>";
-
- int selectionStart = str.indexOf(selection);
- int selectionEnd = str.indexOf(selection) + selection.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * bugs 11475 selection on argument name.
- */
-public void test42() {
-
- String str =
- " function foo(vari){ \n" +
- "} \n";
-
- String selection = "vari";
-
- String expectedCompletionNodeToString = "<SelectionOnArgumentName:vari>";
-
- String completionIdentifier = "vari";
- String expectedUnitDisplayString =
- "function foo(<SelectionOnArgumentName:vari>) {\n" +
- "}\n";
- String expectedReplacedSource = "vari";
- String testName = "<select argument name>";
-
- int selectionStart = str.indexOf(selection);
- int selectionEnd = str.indexOf(selection) + selection.length() - 1;
-
- this.checkDietParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-///*
-// * bugs 11475 selection on argument name inside catch statement.
-// */
-//public void test43() {
-//
-// String str =
-// "public class X { \n" +
-// " public void foo(){ \n" +
-// " try{ \n" +
-// " }catch(Object var){}\n" +
-// " } \n" +
-// "} \n";
-//
-// String selection = "var";
-//
-// String expectedCompletionNodeToString = "<SelectionOnArgumentName:Object var>";
-//
-// String completionIdentifier = "var";
-// String expectedUnitDisplayString =
-// "public class X {\n" +
-// " public X() {\n" +
-// " }\n" +
-// " public void foo() {\n" +
-// " <SelectionOnArgumentName:Object var>;\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "var";
-// String testName = "<select argument name inside catch statement>";
-//
-// int selectionStart = str.indexOf(selection);
-// int selectionEnd = str.indexOf(selection) + selection.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * bugs 15430
- */
-//public void test44() {
-//
-// String str =
-// "public class X { \n" +
-// " String x = super.foo() \n" +
-// "} \n";
-//
-// String selection = "super";
-//
-// String expectedCompletionNodeToString = "<SelectOnSuper:super>";
-//
-// String completionIdentifier = "super";
-// String expectedUnitDisplayString =
-// "public class X {\n" +
-// " String x = <SelectOnSuper:super>;\n" +
-// " public X() {\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "super";
-// String testName = "<select super in field initializer>";
-//
-// int selectionStart = str.indexOf(selection);
-// int selectionEnd = str.indexOf(selection) + selection.length() - 1;
-//
-// this.checkDietParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * bugs 14468
- */
-//public void test45() {
-//
-// String str =
-// "public class X { \n" +
-// " void foo() {\n" +
-// " if(x instanceof Object){\n" +
-// " }\n" +
-// " } \n" +
-// "} \n";
-//
-// String selection = "Object";
-//
-// String expectedCompletionNodeToString = "<SelectOnType:Object>";
-//
-// String completionIdentifier = "Object";
-// String expectedUnitDisplayString =
-// "public class X {\n"+
-// " public X() {\n"+
-// " }\n"+
-// " void foo() {\n"+
-// " <SelectOnType:Object>;\n"+
-// " }\n"+
-// "}\n";
-// String expectedReplacedSource = "Object";
-// String testName = "<select inside instanceof statement>";
-//
-// int selectionStart = str.indexOf(selection);
-// int selectionEnd = str.indexOf(selection) + selection.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-
-/*
- * bugs 14468
- */
-//public void test46() {
-//
-// String str =
-// "public class X { \n" +
-// " void foo() {\n" +
-// " y = x instanceof Object;\n" +
-// " } \n" +
-// "} \n";
-//
-// String selection = "Object";
-//
-// String expectedCompletionNodeToString = "<SelectOnType:Object>";
-//
-// String completionIdentifier = "Object";
-// String expectedUnitDisplayString =
-// "public class X {\n"+
-// " public X() {\n"+
-// " }\n"+
-// " void foo() {\n"+
-// " <SelectOnType:Object>;\n"+
-// " }\n"+
-// "}\n";
-// String expectedReplacedSource = "Object";
-// String testName = "<select inside instanceof statement>";
-//
-// int selectionStart = str.indexOf(selection);
-// int selectionEnd = str.indexOf(selection) + selection.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * bugs 14468
- */
-//public void test47() {
-//
-// String str =
-// "public class X { \n" +
-// " void foo() {\n" +
-// " boolean y = x instanceof Object;\n" +
-// " } \n" +
-// "} \n";
-//
-// String selection = "Object";
-//
-// String expectedCompletionNodeToString = "<SelectOnType:Object>";
-//
-// String completionIdentifier = "Object";
-// String expectedUnitDisplayString =
-// "public class X {\n"+
-// " public X() {\n"+
-// " }\n"+
-// " void foo() {\n"+
-// " boolean y = <SelectOnType:Object>;\n"+
-// " }\n"+
-// "}\n";
-// String expectedReplacedSource = "Object";
-// String testName = "<select inside instanceof statement>";
-//
-// int selectionStart = str.indexOf(selection);
-// int selectionEnd = str.indexOf(selection) + selection.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * bugs 14468
- */
-//public void test48() {
-//
-// String str =
-// "public class X { \n" +
-// " boolean y = x instanceof Object;\n" +
-// "} \n";
-//
-// String selection = "Object";
-//
-// String expectedCompletionNodeToString = "<SelectOnType:Object>";
-//
-// String completionIdentifier = "Object";
-// String expectedUnitDisplayString =
-// "public class X {\n"+
-// " boolean y = <SelectOnType:Object>;\n"+
-// " public X() {\n"+
-// " }\n"+
-// "}\n";
-// String expectedReplacedSource = "Object";
-// String testName = "<select inside instanceof statement>";
-//
-// int selectionStart = str.indexOf(selection);
-// int selectionEnd = str.indexOf(selection) + selection.length() - 1;
-//
-// this.checkDietParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * bugs 28064
- */
-public void test49() {
-
- String str =
- "var x = new X();\n" +
- " \n";
-
- String selection = "X";
-
- String expectedCompletionNodeToString = "<SelectOnAllocationExpression:new X()>"
- ;
-
- String completionIdentifier = "X";
- String expectedUnitDisplayString =
- "var x = <SelectOnAllocationExpression:new X()>\n" +
- "\n";
- String expectedReplacedSource = "new X()";
- String testName = "<select anonymous type>";
-
- int selectionStart = str.lastIndexOf(selection);
- int selectionEnd = str.lastIndexOf(selection) + selection.length() - 1;
-
- this.checkDietParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-/*
- * bugs https://bugs.eclipse.org/bugs/show_bug.cgi?id=52422
- */
-//public void test50() {
-//
-// String str =
-// " void foo() {\n" +
-// " new Object(){\n" +
-// " void bar(){\n" +
-// " bar2();\n" +
-// " }\n" +
-// " void bar2() {\n" +
-// " }\n" +
-// " }\n" +
-// "} \n";
-//
-// String selection = "bar2";
-//
-// String expectedCompletionNodeToString = "<SelectOnMessageSend:bar2()>";
-//
-// String completionIdentifier = "bar2";
-// String expectedUnitDisplayString =
-// "public class X {\n" +
-// " public X() {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " new Object() {\n" +
-// " () {\n" +
-// " }\n" +
-// " void bar() {\n" +
-// " <SelectOnMessageSend:bar2()>;\n" +
-// " }\n" +
-// " void bar2() {\n" +
-// " }\n" +
-// " };\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "bar2()";
-// String testName = "<select inside anonymous type>";
-//
-// int selectionStart = str.indexOf(selection);
-// int selectionEnd = str.indexOf(selection) + selection.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * bugs https://bugs.eclipse.org/bugs/show_bug.cgi?id=52422
- */
-//public void test51() {
-//
-// String str =
-// "public class X { \n" +
-// " void foo() {\n" +
-// " new Object(){\n" +
-// " void foo0(){\n" +
-// " new Object(){\n" +
-// " void bar(){\n" +
-// " bar2();\n" +
-// " }\n" +
-// " void bar2() {\n" +
-// " }\n" +
-// " }\n" +
-// " }\n" +
-// " }\n" +
-// " }\n" +
-// "} \n";
-//
-// String selection = "bar2";
-//
-// String expectedCompletionNodeToString = "<SelectOnMessageSend:bar2()>";
-//
-// String completionIdentifier = "bar2";
-// String expectedUnitDisplayString =
-// "public class X {\n" +
-// " public X() {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " new Object() {\n" +
-// " () {\n" +
-// " }\n" +
-// " void foo0() {\n" +
-// " new Object() {\n" +
-// " () {\n" +
-// " }\n" +
-// " void bar() {\n" +
-// " <SelectOnMessageSend:bar2()>;\n" +
-// " }\n" +
-// " void bar2() {\n" +
-// " }\n" +
-// " };\n" +
-// " }\n" +
-// " };\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "bar2()";
-// String testName = "<select inside anonymous type>";
-//
-// int selectionStart = str.indexOf(selection);
-// int selectionEnd = str.indexOf(selection) + selection.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-/*
- * bugs https://bugs.eclipse.org/bugs/show_bug.cgi?id=52422
- */
-//public void test52() {
-//
-// String str =
-// "public class X { \n" +
-// " void foo() {\n" +
-// " new Object(){\n" +
-// " void foo0(){\n" +
-// " new Object(){\n" +
-// " void bar(){\n" +
-// " bar2();\n" +
-// " }\n" +
-//
-// " }\n" +
-// " }\n" +
-// " void bar2() {\n" +
-// " }\n" +
-// " }\n" +
-// " }\n" +
-// "} \n";
-//
-// String selection = "bar2";
-//
-// String expectedCompletionNodeToString = "<SelectOnMessageSend:bar2()>";
-//
-// String completionIdentifier = "bar2";
-// String expectedUnitDisplayString =
-// "public class X {\n" +
-// " public X() {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " new Object() {\n" +
-// " () {\n" +
-// " }\n" +
-// " void foo0() {\n" +
-// " new Object() {\n" +
-// " () {\n" +
-// " }\n" +
-// " void bar() {\n" +
-// " <SelectOnMessageSend:bar2()>;\n" +
-// " }\n" +
-// " };\n" +
-// " }\n" +
-// " void bar2() {\n" +
-// " }\n" +
-// " };\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "bar2()";
-// String testName = "<select inside anonymous type>";
-//
-// int selectionStart = str.indexOf(selection);
-// int selectionEnd = str.indexOf(selection) + selection.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-//public void test53() {
-//
-// String str =
-// "public class X { \n" +
-// " void foo(String[] stringArray) {\n" +
-// " for(String string2 : stringArray);\n" +
-// " }\n" +
-// "} \n";
-//
-// String selection = "string2";
-//
-// String expectedCompletionNodeToString = "<SelectionOnLocalName:String string2>;";
-//
-// String completionIdentifier = "string2";
-// String expectedUnitDisplayString =
-// "public class X {\n" +
-// " public X() {\n" +
-// " }\n" +
-// " void foo(String[] stringArray) {\n" +
-// " for (<SelectionOnLocalName:String string2> : stringArray) \n" +
-// " ;\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "string2";
-// String testName = "<select>";
-//
-// int selectionStart = str.indexOf(selection);
-// int selectionEnd = str.indexOf(selection) + selection.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=84001
-//public void test54() {
-//
-// String str =
-// "public class X { \n" +
-// " void foo() {\n" +
-// " new Test.Sub();\n" +
-// " }\n" +
-// "} \n";
-//
-// String selection = "Test";
-//
-// String expectedCompletionNodeToString = "<SelectOnType:Test>";
-//
-// String completionIdentifier = "Test";
-// String expectedUnitDisplayString =
-// "public class X {\n" +
-// " public X() {\n" +
-// " }\n" +
-// " void foo() {\n" +
-// " new <SelectOnType:Test>();\n" +
-// " }\n" +
-// "}\n";
-// String expectedReplacedSource = "Test";
-// String testName = "<select>";
-//
-// int selectionStart = str.indexOf(selection);
-// int selectionEnd = str.indexOf(selection) + selection.length() - 1;
-//
-// this.checkMethodParse(
-// str.toCharArray(),
-// selectionStart,
-// selectionEnd,
-// expectedCompletionNodeToString,
-// expectedUnitDisplayString,
-// completionIdentifier,
-// expectedReplacedSource,
-// testName);
-//}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=84001
-public void test55() {
-
- String str =
- "function foo() {\n" +
- " new Test.Sub();\n" +
- "} \n";
-
- String selection = "Sub";
-
- String expectedCompletionNodeToString = "<SelectOnAllocationExpression:new Test.Sub()>";
-
- String completionIdentifier = "Sub";
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " <SelectOnAllocationExpression:new Test.Sub()>;\n" +
- "}\n";
- String expectedReplacedSource = "new Test.Sub()";
- String testName = "<select>";
-
- int selectionStart = str.indexOf(selection);
- int selectionEnd = str.indexOf(selection) + selection.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-
-static final String RESOLVE_LOCAL_NAME=
- "function foo(){\n" +
- "var var1 = new Object();\n" +
- "var var2 = 1;\n" +
- "var1.toString();\n" +
- "var2++;\n" +
- "if (var2 == 3) {\n" +
- " var var3 = var1;\n" +
- " var3.hashCode();\n" +
- "} else {\n" +
- " var var3 = new Object();\n" +
- " var3.toString();\n" +
- "}\n" +
- "var var4 = 1;\n" +
- "\n" +
- "}\n" ;
-
-public void test56() {
-
- String str =RESOLVE_LOCAL_NAME;
-
- String startString = "var1.toString();";
- String selection = "var1";
-
- String expectedCompletionNodeToString = "<SelectOnName:var1>";
-
- String completionIdentifier = "var1";
- String expectedUnitDisplayString =
- "function foo() {\n" +
- " var var1;\n" +
- " var var2;\n" +
- " <SelectOnName:var1>;\n" +
- " {\n" +
- " var var3;\n" +
- " }\n" +
- " {\n" +
- " var var3;\n" +
- " }\n" +
- " var var4;\n" +
- "}\n";
-
- String expectedReplacedSource = "var1";
- String testName = "<select>";
-
- int selectionStart = str.indexOf(startString);
- int selectionEnd = selectionStart + selection.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-
-
-public void test57() {
-
- String str ="YAHOO.widget.Slider = function (sElementId, sGroup, oThumb, sType) {\n"+
- "if (sElementId) {\n"+
- "}\n"+
- "};\n";
-
- String startString = "sElementId)";
- String selection = "sElementId";
-
- String expectedCompletionNodeToString = "<SelectOnName:sElementId>";
-
- String completionIdentifier = "sElementId";
- String expectedUnitDisplayString =
- "YAHOO.widget.Slider = function (sElementId, sGroup, oThumb, sType) {\n"+
- " if (<SelectOnName:sElementId>)\n {\n"+
- " }\n"+
- "};\n";
-
-
- String expectedReplacedSource = "sElementId";
- String testName = "<select>";
-
- int selectionStart = str.indexOf(startString);
- int selectionEnd = selectionStart + selection.length() - 1;
-
- this.checkMethodParse(
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
-}
-
-
-
-
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SelectionTest2.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SelectionTest2.java
deleted file mode 100644
index 8ca4666..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SelectionTest2.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import java.util.Locale;
-
-import org.eclipse.wst.jsdt.core.compiler.CharOperation;
-import org.eclipse.wst.jsdt.internal.codeassist.select.SelectionParser;
-import org.eclipse.wst.jsdt.internal.codeassist.select.SelectionScanner;
-import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
-import org.eclipse.wst.jsdt.internal.compiler.DefaultErrorHandlingPolicies;
-import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
-import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.ast.Initializer;
-import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblemFactory;
-import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
-
-public class SelectionTest2 extends AbstractSelectionTest {
-
-public SelectionTest2(String testName) {
- super(testName);
-}
-boolean thereWasAnNPE = false;
-private class SpecialSelectionParser extends SelectionParser {
- public SpecialSelectionParser(ProblemReporter problemReporter) {
- super(problemReporter);
- }
- public void doNPEInParser(){
- this.stack = null;
- }
-}
-
- SpecialSelectionParser createParser(){
- CompilerOptions options = new CompilerOptions(getCompilerOptions());
- SpecialSelectionParser parser =
- new SpecialSelectionParser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- options,
- new DefaultProblemFactory(Locale.getDefault())));
- return parser;
-}
-void checkMethodParse(
- SelectionParser parser,
- char[] source,
- int selectionStart,
- int selectionEnd,
- String expectedSelection,
- String expectedUnitToString,
- String expectedSelectionIdentifier,
- String expectedSelectedSource,
-
- String testName) {
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration unit = parser.dietParse(sourceUnit, compilationResult, selectionStart, selectionEnd);
-
- ASTNode foundMethod = null;
- if (unit.types != null) {
- for (int i = 0; i < unit.types.length; i++) {
- TypeDeclaration type = unit.types[i];
- ASTNode method = findMethod(type, selectionStart);
- if (method != null) {
- foundMethod = method;
- break;
- }
- }
- }
- assertTrue("no method found at cursor location", foundMethod != null);
- if (foundMethod instanceof AbstractMethodDeclaration) {
- parser.parseBlockStatements((AbstractMethodDeclaration)foundMethod, unit);
- } else {
- TypeDeclaration type = (TypeDeclaration)foundMethod;
- if (type.fields != null) {
- for (int i = 0; i < type.fields.length; i++) {
- FieldDeclaration field = type.fields[i];
- if (field instanceof Initializer && field.sourceStart <= selectionStart && selectionStart <= field.sourceEnd) {
- parser.parseBlockStatements((Initializer)field, type, unit);
- break;
- }
- }
- }
- }
-
- String computedUnitToString = unit.toString();
- //System.out.println(computedUnitToString);
- //System.out.println(Util.displayString(computedUnitToString));
- //System.out.println(expectedUnitToString);
-
- String computedCompletion = parser.assistNode == null
- ? NONE
- : parser.assistNode.toString();
- assertEquals(
- "invalid selection node-" + testName,
- expectedSelection,
- computedCompletion);
-
- assertEquals(
- "invalid selection location-"+testName,
- expectedUnitToString,
- computedUnitToString);
-
- if (expectedSelectionIdentifier != null){
- char[] chars = ((SelectionScanner)parser.scanner).selectionIdentifier;
- String computedSelectionIdentifier = chars == null ? NONE : new String(chars);
- assertEquals(
- "invalid selection identifier-" + testName,
- expectedSelectionIdentifier,
- computedSelectionIdentifier);
- }
- if (expectedSelectedSource != null){
- char[] chars = null;
- if (parser.assistNode != null){
- chars = CharOperation.subarray(
- parser.scanner.source,
- parser.assistNode.sourceStart,
- parser.assistNode.sourceEnd + 1);
- } else {
- if (parser.assistIdentifier() != null){
- if (((SelectionScanner)parser.scanner).selectionEnd
- >= ((SelectionScanner)parser.scanner).selectionStart){
- chars = CharOperation.subarray(
- parser.scanner.source,
- ((SelectionScanner)parser.scanner).selectionStart,
- ((SelectionScanner)parser.scanner).selectionEnd + 1);
- }
- }
- }
- String computedReplacedSource = chars == null ? NONE : new String(chars);
- assertEquals(
- "invalid replaced source-" + testName,
- expectedSelectedSource,
- computedReplacedSource);
- }
-}
-/*
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=30946
- */
-public void testBug30946() {
- final SpecialSelectionParser parser = createParser();
- Thread query = new Thread(
- new Runnable(){
- public void run(){
- String str =
- "public class A {\n" +
- " void foo() {\n" +
- " if (true) {\n" +
- " if()\n" +
- " switch (1) {\n" +
- " case A.B:\n" +
- " C d= (C) s;\n" +
- " here\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}n";
-
- String selection = "here";
-
- String expectedCompletionNodeToString = "<SelectOnName:here>";
-
- String completionIdentifier = "here";
- String expectedUnitDisplayString =
- "public class A {\n" +
- " public A() {\n" +
- " }\n" +
- " void foo() {\n" +
- " {\n" +
- " {\n" +
- " C d;\n" +
- " <SelectOnName:here>;\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
- String expectedReplacedSource = "here";
- String testName = "<inifinite loop test>";
-
- int selectionStart = str.lastIndexOf(selection);
- int selectionEnd = str.lastIndexOf(selection) + selection.length() - 1;
-
- try {
- SelectionTest2.this.checkMethodParse(
- parser,
- str.toCharArray(),
- selectionStart,
- selectionEnd,
- expectedCompletionNodeToString,
- expectedUnitDisplayString,
- completionIdentifier,
- expectedReplacedSource,
- testName);
- } catch (NullPointerException e) {
- SelectionTest2.this.thereWasAnNPE = true;
- }
- }
- });
-
- query.start();
- try {
- Thread.sleep(500);
- } catch (InterruptedException e) {
- }
- // force parser to stop
- parser.doNPEInParser();
- try {
- Thread.sleep(500);
- } catch (InterruptedException e) {
- }
- assertTrue("there is an infinite loop", !thereWasAnNPE);
-
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SingleCompletionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SingleCompletionTest.java
deleted file mode 100644
index afccb6a..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SingleCompletionTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import java.lang.reflect.InvocationTargetException;
-
-import junit.framework.TestCase;
-
-/**
- * Only 1 test should be in this class
- */
-public class SingleCompletionTest extends AbstractCompletionTest {
-/**
- * SingleCompletionTest constructor comment.
- * @param testName java.lang.String
- */
-public SingleCompletionTest(String testName) {
- super(testName);
-}
-private void run(Class testClass, String methodName) {
- try {
- java.lang.reflect.Constructor constructor = testClass.getDeclaredConstructor(new Class[] {String.class});
- TestCase test = (TestCase)constructor.newInstance(new Object[] {"single completion test"});
- java.lang.reflect.Method method = testClass.getDeclaredMethod(methodName, new Class[] {});
- method.invoke(test, new Object[] {});
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (NoSuchMethodException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- Throwable target = e.getTargetException();
- if (target instanceof RuntimeException) {
- throw (RuntimeException)target;
- }
- if (target instanceof Error) {
- throw (Error)target;
- }
- throw new Error(target.getMessage());
- }
-}
-/*
- * The test.
- */
-public void test() {
- run(NameReferenceCompletionTest.class, "testMethodInvocationAnonymousInnerClass2");
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceElementParserTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceElementParserTest.java
deleted file mode 100644
index feafab8..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceElementParserTest.java
+++ /dev/null
@@ -1,5261 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import java.util.Locale;
-
-import org.eclipse.wst.jsdt.core.compiler.CategorizedProblem;
-import org.eclipse.wst.jsdt.core.compiler.CharOperation;
-import org.eclipse.wst.jsdt.core.tests.util.AbstractCompilerTest;
-import org.eclipse.wst.jsdt.internal.compiler.ISourceElementRequestor;
-import org.eclipse.wst.jsdt.internal.compiler.SourceElementParser;
-import org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
-import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblemFactory;
-
-public class SourceElementParserTest extends AbstractCompilerTest implements ISourceElementRequestor {
- private SourceUnit currentUnit;
- private SourceType currentType;
- private SourceMethod currentMethod;
- private SourceField currentField;
- private SourceInitializer currentInitializer;
- private char[] source;
- private SourcePackage currentPackage;
- private SourceImport[] currentImports;
- private int numberOfImports;
-public SourceElementParserTest(String testName) {
- super(testName);
-}
-public SourceElementParserTest(String testName, char[] source) {
- super(testName);
- this.source = source;
-}
-/**
- * acceptConstructorReference method comment.
- */
-public void acceptConstructorReference(char[] typeName, int argCount, int sourcePosition) {
- if (currentMethod == null) {
- if (currentType != null) {
- StringBuffer buffer = new StringBuffer();
- buffer.append(typeName).append("(").append(argCount).append(")\n");
- currentType.setDefaultConstructor(buffer.toString());
- }
- return;
- }
- if (currentMethod.isConstructor()) {
- StringBuffer buffer = new StringBuffer();
- buffer.append(typeName).append("(").append(argCount).append(")\n");
- currentMethod.setExplicitConstructorCall(buffer.toString());
- } else {
- if (currentType != null) {
- StringBuffer buffer = new StringBuffer();
- buffer.append(typeName).append("(").append(argCount).append(")\n");
- currentType.setDefaultConstructor(buffer.toString());
- }
- }
-}
-/**
- * acceptFieldReference method comment.
- */
-public void acceptFieldReference(char[] fieldName, int sourcePosition) {}
-/**
- * acceptImport method comment.
- */
-public void acceptImport(
- int declarationStart,
- int declarationEnd,
- char[][] tokens,
- boolean onDemand) {
-
- addImport(
- new SourceImport(declarationStart, declarationEnd, CharOperation.concatWith(tokens, '.'), onDemand, source));
-}
-/**
- * acceptLineSeparatorPositions method comment.
- */
-public void acceptLineSeparatorPositions(int[] positions) {}
-/**
- * acceptMethodReference method comment.
- */
-public void acceptMethodReference(char[] methodName, int argCount, int sourcePosition) {}
-/**
- * acceptPackage method comment.
- */
-public void acceptPackage(
- int declarationStart,
- int declarationEnd,
- char[] name) {
-
- currentPackage =
- new SourcePackage(declarationStart, declarationEnd, name, source);
-}
-/**
- * acceptProblem method comment.
- */
-public void acceptProblem(CategorizedProblem problem) {}
-/**
- * acceptTypeReference method comment.
- */
-public void acceptTypeReference(char[][] typeName, int sourceStart, int sourceEnd) {}
-/**
- * acceptTypeReference method comment.
- */
-public void acceptTypeReference(char[] typeName, int sourcePosition) {}
-/**
- * acceptUnknownReference method comment.
- */
-public void acceptUnknownReference(char[][] name, int sourceStart, int sourceEnd) {}
-/**
- * acceptUnknownReference method comment.
- */
-public void acceptUnknownReference(char[] name, int sourcePosition) {}
-protected void addImport(SourceImport sourceImport) {
- if (currentImports == null) {
- currentImports = new SourceImport[4];
- }
-
- if (numberOfImports == currentImports.length) {
- System.arraycopy(
- currentImports,
- 0,
- currentImports = new SourceImport[numberOfImports * 2],
- 0,
- numberOfImports);
- }
- currentImports[numberOfImports++] = sourceImport;
-}
-public void dietParse(String s, String testName) {
- this.dietParse(s, testName, false);
-}
-public void dietParse(String s, String testName, boolean recordLocalDeclaration) {
-
-
- this.source = s.toCharArray();
- reset();
- SourceElementParser parser =
- new SourceElementParser(
- this,
- new DefaultProblemFactory(Locale.getDefault()),
- new CompilerOptions(getCompilerOptions()),
- recordLocalDeclaration/*don't record local declarations*/,
- true/*optimize string literals*/);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
-
- parser.parseCompilationUnit(sourceUnit, false);
-
-}
-public static String displayModifiers(int modifiers) {
- StringBuffer buffer = new StringBuffer();
-
- if ((modifiers & ClassFileConstants.AccPublic) != 0)
- buffer.append("public ");
- if ((modifiers & ClassFileConstants.AccProtected) != 0)
- buffer.append("protected ");
- if ((modifiers & ClassFileConstants.AccPrivate) != 0)
- buffer.append("private ");
- if ((modifiers & ClassFileConstants.AccFinal) != 0)
- buffer.append("final ");
- if ((modifiers & ClassFileConstants.AccStatic) != 0)
- buffer.append("static ");
- if ((modifiers & ClassFileConstants.AccAbstract) != 0)
- buffer.append("abstract ");
- if ((modifiers & ClassFileConstants.AccNative) != 0)
- buffer.append("native ");
- return buffer.toString();
-}
-public void enterType(TypeInfo typeInfo) {
- if (currentType == null) {
- // top level type
- currentType =
- new SourceType(
- null,
- typeInfo.declarationStart,
- typeInfo.modifiers,
- typeInfo.name,
- typeInfo.nameSourceStart,
- typeInfo.nameSourceEnd,
- typeInfo.superclass,
- source);
- currentType.setPackage(currentPackage);
- setImports();
- } else {
- // member type
- SourceType memberType;
- currentType.addMemberType(
- memberType =
- new SourceType(
- currentType.getName(),
- typeInfo.declarationStart,
- typeInfo.modifiers,
- typeInfo.name,
- typeInfo.nameSourceStart,
- typeInfo.nameSourceEnd,
- typeInfo.superclass,
- source));
- memberType.parent = currentType;
- currentType = memberType;
- }
-}
-public void enterCompilationUnit() {
- currentUnit=new SourceUnit();
-}
-public void enterConstructor(MethodInfo methodInfo) {
- enterAbtractMethod(methodInfo);
-}
-public void enterField(FieldInfo fieldInfo) {
- if (currentType!=null)
- {
-
- currentType.addField(
- currentField =
- new SourceField(
- fieldInfo.declarationStart,
- fieldInfo.modifiers,
- fieldInfo.type,
- fieldInfo.name,
- fieldInfo.nameSourceStart,
- fieldInfo.nameSourceEnd,
- source));
- }else{
- currentUnit.addField(
- currentField =
- new SourceField(
- fieldInfo.declarationStart,
- fieldInfo.modifiers,
- fieldInfo.type,
- fieldInfo.name,
- fieldInfo.nameSourceStart,
- fieldInfo.nameSourceEnd,
- source));
-
-
- }
-}
-public void enterInitializer(int declarationSourceStart, int modifiers) {
- currentType.addField(
- currentInitializer = new SourceInitializer(
- declarationSourceStart,
- modifiers));
-}
-public void exitInitializer(int declarationSourceEnd) {
- currentInitializer.setDeclarationSourceEnd(declarationSourceEnd);
-}
-public void enterMethod(MethodInfo methodInfo) {
- enterAbtractMethod(methodInfo);
-}
-protected void enterAbtractMethod(MethodInfo methodInfo) {
- if (currentMethod!=null)
- {
- SourceMethod memberMethod;
- currentMethod.addMemberMethod(
- memberMethod =
- new SourceMethod(
- methodInfo.declarationStart,
- methodInfo.modifiers,
- methodInfo.returnType,
- methodInfo.name, // null for constructors
- methodInfo.nameSourceStart,
- methodInfo.nameSourceEnd,
- methodInfo.parameterTypes,
- methodInfo.parameterNames,
- source));
- memberMethod.parent = currentMethod;
- currentMethod = memberMethod;
-
- }
- else if (currentType!=null)
- {
- currentType.addMethod(
- currentMethod =
- new SourceMethod(
- methodInfo.declarationStart,
- methodInfo.modifiers,
- methodInfo.returnType,
- methodInfo.name, // null for constructors
- methodInfo.nameSourceStart,
- methodInfo.nameSourceEnd,
- methodInfo.parameterTypes,
- methodInfo.parameterNames,
- source));
-
- }
- else
- {
- currentUnit.addMethod(
- currentMethod =
- new SourceMethod(
- methodInfo.declarationStart,
- methodInfo.modifiers,
- methodInfo.returnType,
- methodInfo.name, // null for constructors
- methodInfo.nameSourceStart,
- methodInfo.nameSourceEnd,
- methodInfo.parameterTypes,
- methodInfo.parameterNames,
- source));
-
- }
-}
-public void exitType(int declarationEnd) {
- currentType.setDeclarationSourceEnd(declarationEnd);
- if (currentType.parent != null) {
- currentType = currentType.parent;
- }
-}
-public void exitCompilationUnit(int declarationEnd) {}
-public void exitConstructor(int declarationEnd) {
- exitAbstractMethod(declarationEnd);
-}
-public void exitField(int initializationStart, int declarationEnd, int declarationSourceEnd) {
- currentField.setDeclarationSourceEnd(declarationEnd);
-}
-public void exitMethod(int declarationEnd, int defaultValueStart, int defaultValueEnd) {
- exitAbstractMethod(declarationEnd);
-}
-protected void exitAbstractMethod(int declarationEnd) {
- currentMethod.setDeclarationSourceEnd(declarationEnd);
- currentMethod=currentMethod.parent;
-}
-public void fullParse(String s, String testName) {
- this.fullParse(s, testName, false);
-}
-public void fullParse(String s, String testName, boolean recordLocalDeclaration) {
- this.source = s.toCharArray();
- reset();
- SourceElementParser parser =
- new SourceElementParser(
- this, new DefaultProblemFactory(Locale.getDefault()),
- new CompilerOptions(getCompilerOptions()),
- recordLocalDeclaration/*don't record local declarations*/,
- true/*optimize string literals*/);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
-
- parser.parseCompilationUnit(sourceUnit, true);
-}
-public void reset() {
- currentType = null;
- currentUnit = null;
- currentMethod = null;
- currentField = null;
- currentPackage = null;
- currentImports = null;
- numberOfImports = 0;
-}
-public void setImports() {
- if (currentImports == null)
- return;
- if (numberOfImports != currentImports.length) {
- System.arraycopy(
- currentImports,
- 0,
- currentImports = new SourceImport[numberOfImports],
- 0,
- numberOfImports);
- }
- currentType.setImports(currentImports);
-}
-//public void test00() {
-//
-// String s =
-// "i=0;"
-// + "\n";
-//
-// String expectedUnitToString =
-// "i=0;\n"
-// + " ";
-//
-// String testName = "test00: full parse";
-// fullParse(s,testName);
-////
-//// assertEquals(
-//// "Invalid class declarationSourceStart ",
-//// 52,
-//// currentType.getDeclarationSourceStart());
-////
-//// assertEquals(
-//// "Invalid class declarationSourceEnd ",
-//// 178,
-//// currentType.getDeclarationSourceEnd());
-////
-//// SourceField[] fields = currentType.getFields();
-//// assertTrue(" invalid fields ", fields != null);
-//// assertEquals("Invalid fields length ", 2, fields.length);
-////
-//// assertEquals("Invalid declaration source start for field h", 105, fields[0].getDeclarationSourceStart());
-//// assertEquals("Invalid declaration source end for field h", 117, fields[0].getDeclarationSourceEnd());
-////
-//// assertEquals("Invalid declaration source start for field i", 119, fields[1].getDeclarationSourceStart());
-//// assertEquals("Invalid declaration source end for field i", 144, fields[1].getDeclarationSourceEnd());
-////
-//// SourceMethod[] methods = currentType.getMethods();
-//// assertTrue(" invalid methods ", methods != null);
-//// assertEquals("Invalid methods length ", 3, methods.length);
-////
-//// assertEquals("Invalid declaration source start for method foo", 69, methods[0].getDeclarationSourceStart());
-//// assertEquals("Invalid declaration source end for method foo", 103, methods[0].getDeclarationSourceEnd());
-////
-//// assertEquals("Invalid declaration source start for method bare", 147, methods[1].getDeclarationSourceStart());
-//// assertEquals("Invalid declaration source end for method bare", 163, methods[1].getDeclarationSourceEnd());
-////
-//// assertEquals("Invalid declaration source start for method truc", 164, methods[2].getDeclarationSourceStart());
-//// assertEquals("Invalid declaration source end for method truc", 177, methods[2].getDeclarationSourceEnd());
-////
-//// assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-////
-//// assertEquals(" Invalid actual name for method bare", "bar" + "\\" + "u0065", methods[1].getActualName());
-//
-// assertEquals(
-// "Invalid source " + testName,
-// expectedUnitToString,
-// currentUnit.toString());
-//}
-
-public void test01() {
-
- String s =
- "function foo() {\n"
- + "System.out.println();\n"
- + "}\n"
- + "var h;\n"
- + "var i ;\n"
- + "\n"
- + "function bar" + "\\" + "u0065(){}\n"
- + "function truc(){}\n"
- + "\n";
-
- String expectedUnitToString =
- "\tvar h;\n"
- + "\tvar i;\n"
- + "\tfunction foo() {}\n"
- + "\tfunction bare() {}\n"
- + "\tfunction truc() {}\n"
- + "";
-
- String testName = "test01: full parse";
- fullParse(s,testName);
-
- currentUnit.toString();
- SourceField[] fields = currentUnit.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("Invalid fields length ", 2, fields.length);
-
- assertEquals("Invalid declaration source start for field h", 41, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field h",46 , fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field i", 48, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field i", 54, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentUnit.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("Invalid methods length ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 0, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 39, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bare", 57, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bare", 78, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 80, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 96, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bare", "bar" + "\\" + "u0065", methods[1].getActualName());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentUnit.toString());
-}
-
-
-public void test02() {
-
- String s =
- "/** javadoc comment */\n"
- + "function ss()"
- + "\n";
-
- String expectedUnitToString =
- "\tfunction ss() {}\n"
- + "";
-
- String testName = "test02: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentUnit.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentUnit.toString());
-}
-public void test03() {
-
- String s =
- "function X() {\n"
- + " this.h=1;\n"
- + " this.i=[];\n"
- + "}\n"
- + "function X_foo() {\n"
- + "}\n"
- + "X.prototype.foo=X_foo;\n"
- + "";
-
- String expectedUnitToString =
- "class X extends Object {\n"
- + " var h;\n"
- + " var i;\n"
- + " function foo() {}\n"
- + " function X() {}\n"
- + "}"
- + "";
-
- String testName = "test03: diet parse";
- dietParse(s,testName);
-
-// assertEquals(
-// "Invalid class declarationSourceStart ",
-// 52,
-// currentType.getDeclarationSourceStart());
-//
-// assertEquals(
-// "Invalid class declarationSourceEnd ",
-// 178,
-// currentType.getDeclarationSourceEnd());
-//
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("Invalid fields length ", 2, fields.length);
-
-// assertEquals("Invalid declaration source start for field h", 105, fields[0].getDeclarationSourceStart());
-// assertEquals("Invalid declaration source end for field h", 117, fields[0].getDeclarationSourceEnd());
-//
-// assertEquals("Invalid declaration source start for field i", 119, fields[1].getDeclarationSourceStart());
-// assertEquals("Invalid declaration source end for field i", 144, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("Invalid methods length ", 2, methods.length);
-
-// assertEquals("Invalid declaration source start for method foo", 69, methods[0].getDeclarationSourceStart());
-// assertEquals("Invalid declaration source end for method foo", 103, methods[0].getDeclarationSourceEnd());
-//
-// assertEquals("Invalid declaration source start for method bar", 147, methods[1].getDeclarationSourceStart());
-// assertEquals("Invalid declaration source end for method bar", 163, methods[1].getDeclarationSourceEnd());
-//
-// assertEquals("Invalid declaration source start for method truc", 164, methods[2].getDeclarationSourceStart());
-// assertEquals("Invalid declaration source end for method truc", 177, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "X_foo", methods[0].getActualName());
- assertEquals(" Invalid name for method foo", "foo", new String(methods[0].getSelector()));
-
-// assertEquals(" Invalid actual name for method bare", "bar" + "\\" + "u0065", methods[1].getActualName());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test04() {
-
- String s =
- "package a; \n"
- + "import java.lang.*; \n"
- + "import java.util.*; \n"
- + " \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " \n"
- + " class L { \n"
- + " void baz(){} \n"
- + " } \n"
- + " \n"
- + " public int h; \n"
- + " public int[] i = { 0, 1 }; \n"
- + " \n"
- + " void bar(){ \n"
- + " void truc(){ \n"
- + "} \n";
-
- String expectedUnitToString =
- "package a;\n"
- + "import java.lang.*;\n"
- + "import java.util.*;\n"
- + "public class X {\n"
- + "\tpublic int h;\n"
- + "\tpublic int[] i;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
- String testName = "test04: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 89,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 372,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("Invalid fields length ", 2, fields.length);
-
- assertEquals("Invalid declaration source start for field h", 248, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field h", 260, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field i", 271, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field i", 296, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("Invalid methods length ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 115, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 222, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 317, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 337, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 339, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 360, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test05() {
-
- String s =
- "package a; \n"
- + "import java.lang.*; \n"
- + "import java.util.*; \n"
- + " \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " \n"
- + " class L { \n"
- + " void baz(){} \n"
- + " } \n"
- + " \n"
- + " public int h; \n"
- + " public int[] i = { 0, 1 }; \n"
- + " \n"
- + " void bar(){ \n"
- + " void truc(){ \n"
- + "} \n";
-
- String expectedUnitToString =
- "package a;\n"
- + "import java.lang.*;\n"
- + "import java.util.*;\n"
- + "public class X {\n"
- + "\tpublic int h;\n"
- + "\tpublic int[] i;\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
-
- String testName = "test05: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 89,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 372,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("Invalid fields length ", 2, fields.length);
-
- assertEquals("Invalid declaration source start for field h", 248, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field h", 260, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field i", 271, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field i", 296, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("Invalid methods length ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 115, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 222, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 317, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 337, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 339, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 360, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test06() {
-
- String s =
- "package a; \n"
- + "import java.lang.*; \n"
- + "import java.util.*; \n"
- + " \n"
- + "public class X { \n"
- + " X x; \n"
- + " Object a, b = null; \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " \n"
- + " public int h; \n"
- + " public int[] i = { 0, 1 }; \n"
- + " \n"
- + " void bar(){ \n"
- + " void truc(){ \n"
- + "} \n";
-
- String expectedUnitToString =
- "package a;\n"
- + "import java.lang.*;\n"
- + "import java.util.*;\n"
- + "public class X {\n"
- + "\tX x;\n"
- + "\tObject a;\n"
- + "\tObject b;\n"
- + "\tpublic int h;\n"
- + "\tpublic int[] i;\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
-
- String testName = "test06: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 89,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 347,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("Invalid fields length ", 5, fields.length);
-
- assertEquals("Invalid declaration source start for field x", 115, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 118, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field a", 131, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field a", 139, fields[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field b", 131, fields[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field b", 149, fields[2].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field h", 223, fields[3].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field h", 235, fields[3].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field i", 246, fields[4].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field i", 271, fields[4].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("Invalid methods length ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 159, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 221, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 292, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 312, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 314, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 335, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method truc", "truc", methods[2].getActualName());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test07() {
-
- String s =
- "package a; \n"
- + "import java.lang.*; \n"
- + "import java.util.*; \n"
- + " \n"
- + "public class X { \n"
- + " X x; \n"
- + " Object a, b = null; \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " \n"
- + " public int h; \n"
- + " public int[] i = { 0, 1 }; \n"
- + " \n"
- + " void bar(){ \n"
- + " void truc(){ \n"
- + "} \n";
-
- String expectedUnitToString =
- "package a;\n"
- + "import java.lang.*;\n"
- + "import java.util.*;\n"
- + "public class X {\n"
- + "\tX x;\n"
- + "\tObject a;\n"
- + "\tObject b;\n"
- + "\tpublic int h;\n"
- + "\tpublic int[] i;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
-
- String testName = "test07: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 89,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 347,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("Invalid fields length ", 5, fields.length);
-
- assertEquals("Invalid declaration source start for field xh", 115, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 118, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field a", 131, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field a", 139, fields[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field b", 131, fields[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field b", 149, fields[2].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field h", 223, fields[3].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field h", 235, fields[3].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field i", 246, fields[4].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field i", 271, fields[4].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("Invalid methods length ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 159, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 221, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 292, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 312, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 314, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 335, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method truc", "truc", methods[2].getActualName());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test08() {
-
- String s =
- "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " void baz(){} \n"
- + " } \n"
- + " \n"
- + " void bar(){ \n"
- + " } \n"
- + " void truc(){ \n"
- + " } \n"
- + "} \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
-
- String testName = "test08: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 198,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("Invalid methods length ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 27, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 100, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 127, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 149, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 163, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 185, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method truc", "truc", methods[2].getActualName());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test09() {
-
- String s =
- "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " void baz(){} \n"
- + " } \n"
- + " \n"
- + " void bar(){ \n"
- + " } \n"
- + " void truc(){ \n"
- + " } \n"
- + "} \n";
-
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
-
- String testName = "test09: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 198,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("Invalid methods length ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 27, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 100, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 127, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 149, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 163, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 185, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method truc", "truc", methods[2].getActualName());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test10() {
-
- String s =
- "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " void baz(){} \n"
- + " } \n"
- + " /** comment \n"
- + " * \n"
- + " * \n"
- + " */ \n"
- + " \n"
- + " void bar(){ \n"
- + " } \n"
- + " void truc(){ \n"
- + " } \n"
- + "} \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
-
- String testName = "test10: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 415,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("Invalid methods length ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 27, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 100, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 114, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 366, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 380, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 402, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method truc", "truc", methods[2].getActualName());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test11() {
-
- String s =
- "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " void baz(){} \n"
- + " /** comment \n"
- + " * \n"
- + " * \n"
- + " */ \n"
- + " int[][] j[] = null, k; // comment \n"
- + " \n"
- + " void bar(){ \n"
- + " } \n"
- + " void truc(){ \n"
- + " } \n"
- + "} \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tint[][][] j;\n"
- + "\tint[][] k;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "\tvoid baz() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
-
- String testName = "test11: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 449,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
-
- assertEquals("Invalid declaration source start for field j", 102, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field j", 305, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field k", 102, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field k", 308, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("Invalid methods length ", 4, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 27, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 76, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method baz", 79, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method baz", 90, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 378, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 400, methods[2].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 414, methods[3].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 436, methods[3].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method baz", "baz", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[2].getActualName());
-
- assertEquals(" Invalid actual name for method truc", "truc", methods[3].getActualName());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test12() {
-
- String s =
- "import java.util.Enumeration;\n"
- + "import java.util.Hashtable;"
- + "\n"
- + "/** comment */\n"
- + "public class A2 {\n"
- + " void foo() {\n"
- + " System.out.println();\n"
- + " void baz(){}\n"
- + " /** comment\n"
- + " *\n"
- + " *\n"
- + " */\n"
- + " static { } // comment\n"
- + " \n"
- + "\n"
- + " void bar(){\n"
- + " }\n"
- + " void truc(){\n"
- + " }\n"
- + "}\n";
-
- String expectedUnitToString =
- "import java.util.Enumeration;\n"
- + "import java.util.Hashtable;\n"
- + "public class A2 {\n"
- + "\tstatic {}\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "\tvoid baz() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
-
- String testName = "test12: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 58,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 231,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("Invalid fields length ", 1, fields.length);
-
- assertEquals("Invalid declaration source start for initializer", 145, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for initializer", 181, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("Invalid methods length ", 4, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 92, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 128, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method baz", 131, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method baz", 142, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 183, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 212, methods[2].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 215, methods[3].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 229, methods[3].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method baz", "baz", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[2].getActualName());
-
- assertEquals(" Invalid actual name for method truc", "truc", methods[3].getActualName());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test13() {
-
- String s =
- "import java.util.Enumeration;\n"
- + "import java.util.Hashtable;\n"
- + "\n"
- + "public class A2 {\n"
- + " void foo() {\n"
- + " System.out.println();\n"
- + " void baz(){}\n"
- + " static { }\n"
- + " \n"
- + "\n"
- + " void bar(){\n"
- + " }\n"
- + " void truc(){\n"
- + " }\n"
- + "}\n";
-
- String expectedUnitToString =
- "import java.util.Enumeration;\n"
- + "import java.util.Hashtable;\n"
- + "public class A2 {\n"
- + "\tstatic {}\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "\tvoid baz() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
- String testName = "test13: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 59,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 180,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
-
- assertEquals(" invalid fields length", 1, fields.length);
-
- assertEquals("Invalid declaration source start for initializer", 132, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for initializer", 141, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("Invalid methods length ", 4, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 78, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 114, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method baz", 117, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method baz", 128, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 148, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 161, methods[2].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 164, methods[3].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 178, methods[3].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method baz", "baz", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[2].getActualName());
-
- assertEquals(" Invalid actual name for method truc", "truc", methods[3].getActualName());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test14() {
-
- String s =
- "import java.util.Enumeration;\n"
- + "import java.util.Hashtable;\n"
- + "\n"
- + "public class A2 {\n"
- + " void foo() {\n"
- + " System.out.println();\n"
- + " void baz(){}\n"
- + " static { }\n"
- + " }\n"
- + "\n"
- + " void bar(){\n"
- + " }\n"
- + " void truc(){\n"
- + " }\n"
- + "}\n";
-
- String expectedUnitToString =
- "import java.util.Enumeration;\n"
- + "import java.util.Hashtable;\n"
- + "public class A2 {\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
-
- String testName = "test14: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 59,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 180,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("Invalid methods length ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 78, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 144, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 148, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 161, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 164, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 178, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method truc", "truc", methods[2].getActualName());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test15() {
-
- String s =
- "public class X { \n"
- + " class Y { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " public int h; \n"
- + " public int[] i = {0, 1}; \n"
- + " void bar(){ \n"
- + " void baz(){ \n"
- + " } \n";
-
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tclass Y {\n"
- + "\t\tpublic int h;\n"
- + "\t\tpublic int[] i;\n"
- + "\t\tjava.lang.Object(0)\n"
- + "\t\tvoid foo() {}\n"
- + "\t\tvoid bar() {}\n"
- + "\t\tvoid baz() {}\n"
- + "\t}\n"
- + "\tjava.lang.Object(0)\n"
- + "}";
-
- String testName = "test15: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 227,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members != null);
- assertEquals(" invalid members length ", 1, members.length);
-
- fields = members[0].getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals(" invalid fields length ", 2, fields.length);
-
- assertEquals("Invalid declaration source start for field h", 117, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field h", 129, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field i", 140, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field i", 163, fields[1].getDeclarationSourceEnd());
-
- methods = members[0].getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" invalid methods length ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 48, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 103, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 171, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 191, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method baz", 193, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method baz", 215, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method baz", "baz", methods[2].getActualName());
-
- SourceType member = members[0];
- assertEquals(
- "Invalid class declarationSourceStart ",
- 26,
- member.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 227,
- member.getDeclarationSourceEnd());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test16() {
-
- String s =
- "public class X { \n"
- + " class Y { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " public int h; \n"
- + " public int[] i = {0, 1}; \n"
- + " void bar(){ \n"
- + " void baz(){ \n"
- + " } \n";
-
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tclass Y {\n"
- + "\t\tpublic int h;\n"
- + "\t\tpublic int[] i;\n"
- + "\t\tvoid foo() {}\n"
- + "\t\tvoid bar() {}\n"
- + "\t\tvoid baz() {}\n"
- + "\t}\n"
- + "}";
-
- String testName = "test16: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 227,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members != null);
- assertEquals(" invalid members length ", 1, members.length);
-
- fields = members[0].getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals(" invalid fields length ", 2, fields.length);
-
- assertEquals("Invalid declaration source start for field h", 117, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field h", 129, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field i", 140, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field i", 163, fields[1].getDeclarationSourceEnd());
-
- methods = members[0].getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" invalid methods length ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 48, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 103, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 171, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 191, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method baz", 193, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method baz", 215, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method baz", "baz", methods[2].getActualName());
-
- SourceType member = members[0];
- assertEquals(
- "Invalid class declarationSourceStart ",
- 26,
- member.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 227,
- member.getDeclarationSourceEnd());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test17() {
-
- String s =
- "public class X { \n"
- + " class Y { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " } \n"
- + " public int h; \n"
- + " public int[] i = {0, 1}; \n"
- + " void bar(){ \n"
- + " void baz(){ \n"
- + " } \n";
-
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tclass Y {\n"
- + "\t\tjava.lang.Object(0)\n"
- + "\t\tvoid foo() {}\n"
- + "\t}\n"
- + "\tpublic int h;\n"
- + "\tpublic int[] i;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid bar() {}\n"
- + "\tvoid baz() {}\n"
- + "}";
-
- String testName = "test17: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 241,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals(" invalid fields length ", 2, fields.length);
-
- assertEquals("Invalid declaration source start for field h", 131, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field h", 143, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field i", 154, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field i", 177, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" invalid fields length ", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method bar", 185, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 205, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method baz", 207, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method baz", 229, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method baz", "baz", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members != null);
- assertEquals(" invalid members length ", 1, members.length);
-
- fields = members[0].getFields();
- assertTrue(" invalid fields ", fields == null);
-
- methods = members[0].getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" invalid methods length ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 48, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 103, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType member = members[0];
- assertEquals(
- "Invalid class declarationSourceStart ",
- 26,
- member.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 117,
- member.getDeclarationSourceEnd());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test18() {
-
- String s =
- "public class X { \n"
- + " class Y { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " } \n"
- + " public int h; \n"
- + " public int[] i = {0, 1}; \n"
- + " void bar(){ \n"
- + " void baz(){ \n"
- + " } \n";
-
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tclass Y {\n"
- + "\t\tvoid foo() {}\n"
- + "\t}\n"
- + "\tpublic int h;\n"
- + "\tpublic int[] i;\n"
- + "\tvoid bar() {}\n"
- + "\tvoid baz() {}\n"
- + "}";
-
- String testName = "test18: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 241,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals(" invalid fields length ", 2, fields.length);
-
- assertEquals("Invalid declaration source start for field h", 131, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field h", 143, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field i", 154, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field i", 177, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" invalid fields length ", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method bar", 185, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 205, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method baz", 207, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method baz", 229, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method baz", "baz", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members != null);
- assertEquals(" invalid members length ", 1, members.length);
-
- fields = members[0].getFields();
- assertTrue(" invalid fields ", fields == null);
-
- methods = members[0].getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" invalid methods length ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 48, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 103, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType member = members[0];
- assertEquals(
- "Invalid class declarationSourceStart ",
- 26,
- member.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 117,
- member.getDeclarationSourceEnd());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test19() {
-
- String s =
- "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n"
- + " void bar(){ \n"
- + " int x; \n"
- + " void baz(){ \n"
- + " } \n"
- + " int y; \n";
-
-
- String expectedUnitToString =
- "public class X {\n"
- + "\t{}\n"
- + "\tint y;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid baz() {}\n"
- + "}";
-
- String testName = "test19: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 197,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals(" invalid fields length ", 2, fields.length);
-
- assertEquals("Invalid declaration source start for initializer", 90, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for initializer", 90, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field y", 181, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field y", 186, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" invalid fields length ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 26, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 77, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 104, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 143, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method baz", 145, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method baz", 167, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method baz", "baz", methods[2].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test20() {
-
- String s =
- "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n"
- + " void bar(){ \n"
- + " public int x; \n"
- + " void baz(){ \n"
- + " } \n"
- + " int y; \n";
-
-
- String expectedUnitToString =
- "public class X {\n"
- + "\t{}\n"
- + "\tpublic int x;\n"
- + "\tint y;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid baz() {}\n"
- + "}";
-
- String testName = "test20: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 201,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals(" invalid fields length ", 3, fields.length);
-
- assertEquals("Invalid declaration source start for initializer", 90, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for initializer", 90, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field x", 126, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 138, fields[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field y", 185, fields[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field y", 190, fields[2].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" invalid fields length ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 26, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 77, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 104, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 124, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method baz", 149, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method baz", 171, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method baz", "baz", methods[2].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test21() {
-
- String s =
- "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n"
- + " void bar(){ \n"
- + " public int x; \n"
- + " void baz(){ \n"
- + " } \n"
- + " int y; \n";
-
-
- String expectedUnitToString =
- "public class X {\n"
- + "\t{}\n"
- + "\tpublic int x;\n"
- + "\tint y;\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid baz() {}\n"
- + "}";
-
- String testName = "test21: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 201,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals(" invalid fields length ", 3, fields.length);
-
- assertEquals("Invalid declaration source start for initializer", 90, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for initializer", 90, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field x", 126, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 138, fields[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field y", 185, fields[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field y", 190, fields[2].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" invalid fields length ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 26, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 77, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 104, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 124, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method baz", 149, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method baz", 171, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method baz", "baz", methods[2].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test22() {
-
- String s =
- "public class X extends { \n"
- + " void foo() { \n"
- + " } \n"
- + "} \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "}";
-
- String testName = "test22: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 67,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" invalid fields length ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 32, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 54, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test23() {
-
- String s =
- "public class X extends Thread { \n"
- + " void foo() throws \n"
- + " void bar() \n"
- + " } \n"
- + "} \n";
-
- String expectedUnitToString =
- "public class X extends Thread {\n"
- + "\tThread(0)\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "}";
-
- String testName = "test23: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 98,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" invalid fields length ", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 37, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 61, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 63, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 85, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test24() {
-
- String s =
- "public class X implements \n"
- + " void foo() \n"
- + " void bar() \n"
- + " } \n"
- + "} \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "}";
-
- String testName = "test24: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 91,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" invalid fields length ", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 34, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 54, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 56, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 78, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test25() {
-
- String s =
- "public class X implements Y, \n"
- + " void foo() \n"
- + " void bar() \n"
- + " } \n"
- + "} \n";
-
- String expectedUnitToString =
- "public class X implements Y, {\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "}";
-
- String testName = "test25: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 92,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" invalid fields length ", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 35, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 55, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 57, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 79, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test26() {
-
- String s =
- "public class X implements \n"
- + " class Y { \n"
- + " void bar() \n"
- + " } \n"
- + "} \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tclass Y {\n"
- + "\t\tjava.lang.Object(0)\n"
- + "\t\tvoid bar() {}\n"
- + "\t}\n"
- + "\tjava.lang.Object(0)\n"
- + "}";
-
- String testName = "test26: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 102,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members != null);
- assertEquals(" contains one member ", 1, members.length);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 34,
- members[0].getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 90,
- members[0].getDeclarationSourceEnd());
-
- methods = members[0].getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" contains one method ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method bar", 56, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 77, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[0].getActualName());
-
- members = members[0].getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test27() {
-
- String s =
- "public class X \n"
- + " fieldX; \n"
- + " class Y { \n"
- + " void bar() \n"
- + " } \n"
- + "} \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tclass Y {\n"
- + "\t\tjava.lang.Object(0)\n"
- + "\t\tvoid bar() {}\n"
- + "\t}\n"
- + "\tjava.lang.Object(0)\n"
- + "}";
-
- String testName = "test27: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 113,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members != null);
- assertEquals(" contains one member ", 1, members.length);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 45,
- members[0].getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 101,
- members[0].getDeclarationSourceEnd());
-
- methods = members[0].getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" contains one method ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method bar", 67, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 88, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[0].getActualName());
-
- members = members[0].getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test28() {
-
- String s =
- "public class X \n"
- + " fieldX; \n"
- + " class Y \n"
- + " } \n"
- + "} \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tclass Y {\n"
- + "\t\tjava.lang.Object(0)\n"
- + "\t}\n"
- + "\tjava.lang.Object(0)\n"
- + "}";
-
- String testName = "test28: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 78,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members != null);
- assertEquals(" contains one member ", 1, members.length);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 45,
- members[0].getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 65,
- members[0].getDeclarationSourceEnd());
-
- methods = members[0].getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- members = members[0].getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test29() {
-
- String s =
- "package a; \n" +
- "import java.lang.*; \n" +
- "import java.util.*; \n" +
- " \n" +
- "public class X { \n" +
- " void foo() { \n" +
- " System.out.println(); \n" +
- " \n" +
- " class L extends { \n" +
- " public int l; \n" +
- " void baz(){} \n" +
- " } \n" +
- " \n" +
- " public int h; \n" +
- " \n" +
- " void bar(){ \n" +
- " void truc(){ \n" +
- "} \n";
-
- String expectedUnitToString =
- "package a;\n"
- + "import java.lang.*;\n"
- + "import java.util.*;\n"
- + "public class X {\n"
- + "\tpublic int h;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
-
- String testName = "test29: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 88,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 357,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("contains one field ", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field h", 276, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field h", 288, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" contains 3 methods ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 114, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 250, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 312, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 332, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 334, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 355, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method truc", "truc", methods[2].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test30() {
-
- String s =
- "package a; \n" +
- "import java.lang.*; \n" +
- "import java.util.*; \n" +
- " \n" +
- "public class X { \n" +
- " void foo() { \n" +
- " System.out.println(); \n" +
- " \n" +
- " class L extends { \n" +
- " public int l; \n" +
- " void baz(){} \n" +
- " } \n" +
- " \n" +
- " public int h; \n" +
- " \n" +
- " void bar(){ \n" +
- " void truc(){ \n" +
- "} \n";
-
- String expectedUnitToString =
- "package a;\n"
- + "import java.lang.*;\n"
- + "import java.util.*;\n"
- + "public class X {\n"
- + "\tpublic int h;\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
-
- String testName = "test30: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 88,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 357,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("contains one field ", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field h", 276, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field h", 288, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" contains 3 methods ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 114, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 250, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 312, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 332, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 334, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 355, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method truc", "truc", methods[2].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test31() {
-
- String s =
- "package a; \n" +
- "import java.lang.*; \n" +
- "import java.util.*; \n" +
- " \n" +
- "public class X { \n" +
- " void foo() { \n" +
- " System.out.println(); \n" +
- " \n" +
- " new X(){ \n" +
- " void baz() {} \n" +
- " }.baz(); \n" +
- " \n" +
- " public int h; \n" +
- " \n" +
- " void bar(){ \n" +
- " void truc(){ \n" +
- "} \n";
-
- String expectedUnitToString =
- "package a;\n"
- + "import java.lang.*;\n"
- + "import java.util.*;\n"
- + "public class X {\n"
- + "\tpublic int h;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
-
- String testName = "test31: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 89,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 334,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("contains one field ", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field h", 253, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field h", 265, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" contains 3 methods ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 115, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 251, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 289, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 309, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 311, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 332, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method truc", "truc", methods[2].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test32() {
-
- String s =
- "package a; \n" +
- "import java.lang.*; \n" +
- "import java.util.*; \n" +
- " \n" +
- "public class X { \n" +
- " void foo() { \n" +
- " System.out.println(); \n" +
- " \n" +
- " new X(){ \n" +
- " void baz() {} \n" +
- " \n" +
- " public int h; \n" +
- " \n" +
- " void bar(){ \n" +
- " void truc(){ \n" +
- "} \n";
-
-
- String expectedUnitToString =
- "package a;\n"
- + "import java.lang.*;\n"
- + "import java.util.*;\n"
- + "public class X {\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "}";
-
- String testName = "test32: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 89,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 315,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" contains one methods ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 115, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 315, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test33() {
-
- String s =
- "package a; \n" +
- "import java.lang.*; \n" +
- "import java.util.*; \n" +
- " \n" +
- "public class X { \n" +
- " void foo() { \n" +
- " System.out.println(); \n" +
- " \n" +
- " new X(){ \n" +
- " void baz() {} \n" +
- " \n" +
- " public int h; \n" +
- " \n" +
- " void bar(){ \n" +
- " void truc(){ \n" +
- "} \n";
-
-
- String expectedUnitToString =
- "package a;\n"
- + "import java.lang.*;\n"
- + "import java.util.*;\n"
- + "public class X {\n"
- + "\tvoid foo() {}\n"
- + "}";
-
- String testName = "test33: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 89,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 315,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" contains one methods ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 115, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 315, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test34() {
-
- String s =
- "package a; \n" +
- "import java.lang.*; \n" +
- "import java.util.*; \n" +
- " \n" +
- "public class X { \n" +
- " void foo() { \n" +
- " System.out.println(); \n" +
- " \n" +
- " new X(){ \n" +
- " void baz() \n" +
- " } \n" +
- " } \n" +
- " public int h; \n" +
- " \n" +
- " void bar(){ \n" +
- " void truc(){ \n" +
- "} \n";
-
- String expectedUnitToString =
- "package a;\n"
- + "import java.lang.*;\n"
- + "import java.util.*;\n"
- + "public class X {\n"
- + "\tpublic int h;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
-
- String testName = "test34: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 88,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 342,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("contains one field ", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field h", 250, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field h", 262, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" contains 3 methods ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 114, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 236, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 286, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 306, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 308, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 329, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method truc", "truc", methods[2].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test35() {
-
- String s =
- "package a; \n" +
- "import java.lang.*; \n" +
- "import java.util.*; \n" +
- " \n" +
- "public class X { \n" +
- " void foo() { \n" +
- " System.out.println(); \n" +
- " \n" +
- " class L extends { \n" +
- " public int l; \n" +
- " void baz(){} \n" +
- " } \n" +
- " \n" +
- " int h; \n" +
- " \n" +
- " void bar(){ \n" +
- " void truc(){ \n" +
- "} \n";
-
- String expectedUnitToString =
- "package a;\n"
- + "import java.lang.*;\n"
- + "import java.util.*;\n"
- + "public class X {\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
-
- String testName = "test35: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 76,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 309,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" contains 3 methods ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 99, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 260, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 262, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 279, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 281, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 299, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method truc", "truc", methods[2].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test36() {
-
- String s =
- "package a; \n" +
- "import java.lang.*; \n" +
- "import java.util.*; \n" +
- " \n" +
- "public class X { \n" +
- " void foo() { \n" +
- " System.out.println(); \n" +
- " \n" +
- " class L extends { \n" +
- " public int l; \n" +
- " void baz(){} \n" +
- " } \n" +
- " \n" +
- " int h; \n" +
- " \n" +
- " void bar(){ \n" +
- " void truc(){ \n" +
- "} \n";
-
- String expectedUnitToString =
- "package a;\n"
- + "import java.lang.*;\n"
- + "import java.util.*;\n"
- + "public class X {\n"
- + "\tvoid foo() {}\n"
- + "\tvoid bar() {}\n"
- + "\tvoid truc() {}\n"
- + "}";
-
- String testName = "test36: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 76,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 309,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" contains 3 methods ", 3, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 99, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 260, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 262, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 279, methods[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method truc", 281, methods[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method truc", 299, methods[2].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- assertEquals(" Invalid actual name for method truc", "truc", methods[2].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test37() {
-
- String s =
- "public class X { \n" +
- " int x; \n" +
- " \n" +
- " int foo(){ } \n" +
- " \n" +
- " class Y { \n" +
- " int y; \n" +
- "} \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tclass Y {\n"
- + "\t\tint y;\n"
- + "\t\tjava.lang.Object(0)\n"
- + "\t}\n"
- + "\tint x;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tint foo() {}\n"
- + "}";
-
- String testName = "test37: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 112,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("contains one field ", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field x", 23, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 28, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" contains one methods ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 46, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 57, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members != null);
- assertEquals("contains one member ", 1, members.length);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 73,
- members[0].getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 104,
- members[0].getDeclarationSourceEnd());
-
- fields = members[0].getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("contains one field ", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field y", 92, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field y", 97, fields[0].getDeclarationSourceEnd());
-
- methods = members[0].getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test38() {
-
- String s =
- "public class X { \n" +
- " int x; \n" +
- " \n" +
- " int foo(){ } \n" +
- " \n" +
- " class Y { \n" +
- " int y; \n" +
- "} \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tclass Y {\n"
- + "\t\tint y;\n"
- + "\t}\n"
- + "\tint x;\n"
- + "\tint foo() {}\n"
- + "}";
-
- String testName = "test38: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 112,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("contains one field ", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field x", 23, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 28, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" contains one methods ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 46, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 57, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members != null);
- assertEquals("contains one member ", 1, members.length);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 73,
- members[0].getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 104,
- members[0].getDeclarationSourceEnd());
-
- fields = members[0].getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("contains one field ", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field y", 92, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field y", 97, fields[0].getDeclarationSourceEnd());
-
- methods = members[0].getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test39() {
-
- String s =
- "public class X { \n" +
- " int x; \n" +
- " \n" +
- " int foo(){ } \n" +
- " \n" +
- " class Y \n" +
- "} \n" +
- " int y; \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tclass Y {\n"
- + "\t\tjava.lang.Object(0)\n"
- + "\t}\n"
- + "\tint x;\n"
- + "\tint y;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tint foo() {}\n"
- + "}";
-
- String testName = "test39: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 109,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("contains one field ", 2, fields.length);
-
- assertEquals("Invalid declaration source start for field x", 23, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 28, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field y", 98, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field y", 103, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" contains one methods ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 46, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 57, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members != null);
- assertEquals("contains one member ", 1, members.length);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 73,
- members[0].getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 87,
- members[0].getDeclarationSourceEnd());
-
- fields = members[0].getFields();
- assertTrue(" invalid fields ", fields == null);
-
- methods = members[0].getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test40() {
-
- String s =
- "public class X { \n" +
- " int x; \n" +
- " \n" +
- " int foo(){ } \n" +
- " \n" +
- " class Y \n" +
- "} \n" +
- " int y; \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tclass Y {\n"
- + "\t}\n"
- + "\tint x;\n"
- + "\tint y;\n"
- + "\tint foo() {}\n"
- + "}";
-
- String testName = "test40: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 109,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("contains one field ", 2, fields.length);
-
- assertEquals("Invalid declaration source start for field x", 23, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 28, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field y", 98, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field y", 103, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" contains one methods ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 46, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 57, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members != null);
- assertEquals("contains one member ", 1, members.length);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 73,
- members[0].getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 87,
- members[0].getDeclarationSourceEnd());
-
- fields = members[0].getFields();
- assertTrue(" invalid fields ", fields == null);
-
- methods = members[0].getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test41() {
-
- String s =
- "public class X { \n"+
- " void hell" + "\\" + "u006f()\n"+
- " static void foo() { \n"+
- " X x; \n"+
- " x = new X(23); \n"+
- " System.out.println(); \n"+
- " \n"+
- "} \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tjava.lang.Object(0)\n"
- + "\tvoid hello() {}\n"
- + "\tstatic void foo() {}\n"
- + "}";
-
- String testName = "test41: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 139,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals(" contains one methods ", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method hello", 22, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method hello", 39, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method foo", 41, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 130, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method hello", "hell" + "\\" + "u006f", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test42() {
-
- String s =
- "public class X { \n" +
- " int x \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tint x;\n"
- + "\tjava.lang.Object(0)\n"
- + "}";
-
- String testName = "test42: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 29,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals(" contains one field", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field x", 20, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 24, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test43() {
-
- String s =
- "public class X { \n" +
- " int x \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tint x;\n"
- + "}";
-
- String testName = "test43: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 29,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals(" contains one field", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field x", 20, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 24, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test44() {
-
- String s =
- "public class X { \n" +
- " int x, y \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tint x;\n"
- + "\tint y;\n"
- + "\tjava.lang.Object(0)\n"
- + "}";
-
- String testName = "test44: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 31,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals(" contains one field", 2, fields.length);
-
- assertEquals("Invalid declaration source start for field x", 20, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 25, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field y", 20, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field y", 27, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test45() {
-
- String s =
- "public class X { \n" +
- " int x, y \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tint x;\n"
- + "\tint y;\n"
- + "}";
-
- String testName = "test45: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 31,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals(" contains one field", 2, fields.length);
-
- assertEquals("Invalid declaration source start for field x", 20, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 25, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field y", 20, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field y", 27, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test46() {
-
- String s =
- "public class X { \n" +
- " String s = \" \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tString s;\n"
- + "\tjava.lang.Object(0)\n"
- + "}";
-
- String testName = "test46: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 34,
- currentType.getDeclarationSourceEnd());
-
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals(" contains one field", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field s", 20, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field s", 34, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test47() {
-
- String s =
- "public class X { \n" +
- " String s = \" \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tString s;\n"
- + "}";
-
- String testName = "test47: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 34,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals(" contains one field", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field s", 20, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field s", 34, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test48() {
-
- String s =
- "public class X implements Y, \n" +
- " String s = \" \n";
-
- String expectedUnitToString =
- "public class X implements Y, String, {\n"
- + "\tjava.lang.Object(0)\n"
- + "}";
-
- String testName = "test48: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 50,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test49() {
-
- String s =
- "public class X implements Y, \n" +
- " String s = \" \n";
-
- String expectedUnitToString =
- "public class X implements Y, String, {\n"
- + "}";
-
- String testName = "test49: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 50,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test50() {
-
- String s =
- "public class X implements \n"+
- "int x \n"+
- "} \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tint x;\n"
- + "\tjava.lang.Object(0)\n"
- + "}";
-
- String testName = "test50: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 42,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("has one field ", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field x", 29, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 33, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test51() {
-
- String s =
- "public class X implements \n"+
- "int x \n"+
- "} \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tint x;\n"
- + "}";
-
- String testName = "test51: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 42,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("has one field ", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field x", 29, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 33, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test52() {
-
- String s =
- "public class X public int foo(int bar(static String s";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tstatic String s;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tpublic int foo() {}\n"
- + "\tint bar() {}\n"
- + "}";
-
- String testName = "test52: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 52,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("has one field ", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field s", 38, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field s", 52, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
-
- assertEquals("Invalid declaration source start for method foo", 15, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 29, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 30, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 37, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test53() {
-
- String s =
- "public class X public int foo(int x, int bar public String s;";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tpublic String s;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tpublic int foo(int x, int bar, ) {}\n"
- + "}";
-
- String testName = "test53: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 60,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("has one field ", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field s", 45, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field s", 60, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has one method ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 15, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 44, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test54() {
-
- String s =
- "public class X \n" +
- " public int foo( \n" +
- " int bar( \n" +
- " static String s, int x \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tstatic String s;\n"
- + "\tint x;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tpublic int foo() {}\n"
- + "\tint bar() {}\n"
- + "}";
-
- String testName = "test54: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 78,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("has 2 fields ", 2, fields.length);
-
- assertEquals("Invalid declaration source start for field s", 55, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field s", 70, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field x", 72, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 76, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has 2 methods ", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 20, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 38, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 40, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 52, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test55() {
-
- String s =
- "public class X \n" +
- " public int foo( \n" +
- " int bar( \n" +
- " static String s, int x \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tstatic String s;\n"
- + "\tint x;\n"
- + "\tpublic int foo() {}\n"
- + "\tint bar() {}\n"
- + "}";
-
- String testName = "test55: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 78,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("has 2 fields ", 2, fields.length);
-
- assertEquals("Invalid declaration source start for field s", 55, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field s", 70, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field x", 72, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 76, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has 2 methods ", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 20, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 38, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method bar", 40, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method bar", 52, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method bar", "bar", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test56() {
-
- String s =
- "class X { \n" +
- " String s; \n" +
- " \n" +
- " public void foo( \n" +
- " static int x \n" +
- "} \n";
-
-
- String expectedUnitToString =
- "class X {\n"
- + "\tString s;\n"
- + "\tstatic int x;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tpublic void foo() {}\n"
- + "}";
-
- String testName = "test56: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 75,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("has 2 fields ", 2, fields.length);
-
- assertEquals("Invalid declaration source start for field s", 16, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field s", 24, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field x", 60, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 71, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has 1 method ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 39, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 57, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test57() {
-
- String s =
- "class X { \n" +
- " String s; \n" +
- " \n" +
- " public void foo( \n" +
- " static int x \n" +
- "} \n";
-
-
- String expectedUnitToString =
- "class X {\n"
- + "\tString s;\n"
- + "\tstatic int x;\n"
- + "\tpublic void foo() {}\n"
- + "}";
-
- String testName = "test57: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 75,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("has 2 fields ", 2, fields.length);
-
- assertEquals("Invalid declaration source start for field s", 16, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field s", 24, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field x", 60, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 71, fields[1].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has 1 method ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 39, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 57, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test58() {
-
- String s =
- "public class X { \n"+
- " int foo(){ \n"+
- " String s = \" \n"+
- " } \n"+
- "} \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tjava.lang.Object(0)\n"
- + "\tint foo() {}\n"
- + "}";
-
- String testName = "test58: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 62,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has 1 method ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 21, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 54, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test59() {
-
- String s =
-
- "class X { \n" +
- " int foo(AA a, BB b, IOEx \n" +
- " \n";
-
- String expectedUnitToString =
- "class X {\n"
- + "\tjava.lang.Object(0)\n"
- + "\tint foo(AA a, BB b, ) {}\n"
- + "}";
-
- String testName = "test59: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 60,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has 1 method ", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 20, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 60, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test60() {
-
- String s =
- "public class X { \n"+
- " final static int foo(){ \n"+
- " return \"1; \n"+
- " } \n"+
- " public static void main(String argv[]){ \n"+
- " foo(); \n"+
- " } \n"+
- "} \n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tjava.lang.Object(0)\n"
- + "\tfinal static int foo() {}\n"
- + "\tpublic static void main(String[] argv, ) {}\n"
- + "}";
-
- String testName = "test60: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 161,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has 1 method ", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 25, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 75, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method main", 89, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method main", 148, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method main", "main", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test61() {
-
- String s =
- "public class X { \n"+
- " { \n"+
- " int x;";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\t{}\n"
- + "\tjava.lang.Object(0)\n"
- + "}";
-
- String testName = "test61: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 47,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
-
- assertEquals("Invalid declaration source start for initializer", 25, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for initializer", 47, fields[0].getDeclarationSourceEnd());
-
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test62() {
-
- String s =
- "public class X { \n"+
- " int foo(){ \n"+
- " if(true){ \n"+
- " int x;";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tjava.lang.Object(0)\n"
- + "\tint foo() {}\n"
- + "}";
-
- String testName = "test62: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 78,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has one method", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 27, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 78, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test63() {
-
- String s =
- "public class X { \n"+
- " int foo(){} \n"+
- "} \n"+
- "int x;\n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tint x;\n"
- + "\tjava.lang.Object(0)\n"
- + "\tint foo() {}\n"
- + "}";
-
- String testName = "test63: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 66,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("has one field", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field x", 60, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 65, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has one method", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 27, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 37, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test64() {
-
- String s =
- "public class X { \n"+
- " int foo(){} \n"+
- "} \n"+
- "int x;\n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tint x;\n"
- + "\tint foo() {}\n"
- + "}";
-
- String testName = "test64: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 66,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("has one field", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field x", 60, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field x", 65, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has one method", 1, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 27, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 37, methods[0].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test65() {
-
- String s =
- "public class X { \n"+
- " int foo(){} \n"+
- "} \n"+
- "int x();\n";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\t{}\n"
- + "\tint foo() {}\n"
- + "\tint x() {}\n"
- + "}";
-
- String testName = "test65: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 68,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals(" invalid fields length ", 1, fields.length);
-
- assertEquals("Invalid declaration source start for initializer", 47, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for initializer", 47, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has two methods", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 27, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 37, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method x", 60, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method x", 67, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method x", "x", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test66() {
-
- String s =
- "public interface X { \n"+
- " int foo() {}; \n"+
- "} \n"+
- "int x();\n";
-
- String expectedUnitToString =
- "public interface X {\n"
- + "\t{}\n"
- + "\tint foo() {}\n"
- + "\tint x() {}\n"
- + "}";
-
- String testName = "test66: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 72,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals(" invalid fields length ", 1, fields.length);
-
- assertEquals("Invalid declaration source start for initializer", 51, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for initializer", 51, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has two methods", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 30, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 41, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method x", 64, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method x", 71, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method x", "x", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test67() {
-
- String s =
- "public interface X { \n"+
- " int foo() {}; \n"+
- " int x(); \n"+
- "}";
-
- String expectedUnitToString =
- "public interface X {\n"
- + "\tint foo() {}\n"
- + "\tint x() {}\n"
- + "}";
-
- String testName = "test67: diet parse";
- dietParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 71,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has two methods", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 30, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 41, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method x", 54, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method x", 61, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method x", "x", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test68() {
-
- String s =
- "public interface X { \n"+
- " int foo() {}; \n"+
- " int x(); \n"+
- "}";
-
- String expectedUnitToString =
- "public interface X {\n"
- + "\tint foo() {}\n"
- + "\tint x() {}\n"
- + "}";
-
- String testName = "test68: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 71,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has two methods", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 30, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 41, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method x", 54, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method x", 61, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method x", "x", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test69() {
-
- String s =
- "public interface X { \n"+
- "float y; \n"+
- " int foo() ; \n"+
- " int x(); \n"+
- "}";
-
- String expectedUnitToString =
- "public interface X {\n"
- + "\tfloat y;\n"
- + "\tint foo() {}\n"
- + "\tint x() {}\n"
- + "}";
-
- String testName = "test69: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 87,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("has one field", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field y", 27, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field y", 34, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has two methods", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 48, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 58, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method x", 70, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method x", 77, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method x", "x", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test70() {
-
- String s =
- "public interface X { \n"+
- " int foo(); \n"+
- " int x(); \n"+
- "}";
-
- String expectedUnitToString =
- "public interface X {\n"
- + "\tint foo() {}\n"
- + "\tint x() {}\n"
- + "}";
-
- String testName = "test70: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 69,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields == null);
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has two methods", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 30, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 39, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method x", 52, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method x", 59, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method x", "x", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test71() {
-
- String s =
- "public interface X { \n"+
- " int[] i = ; \n"+
- " int foo() {} \n"+
- " int x(); \n"+
- "}";
-
- String expectedUnitToString =
- "public interface X {\n"
- + "\tint[] i;\n"
- + "\tint foo() {}\n"
- + "\tint x() {}\n"
- + "}";
-
- String testName = "test71: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 93,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue(" invalid fields ", fields != null);
- assertEquals("has one field", 1, fields.length);
-
- assertEquals("Invalid declaration source start for field i", 30, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field i", 49, fields[0].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods != null);
- assertEquals("has two methods", 2, methods.length);
-
- assertEquals("Invalid declaration source start for method foo", 53, methods[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method foo", 64, methods[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for method x", 76, methods[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for method x", 83, methods[1].getDeclarationSourceEnd());
-
- assertEquals(" Invalid actual name for method foo", "foo", methods[0].getActualName());
-
- assertEquals(" Invalid actual name for method x", "x", methods[1].getActualName());
-
- SourceType[] members = currentType.getMemberTypes();
- assertTrue(" invalid members ", members == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test72() {
-
- String s =
- "public class X { \n"+
- " X() { \n" +
- " this(); \n" +
- " } \n" +
- "}";
-
- String expectedUnitToString =
- "public class X {\n"
- + "\tX() {\n"
- + "\t\tX(0)\n"
- + "\t}\n"
- + "}";
-
- String testName = "test72: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test73() {
-
- String s =
- "public class X extends Toto { \n"+
- " X() { \n" +
- " this(); \n" +
- " } \n" +
- " X(int i) { \n" +
- " super(); \n" +
- " } \n" +
- " X() { \n" +
- " this(0); \n" +
- " } \n" +
- "}";
-
- String expectedUnitToString =
- "public class X extends Toto {\n"
- + "\tX() {\n"
- + "\t\tX(0)\n"
- + "\t}\n"
- + "\tX(int i, ) {\n"
- + "\t\tToto(0)\n"
- + "\t}\n"
- + "\tX() {\n"
- + "\t\tX(1)\n"
- + "\t}\n"
- + "}";
-
- String testName = "test73: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test74() {
-
- String s =
- "public class X extends Toto { \n"+
- " class Y extends Throwable { \n" +
- " } \n" +
- " X() { \n" +
- " this(); \n" +
- " } \n" +
- " X(int i) { \n" +
- " super(); \n" +
- " } \n" +
- " X() { \n" +
- " this(0); \n" +
- " } \n" +
- " public Object foo(int i) { \n" +
- " return new Object() {}; \n" +
- " } \n" +
- "}";
-
- String expectedUnitToString =
- "public class X extends Toto {\n"
- + "\tclass Y extends Throwable {\n"
- + "\t\tThrowable(0)\n"
- + "\t}\n"
- + "\tX() {\n"
- + "\t\tX(0)\n"
- + "\t}\n"
- + "\tX(int i, ) {\n"
- + "\t\tToto(0)\n"
- + "\t}\n"
- + "\tX() {\n"
- + "\t\tX(1)\n"
- + "\t}\n"
- + "\tpublic Object foo(int i, ) {}\n"
- + "}";
-
- String testName = "test74: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-/*
- * bugs 16126
- */
-public void test75() {
- String s =
- "public class P#AField {\n" +
- " public void setP#A(String P#A) {\n" +
- " this.P#A = P#A;\n" +
- " }\n" +
- "}";
-
- String expectedUnitToString =
- "public class P {\n" +
- " {}\n" +
- " public void setP;\n" +
- " java.lang.Object(0)\n" +
- " A(String P, ) {}\n" +
- "}";
-
- String testName = "test75: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-public void test76() {
-
- String s =
- "class X {\n" +
- " public static int j = 0;\n" +
- " /* static */ {\n" +
- " }" +
- " public static int i = 9;\n" +
- "}\n";
-
- String expectedUnitToString =
- "class X {\n" +
- " public static int j;\n" +
- " {}\n" +
- " public static int i;\n" +
- " java.lang.Object(0)\n" +
- "}";
-
- String testName = "test76: full parse";
- fullParse(s,testName);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentType.getDeclarationSourceStart());
-
- assertEquals(
- "Invalid class declarationSourceEnd ",
- 84,
- currentType.getDeclarationSourceEnd());
-
- SourceField[] fields = currentType.getFields();
- assertTrue("invalid fields ", fields != null);
- assertEquals("Invalid fields length ", 3, fields.length);
-
- assertEquals("Invalid declaration source start for field j", 12, fields[0].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for field j", 35, fields[0].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for initializer", 39, fields[1].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end for initializer", 56, fields[1].getDeclarationSourceEnd());
-
- assertEquals("Invalid declaration source start for field i", 59, fields[2].getDeclarationSourceStart());
- assertEquals("Invalid declaration source end field i", 82, fields[2].getDeclarationSourceEnd());
-
- SourceMethod[] methods = currentType.getMethods();
- assertTrue(" invalid methods ", methods == null);
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-/**
- * Bug 99662:[1.5] JavaModel returns inexistent IType for package-info ICompilationUnits
- * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=99662"
- *
- */
-public void testBug99662() {
-
- String s =
- "@Deprecated\n" +
- "package p;\n";
-
- String testName = "package-info.java";
- fullParse(s,testName);
-
- assertNull("package-info.java file should not have ANY type!", this.currentType);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=167357
-public void _test77() {
-
- String s =
- "public class X {\n" +
- " void foo() {\n" +
- " class Y {\n" +
- " String s = null;\n" +
- " {\n" +
- " class Z {\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}";
-
- String expectedUnitToString =
- "public class X implements Y, String, {\n"
- + "}";
-
- String testName = "test77: diet parse";
- dietParse(s,testName, true);
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=167357
-public void _test78() {
- String s =
- "public class X {\n" +
- " void foo() {\n" +
- " class Y {\n" +
- " String s = null;\n" +
- " {\n" +
- " class Z {\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}";
-
- String expectedUnitToString =
- "public class X implements Y, String, {\n"
- + "}";
-
- String testName = "test78: full parse";
- fullParse(s,testName, true);
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=167357
-public void _test79() {
-
- String s =
- "public class X {\n" +
- " void foo() {\n" +
- " class Y {\n" +
- " {\n" +
- " class Z {\n" +
- " }\n" +
- " }\n" +
- " String s = null;\n" +
- " }\n" +
- " }\n" +
- "}";
-
- String expectedUnitToString =
- "public class X implements Y, String, {\n"
- + "}";
-
- String testName = "test79: diet parse";
- dietParse(s,testName, true);
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=167357
-public void _test80() {
-
- String s =
- "public class X {\n" +
- " void foo() {\n" +
- " class Y {\n" +
- " {\n" +
- " class Z {\n" +
- " }\n" +
- " }\n" +
- " String s = null;\n" +
- " }\n" +
- " }\n" +
- "}";
-
- String expectedUnitToString =
- "public class X implements Y, String, {\n"
- + "}";
-
- String testName = "test80: full parse";
- fullParse(s,testName, true);
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentType.toString());
-}
-
-
-public void testInnerMethod01() {
-
- String s =
- "function ss() {\n"
- + "function ins() {}\n"
- + "}\n"
- + "\n";
-
- String expectedUnitToString =
- "\tfunction ss() {\n"
- + "\t\tfunction ins() {}\n"
- + "\t}"
- + "\n";
-
- String testName = "testInnerMethod01";
- fullParse(s,testName,true);
-
- assertEquals(
- "Invalid class declarationSourceStart ",
- 0,
- currentUnit.getDeclarationSourceStart());
-
-// assertEquals(
-// "Invalid class declarationSourceEnd ",
-// 40,
-// currentUnit.getDeclarationSourceEnd());
-
- assertEquals(
- "Invalid source " + testName,
- expectedUnitToString,
- currentUnit.toString());
-}
-
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceField.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceField.java
deleted file mode 100644
index e14ed1e..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceField.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
-import org.eclipse.wst.jsdt.internal.compiler.env.ISourceField;
-
-public class SourceField implements ISourceField {
- protected int modifiers;
- protected char[] typeName;
- protected char[] name;
- protected int declarationStart;
- protected int declarationEnd;
- protected int nameSourceStart;
- protected int nameSourceEnd;
- protected char[] source;
-public SourceField(
- int declarationStart,
- int modifiers,
- char[] typeName,
- char[] name,
- int nameSourceStart,
- int nameSourceEnd,
- char[] source) {
-
- this.declarationStart = declarationStart;
- this.modifiers = modifiers;
- this.typeName = typeName;
- this.name = name;
- this.nameSourceStart = nameSourceStart;
- this.nameSourceEnd = nameSourceEnd;
- this.source = source;
-}
-public String displayModifiers() {
- StringBuffer buffer = new StringBuffer();
-
- if (this.modifiers == 0)
- return null;
- if ((this.modifiers & ClassFileConstants.AccPublic) != 0)
- buffer.append("public ");
- if ((this.modifiers & ClassFileConstants.AccProtected) != 0)
- buffer.append("protected ");
- if ((this.modifiers & ClassFileConstants.AccPrivate) != 0)
- buffer.append("private ");
- if ((this.modifiers & ClassFileConstants.AccFinal) != 0)
- buffer.append("final ");
- if ((this.modifiers & ClassFileConstants.AccStatic) != 0)
- buffer.append("static ");
- if ((this.modifiers & ClassFileConstants.AccAbstract) != 0)
- buffer.append("abstract ");
- if ((this.modifiers & ClassFileConstants.AccNative) != 0)
- buffer.append("native ");
- return buffer.toString();
-}
-public String getActualName() {
- StringBuffer buffer = new StringBuffer();
- buffer.append(source, nameSourceStart, nameSourceEnd - nameSourceStart + 1);
- return buffer.toString();
-}
-public int getDeclarationSourceEnd() {
- return declarationEnd;
-}
-public int getDeclarationSourceStart() {
- return declarationStart;
-}
-public char[] getInitializationSource() {
- return null;
-}
-public int getModifiers() {
- return modifiers;
-}
-public char[] getName() {
- return name;
-}
-public int getNameSourceEnd() {
- return nameSourceEnd;
-}
-public int getNameSourceStart() {
- return nameSourceStart;
-}
-public char[] getTypeName() {
- return typeName;
-}
-protected void setDeclarationSourceEnd(int position) {
- declarationEnd = position;
-}
-public String tabString(int tab) {
- /*slow code*/
-
- String s = "";
- for (int i = tab; i > 0; i--)
- s = s + "\t";
- return s;
-}
-public String toString() {
- return toString(0);
-}
-public String toString(int tab) {
- StringBuffer buffer = new StringBuffer();
- buffer.append(tabString(tab));
- String displayModifiers = displayModifiers();
- if (displayModifiers != null) {
- buffer.append(displayModifiers);
- }
- buffer.append("var ");
-// if (typeName!=null)
-// {
-// buffer.append(typeName).append(" ");
-// }
- buffer.append(name);
- buffer.append(";");
- return buffer.toString();
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceImport.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceImport.java
deleted file mode 100644
index 220f078..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceImport.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-public class SourceImport {
- int declarationSourceStart;
- int declarationSourceEnd;
- char[] name;
- boolean onDemand;
- char[] source;
-/**
- * @param declarationSourceStart int
- * @param declarationSourceEnd int
- * @param name char[]
- * @param onDemand boolean
- */
-public SourceImport(
- int declarationSourceStart,
- int declarationSourceEnd,
- char[] name,
- boolean onDemand,
- char[] source) {
-
- this.declarationSourceStart = declarationSourceStart;
- this.declarationSourceEnd = declarationSourceEnd;
- this.name = name;
- this.onDemand = onDemand;
- this.source = source;
-}
-/**
- *
- * @return java.lang.String
- */
-public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer
- .append(
- source,
- declarationSourceStart,
- declarationSourceEnd - declarationSourceStart + 1)
- .append("\n");
- return buffer.toString();
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceInitializer.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceInitializer.java
deleted file mode 100644
index 8fd619e..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceInitializer.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
-
-public class SourceInitializer extends SourceField {
-public SourceInitializer(
- int declarationStart,
- int modifiers) {
- super(declarationStart, modifiers, null, null, -1, -1, null);
-}
-
-public void setDeclarationSourceEnd(int declarationSourceEnd) {
- this.declarationEnd = declarationSourceEnd;
-}
-
-public String toString(int tab) {
- if (modifiers == ClassFileConstants.AccStatic) {
- return tabString(tab) + "static {}";
- }
- return tabString(tab) + "{}";
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceMethod.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceMethod.java
deleted file mode 100644
index a910ebd..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceMethod.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
-import org.eclipse.wst.jsdt.internal.compiler.env.ISourceMethod;
-
-public class SourceMethod implements ISourceMethod {
- private int modifiers;
- private int declarationStart;
- private int declarationEnd;
- private char[] returnTypeName;
- private char[] selector;
- private int nameSourceStart;
- private int nameSourceEnd;
- private char[][] argumentTypeNames;
- private char[][] argumentNames;
- private char[] source;
- private String explicitConstructorCall;
- private int numberOfMemberMethods;
- private SourceMethod[] memberMethods;
- char[][] typeParameterNames;
- char[][][] typeParameterBounds;
- SourceMethod parent;
-
-public SourceMethod(
- int declarationStart,
- int modifiers,
- char[] returnTypeName,
- char[] selector,
- int nameSourceStart,
- int nameSourceEnd,
- char[][] argumentTypeNames,
- char[][] argumentNames,
- char[] source) {
-
- this.declarationStart = declarationStart;
- this.modifiers = modifiers;
- this.returnTypeName = returnTypeName;
- this.selector = selector;
- this.nameSourceStart = nameSourceStart;
- this.nameSourceEnd = nameSourceEnd;
- this.argumentTypeNames = argumentTypeNames;
- this.argumentNames = argumentNames;
- this.source = source;
-}
-public String displayModifiers() {
- StringBuffer buffer = new StringBuffer();
-
- if (this.modifiers == 0)
- return null;
- if ((this.modifiers & ClassFileConstants.AccPublic) != 0)
- buffer.append("public ");
- if ((this.modifiers & ClassFileConstants.AccProtected) != 0)
- buffer.append("protected ");
- if ((this.modifiers & ClassFileConstants.AccPrivate) != 0)
- buffer.append("private ");
- if ((this.modifiers & ClassFileConstants.AccFinal) != 0)
- buffer.append("final ");
- if ((this.modifiers & ClassFileConstants.AccStatic) != 0)
- buffer.append("static ");
- if ((this.modifiers & ClassFileConstants.AccAbstract) != 0)
- buffer.append("abstract ");
- if ((this.modifiers & ClassFileConstants.AccNative) != 0)
- buffer.append("native ");
- if (buffer.toString().trim().equals(""))
- return null;
- return buffer.toString().trim();
-}
-protected void addMemberMethod(SourceMethod sourceMemberMethod) {
- if(memberMethods == null) {
- memberMethods = new SourceMethod[4];
- }
-
- if(numberOfMemberMethods == memberMethods.length) {
- System.arraycopy(memberMethods, 0, memberMethods = new SourceMethod[numberOfMemberMethods * 2], 0, numberOfMemberMethods);
- }
- memberMethods[numberOfMemberMethods++] = sourceMemberMethod;
-}
-
-public SourceMethod[] getMemberMethods() {
- if (memberMethods != null && memberMethods.length != numberOfMemberMethods) {
- System.arraycopy(
- memberMethods,
- 0,
- memberMethods = new SourceMethod[numberOfMemberMethods],
- 0,
- numberOfMemberMethods);
- }
- return memberMethods;
-}
-
-public String getActualName() {
- StringBuffer buffer = new StringBuffer();
- buffer.append(source, nameSourceStart, nameSourceEnd - nameSourceStart + 1);
- return buffer.toString();
-}
-public char[][] getArgumentNames() {
- return argumentNames;
-}
-public char[][] getArgumentTypeNames() {
- return argumentTypeNames;
-}
-public int getDeclarationSourceEnd() {
- return declarationEnd;
-}
-public int getDeclarationSourceStart() {
- return declarationStart;
-}
-public int getModifiers() {
- return modifiers;
-}
-public int getNameSourceEnd() {
- return nameSourceEnd;
-}
-public int getNameSourceStart() {
- return nameSourceStart;
-}
-public char[] getReturnTypeName() {
- return returnTypeName;
-}
-public char[] getSelector() {
- return selector;
-}
-public char[][][] getTypeParameterBounds() {
- return typeParameterBounds;
-}
-public char[][] getTypeParameterNames() {
- return typeParameterNames;
-}
-public boolean isConstructor() {
- return returnTypeName == null;
-}
-protected void setDeclarationSourceEnd(int position) {
- declarationEnd = position;
-}
-protected void setExplicitConstructorCall(String s) {
- explicitConstructorCall = s;
-}
-public String tabString(int tab) {
- /*slow code*/
-
- String s = "";
- for (int i = tab; i > 0; i--)
- s = s + "\t";
- return s;
-}
-public String toString() {
- return toString(0);
-}
-public String toString(int tab) {
- StringBuffer buffer = new StringBuffer();
- buffer.append(tabString(tab));
- String displayModifiers = displayModifiers();
- if (displayModifiers != null) {
- buffer.append(displayModifiers).append(" ");
- }
- if (returnTypeName != null) {
- buffer.append(returnTypeName).append(" ");
- }
- buffer.append("function ").append(selector).append("(");
- if (argumentTypeNames != null) {
- for (int i = 0, max = argumentTypeNames.length; i < max; i++) {
- buffer.append(argumentTypeNames[i]).append(" ").append(
- argumentNames[i]).append(
- ", ");
- }
- }
- buffer.append(") ");
- buffer.append("{");
- if (explicitConstructorCall != null) {
- buffer.append("\n").append(tabString(tab+1)).append(explicitConstructorCall).append(tabString(tab)).append("}");
- }
- if (this.numberOfMemberMethods>0)
- {
- for (int i = 0; i < numberOfMemberMethods; i++) {
- buffer.append("\n").append(memberMethods[i].toString(tab+1));
- }
- buffer.append("\n").append(tabString(tab));
- }
- buffer.append("}");
- return buffer.toString();
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourcePackage.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourcePackage.java
deleted file mode 100644
index bedfb7b..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourcePackage.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-public class SourcePackage {
- int declarationSourceStart;
- int declarationSourceEnd;
- char[] name;
- char[] source;
-/**
- * @param declarationSourceStart int
- * @param declarationSourceEnd int
- * @param name char[]
- * @param source char[]
- */
-public SourcePackage(
- int declarationSourceStart,
- int declarationSourceEnd,
- char[] name,
- char[] source) {
-
- this.declarationSourceStart = declarationSourceStart;
- this.declarationSourceEnd = declarationSourceEnd;
- this.name = name;
- this.source = source;
-}
-/**
- *
- * @return java.lang.String
- */
-public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer
- .append(
- source,
- declarationSourceStart,
- declarationSourceEnd - declarationSourceStart + 1)
- .append("\n");
- return buffer.toString();
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceType.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceType.java
deleted file mode 100644
index 25464c9..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceType.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
-
-public final class SourceType {
- private int modifiers;
- private int declarationStart;
- private int declarationEnd;
- private char[] fileName;
- private SourcePackage packageName;
- private SourceImport[] imports;
- private char[] enclosingTypeName;
- private char[] name;
- private int nameSourceStart;
- private int nameSourceEnd;
- private char[] superclassName;
- private SourceType[] memberTypes;
- private int numberOfMemberTypes;
- private SourceMethod[] methods;
- private int numberOfMethods;
- private SourceField[] fields;
- private int numberOfFields;
- private char[] source;
- SourceType parent;
-
- // Buffering.
- private char[] qualifiedName;
- private String defaultConstructor;
-public SourceType(
- char[] enclosingTypeName,
- int declarationStart,
- int modifiers,
- char[] name,
- int nameSourceStart,
- int nameSourceEnd,
- char[] superclassName,
- char[] source) {
-
- this.enclosingTypeName = enclosingTypeName;
- this.declarationStart = declarationStart;
-
- this.modifiers = modifiers;
- this.name = name;
- this.nameSourceStart = nameSourceStart;
- this.nameSourceEnd = nameSourceEnd;
- this.superclassName = superclassName;
- this.source = source;
-}
-protected void addField(SourceField sourceField) {
- if (fields == null) {
- fields = new SourceField[4];
- }
-
- if (numberOfFields == fields.length) {
- System.arraycopy(
- fields,
- 0,
- fields = new SourceField[numberOfFields * 2],
- 0,
- numberOfFields);
- }
- fields[numberOfFields++] = sourceField;
-}
-protected void addMemberType(SourceType sourceMemberType) {
- if(memberTypes == null) {
- memberTypes = new SourceType[4];
- }
-
- if(numberOfMemberTypes == memberTypes.length) {
- System.arraycopy(memberTypes, 0, memberTypes = new SourceType[numberOfMemberTypes * 2], 0, numberOfMemberTypes);
- }
- memberTypes[numberOfMemberTypes++] = sourceMemberType;
-}
-protected void addMethod(SourceMethod sourceMethod) {
- if (methods == null) {
- methods = new SourceMethod[4];
- }
-
- if (numberOfMethods == methods.length) {
- System.arraycopy(
- methods,
- 0,
- methods = new SourceMethod[numberOfMethods * 2],
- 0,
- numberOfMethods);
- }
- methods[numberOfMethods++] = sourceMethod;
-}
-public String displayModifiers() {
- StringBuffer buffer = new StringBuffer();
-
- if (this.modifiers == 0)
- return null;
- if ((this.modifiers & ClassFileConstants.AccPublic) != 0)
- buffer.append("public ");
- if ((this.modifiers & ClassFileConstants.AccProtected) != 0)
- buffer.append("protected ");
- if ((this.modifiers & ClassFileConstants.AccPrivate) != 0)
- buffer.append("private ");
- if ((this.modifiers & ClassFileConstants.AccFinal) != 0)
- buffer.append("final ");
- if ((this.modifiers & ClassFileConstants.AccStatic) != 0)
- buffer.append("static ");
- if ((this.modifiers & ClassFileConstants.AccAbstract) != 0)
- buffer.append("abstract ");
- if ((this.modifiers & ClassFileConstants.AccNative) != 0)
- buffer.append("native ");
- return buffer.toString().trim();
-}
-public String getActualName() {
- StringBuffer buffer = new StringBuffer();
- buffer.append(source, nameSourceStart, nameSourceEnd - nameSourceStart + 1);
- return buffer.toString();
-}
-public int getDeclarationSourceEnd() {
- return declarationEnd;
-}
-public int getDeclarationSourceStart() {
- return declarationStart;
-}
-public char[] getEnclosingTypeName() {
- return enclosingTypeName;
-}
-public SourceField[] getFields() {
- if (fields != null && fields.length != numberOfFields) {
- System.arraycopy(fields, 0, fields = new SourceField[numberOfFields], 0, numberOfFields);
- }
- return fields;
-}
-public char[] getFileName() {
- return fileName;
-}
-public char[][] getImports() {
- if (imports == null) return null;
- int importLength = imports.length;
- char[][] importNames = new char[importLength][];
- for (int i = 0, max = importLength; i < max; i++) {
- importNames[i] = imports[i].name;
- }
- return importNames;
-}
-public SourceType[] getMemberTypes() {
- if (memberTypes != null && memberTypes.length != numberOfMemberTypes) {
- System.arraycopy(
- memberTypes,
- 0,
- memberTypes = new SourceType[numberOfMemberTypes],
- 0,
- numberOfMemberTypes);
- }
- return memberTypes;
-}
-public SourceMethod[] getMethods() {
- if (methods != null && methods.length != numberOfMethods) {
- System.arraycopy(methods, 0, methods = new SourceMethod[numberOfMethods], 0, numberOfMethods);
- }
- return methods;
-}
-public int getModifiers() {
- return modifiers;
-}
-public char[] getName() {
- return name;
-}
-public int getNameSourceEnd() {
- return nameSourceEnd;
-}
-public int getNameSourceStart() {
- return nameSourceStart;
-}
-public char[] getPackageName() {
- return packageName.name;
-}
-public char[] getQualifiedName() {
- if (qualifiedName == null) {
- StringBuffer temp = new StringBuffer();
- temp.append(packageName);
- temp.append('.');
- temp.append(name);
- qualifiedName = temp.toString().toCharArray();
- }
- return qualifiedName;
-}
-public char[] getSuperclassName() {
- return superclassName;
-}
-public boolean isBinaryType() {
- return false;
-}
-public boolean isClass() {
- return true;
-}
-public void setDeclarationSourceEnd(int position) {
- declarationEnd = position;
-}
-public void setDefaultConstructor(String s) {
- this.defaultConstructor = s;
-}
-public void setImports(SourceImport[] imports) {
- this.imports = imports;
-}
-public void setPackage(SourcePackage sourcePackage) {
- packageName = sourcePackage;
-}
-public void setSuperclass(char[] superclassName) {
- this.superclassName = superclassName;
-}
-public String tabString(int tab) {
- /*slow code*/
-
- String s = "";
- for (int i = tab; i > 0; i--)
- s = s + "\t";
- return s;
-}
-public String toString() {
- return toString(0);
-}
-public String toString(int tab) {
-
- StringBuffer buffer = new StringBuffer();
- if (packageName != null) {
- buffer.append(tabString(tab)).append(packageName);
- }
- if (imports != null) {
- for (int i = 0, max = imports.length; i < max; i++) {
- buffer.append(tabString(tab)).append(imports[i]);
- }
- }
- buffer.append(tabString(tab));
- String displayModifiers = displayModifiers();
- if (displayModifiers != null) {
- buffer.append(displayModifiers).append(" ");
- }
- buffer.append("class ").append(name).append(" ");
- if (superclassName != null) {
- buffer.append("extends ").append(superclassName).append(" ");
- }
- buffer.append("{\n");
- if (memberTypes != null) {
- for (int i = 0, max = numberOfMemberTypes; i < max; i++) {
- buffer.append(memberTypes[i].toString(tab + 1)).append("\n");
- }
- }
- if (fields != null) {
- for (int i = 0, max = numberOfFields; i < max; i++) {
- buffer.append(fields[i].toString(tab + 1)).append("\n");
- }
- }
- if (defaultConstructor != null) {
- buffer.append(tabString(tab + 1)).append(defaultConstructor);
- }
- if (methods != null) {
- for (int i = 0, max = numberOfMethods; i < max; i++) {
- buffer.append(methods[i].toString(tab + 1)).append("\n");
- }
- }
- buffer.append(tabString(tab)).append("}");
- return buffer.toString();
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceUnit.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceUnit.java
deleted file mode 100644
index 2d3e15c..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceUnit.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
-
-public final class SourceUnit {
- private int modifiers;
- private int declarationStart;
- private int declarationEnd;
- private char[] fileName;
- private SourcePackage packageName;
- private SourceImport[] imports;
- private char[] enclosingTypeName;
- private char[] name;
- private int nameSourceStart;
- private int nameSourceEnd;
- private char[] superclassName;
- private char[][] interfaceNames;
- private SourceType[] memberTypes;
- private int numberOfMemberTypes;
- private SourceMethod[] methods;
- private int numberOfMethods;
- private SourceField[] fields;
- private int numberOfFields;
- private char[] source;
- SourceUnit parent;
-
- // Buffering.
- private char[] qualifiedName;
- private String defaultConstructor;
-public SourceUnit(
- ) {
-
-}
-protected void addField(SourceField sourceField) {
- if (fields == null) {
- fields = new SourceField[4];
- }
-
- if (numberOfFields == fields.length) {
- System.arraycopy(
- fields,
- 0,
- fields = new SourceField[numberOfFields * 2],
- 0,
- numberOfFields);
- }
- fields[numberOfFields++] = sourceField;
-}
-protected void addMemberType(SourceType sourceMemberType) {
- if(memberTypes == null) {
- memberTypes = new SourceType[4];
- }
-
- if(numberOfMemberTypes == memberTypes.length) {
- System.arraycopy(memberTypes, 0, memberTypes = new SourceType[numberOfMemberTypes * 2], 0, numberOfMemberTypes);
- }
- memberTypes[numberOfMemberTypes++] = sourceMemberType;
-}
-protected void addMethod(SourceMethod sourceMethod) {
- if (methods == null) {
- methods = new SourceMethod[4];
- }
-
- if (numberOfMethods == methods.length) {
- System.arraycopy(
- methods,
- 0,
- methods = new SourceMethod[numberOfMethods * 2],
- 0,
- numberOfMethods);
- }
- methods[numberOfMethods++] = sourceMethod;
-}
-public String displayModifiers() {
- StringBuffer buffer = new StringBuffer();
-
- if (this.modifiers == 0)
- return null;
- if ((this.modifiers & ClassFileConstants.AccPublic) != 0)
- buffer.append("public ");
- if ((this.modifiers & ClassFileConstants.AccProtected) != 0)
- buffer.append("protected ");
- if ((this.modifiers & ClassFileConstants.AccPrivate) != 0)
- buffer.append("private ");
- if ((this.modifiers & ClassFileConstants.AccFinal) != 0)
- buffer.append("final ");
- if ((this.modifiers & ClassFileConstants.AccStatic) != 0)
- buffer.append("static ");
- if ((this.modifiers & ClassFileConstants.AccAbstract) != 0)
- buffer.append("abstract ");
- if ((this.modifiers & ClassFileConstants.AccNative) != 0)
- buffer.append("native ");
- return buffer.toString().trim();
-}
-public String getActualName() {
- StringBuffer buffer = new StringBuffer();
- buffer.append(source, nameSourceStart, nameSourceEnd - nameSourceStart + 1);
- return buffer.toString();
-}
-public int getDeclarationSourceEnd() {
- return declarationEnd;
-}
-public int getDeclarationSourceStart() {
- return declarationStart;
-}
-public char[] getEnclosingTypeName() {
- return enclosingTypeName;
-}
-public SourceField[] getFields() {
- if (fields != null && fields.length != numberOfFields) {
- System.arraycopy(fields, 0, fields = new SourceField[numberOfFields], 0, numberOfFields);
- }
- return fields;
-}
-public char[] getFileName() {
- return fileName;
-}
-public char[][] getImports() {
- if (imports == null) return null;
- int importLength = imports.length;
- char[][] importNames = new char[importLength][];
- for (int i = 0, max = importLength; i < max; i++) {
- importNames[i] = imports[i].name;
- }
- return importNames;
-}
-public char[][] getInterfaceNames() {
- return interfaceNames;
-}
-public SourceType[] getMemberTypes() {
- if (memberTypes != null && memberTypes.length != numberOfMemberTypes) {
- System.arraycopy(
- memberTypes,
- 0,
- memberTypes = new SourceType[numberOfMemberTypes],
- 0,
- numberOfMemberTypes);
- }
- return memberTypes;
-}
-public SourceMethod[] getMethods() {
- if (methods != null && methods.length != numberOfMethods) {
- System.arraycopy(methods, 0, methods = new SourceMethod[numberOfMethods], 0, numberOfMethods);
- }
- return methods;
-}
-public int getModifiers() {
- return modifiers;
-}
-public char[] getName() {
- return name;
-}
-public int getNameSourceEnd() {
- return nameSourceEnd;
-}
-public int getNameSourceStart() {
- return nameSourceStart;
-}
-public char[] getPackageName() {
- return packageName.name;
-}
-public char[] getQualifiedName() {
- if (qualifiedName == null) {
- StringBuffer temp = new StringBuffer();
- temp.append(packageName);
- temp.append('.');
- temp.append(name);
- qualifiedName = temp.toString().toCharArray();
- }
- return qualifiedName;
-}
-public char[] getSuperclassName() {
- return superclassName;
-}
-public boolean isBinaryType() {
- return false;
-}
-public boolean isClass() {
- return true;
-}
-public void setDeclarationSourceEnd(int position) {
- declarationEnd = position;
-}
-public void setDefaultConstructor(String s) {
- this.defaultConstructor = s;
-}
-public void setImports(SourceImport[] imports) {
- this.imports = imports;
-}
-public void setPackage(SourcePackage sourcePackage) {
- packageName = sourcePackage;
-}
-public void setSuperclass(char[] superclassName) {
- this.superclassName = superclassName;
-}
-public void setSuperinterfaces(char[][] superinterfacesNames) {
- this.interfaceNames = superinterfacesNames;
-}
-public String tabString(int tab) {
- /*slow code*/
-
- String s = "";
- for (int i = tab; i > 0; i--)
- s = s + "\t";
- return s;
-}
-public String toString() {
- return toString(0);
-}
-public String toString(int tab) {
-
- StringBuffer buffer = new StringBuffer();
-// if (packageName != null) {
-// buffer.append(tabString(tab)).append(packageName);
-// }
-// if (imports != null) {
-// for (int i = 0, max = imports.length; i < max; i++) {
-// buffer.append(tabString(tab)).append(imports[i]);
-// }
-// }
-// buffer.append(tabString(tab));
-// String displayModifiers = displayModifiers();
-// if (displayModifiers != null) {
-// buffer.append(displayModifiers).append(" ");
-// }
-// buffer.append(isInterface() ? "interface " : "class ").append(name).append(" ");
-// if (superclassName != null) {
-// buffer.append("extends ").append(superclassName).append(" ");
-// }
-// if (interfaceNames != null) {
-// buffer.append("implements ");
-// for (int i = 0, max = interfaceNames.length; i < max; i++) {
-// buffer.append(interfaceNames[i]).append(", ");
-// }
-// }
-// buffer.append("{\n");
-// if (memberTypes != null) {
-// for (int i = 0, max = numberOfMemberTypes; i < max; i++) {
-// buffer.append(memberTypes[i].toString(tab + 1)).append("\n");
-// }
-// }
- if (fields != null) {
- for (int i = 0, max = numberOfFields; i < max; i++) {
- buffer.append(fields[i].toString(tab + 1)).append("\n");
- }
- }
-// if (defaultConstructor != null) {
-// buffer.append(tabString(tab + 1)).append(defaultConstructor);
-// }
- if (methods != null) {
- for (int i = 0, max = numberOfMethods; i < max; i++) {
- buffer.append(methods[i].toString(tab + 1)).append("\n");
- }
- }
-// buffer.append(tabString(tab)).append("}");
- return buffer.toString();
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/StatementRecoveryTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/StatementRecoveryTest.java
deleted file mode 100644
index a7480c2..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/StatementRecoveryTest.java
+++ /dev/null
@@ -1,3734 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import java.util.Locale;
-
-import junit.framework.Test;
-
-import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
-import org.eclipse.wst.jsdt.internal.compiler.DefaultErrorHandlingPolicies;
-import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
-import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.wst.jsdt.internal.compiler.parser.Parser;
-import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblemFactory;
-import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
-import org.eclipse.wst.jsdt.core.tests.util.AbstractCompilerTest;
-import org.eclipse.wst.jsdt.core.tests.util.Util;
-
-public class StatementRecoveryTest extends AbstractCompilerTest {
- public static final boolean ONLY_DIET_PLUS_BODY_WITH_STATEMENT_RECOVERY = true;
-
- public static boolean optimizeStringLiterals = false;
- public static long sourceLevel = ClassFileConstants.JDK1_3; //$NON-NLS-1$
-
-static {
-// TESTS_NAMES = new String[] { "test0037"};
-// TESTS_RANGE = new int[] {10, 20};
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(StatementRecoveryTest.class);
-}
-public StatementRecoveryTest(String testName){
- super(testName);
-}
-public void checkParse(
- char[] source,
- String expectedDietUnitToString,
- String expectedDietWithStatementRecoveryUnitToString,
- String expectedDietPlusBodyUnitToString,
- String expectedDietPlusBodyWithStatementRecoveryUnitToString,
- String expectedFullUnitToString,
- String expectedFullWithStatementRecoveryUnitToString,
- String testName) {
-
- /* using regular parser in DIET mode */
- if(!ONLY_DIET_PLUS_BODY_WITH_STATEMENT_RECOVERY){
- Parser parser =
- new Parser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- new CompilerOptions(getCompilerOptions()),
- new DefaultProblemFactory(Locale.getDefault())),
- optimizeStringLiterals);
- parser.setMethodsFullRecovery(false);
- parser.setStatementsRecovery(false);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration computedUnit = parser.dietParse(sourceUnit, compilationResult);
- String computedUnitToString = computedUnit.toString();
- if (!expectedDietUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
- assertEquals(
- "Invalid unit diet structure" + testName,
- expectedDietUnitToString,
- computedUnitToString);
- }
- /* using regular parser in DIET mode and statementRecoveryEnabled */
- if(!ONLY_DIET_PLUS_BODY_WITH_STATEMENT_RECOVERY){
- Parser parser =
- new Parser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- new CompilerOptions(getCompilerOptions()),
- new DefaultProblemFactory(Locale.getDefault())),
- optimizeStringLiterals);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration computedUnit = parser.dietParse(sourceUnit, compilationResult);
- String computedUnitToString = computedUnit.toString();
- if (!expectedDietWithStatementRecoveryUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
- assertEquals(
- "Invalid unit diet structure with statement recovery enabled" + testName,
- expectedDietWithStatementRecoveryUnitToString,
- computedUnitToString);
- }
- /* using regular parser in DIET mode + getMethodBodies */
- if(!ONLY_DIET_PLUS_BODY_WITH_STATEMENT_RECOVERY){
- Parser parser =
- new Parser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- new CompilerOptions(getCompilerOptions()),
- new DefaultProblemFactory(Locale.getDefault())),
- optimizeStringLiterals);
- parser.setMethodsFullRecovery(false);
- parser.setStatementsRecovery(false);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration computedUnit = parser.dietParse(sourceUnit, compilationResult);
- String computedUnitToString = computedUnit.toString();
- if (!expectedDietUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
- assertEquals(
- "Invalid unit diet structure" + testName,
- expectedDietUnitToString,
- computedUnitToString);
- if (computedUnit.types != null) {
- for (int i = computedUnit.types.length; --i >= 0;){
- computedUnit.types[i].parseMethod(parser, computedUnit);
- }
- }
- computedUnitToString = computedUnit.toString();
- if (!expectedDietPlusBodyUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
-
- assertEquals(
- "Invalid unit diet+body structure" + testName,
- expectedDietPlusBodyUnitToString,
- computedUnitToString);
- }
- /* using regular parser in DIET mode + getMethodBodies and statementRecoveryEnabled */
- {
- Parser parser =
- new Parser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- new CompilerOptions(getCompilerOptions()),
- new DefaultProblemFactory(Locale.getDefault())),
- optimizeStringLiterals);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration computedUnit = parser.dietParse(sourceUnit, compilationResult);
- String computedUnitToString = computedUnit.toString();
- if (!expectedDietWithStatementRecoveryUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
- assertEquals(
- "Invalid unit diet structure" + testName,
- expectedDietWithStatementRecoveryUnitToString,
- computedUnitToString);
- if (computedUnit.types != null) {
- for (int i = computedUnit.types.length; --i >= 0;){
- computedUnit.types[i].parseMethod(parser, computedUnit);
- }
- }
- computedUnitToString = computedUnit.toString();
- if (!expectedDietPlusBodyWithStatementRecoveryUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
-
- assertEquals(
- "Invalid unit diet+body structure with statement recovery enabled" + testName,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- computedUnitToString);
- }
- /* using regular parser in FULL mode */
- if(!ONLY_DIET_PLUS_BODY_WITH_STATEMENT_RECOVERY){
- Parser parser =
- new Parser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- new CompilerOptions(getCompilerOptions()),
- new DefaultProblemFactory(Locale.getDefault())),
- optimizeStringLiterals);
- parser.setMethodsFullRecovery(false);
- parser.setStatementsRecovery(false);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration computedUnit = parser.parse(sourceUnit, compilationResult);
- String computedUnitToString = computedUnit.toString();
- if (!expectedFullUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
- assertEquals(
- "Invalid unit full structure" + testName,
- expectedFullUnitToString,
- computedUnitToString);
-
- }
- /* using regular parser in FULL mode and statementRecoveryEnabled */
- if(!ONLY_DIET_PLUS_BODY_WITH_STATEMENT_RECOVERY){
- Parser parser =
- new Parser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- new CompilerOptions(getCompilerOptions()),
- new DefaultProblemFactory(Locale.getDefault())),
- optimizeStringLiterals);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- CompilationUnitDeclaration computedUnit = parser.parse(sourceUnit, compilationResult);
- String computedUnitToString = computedUnit.toString();
- if (!expectedFullWithStatementRecoveryUnitToString.equals(computedUnitToString)){
- System.out.println(Util.displayString(computedUnitToString));
- }
- assertEquals(
- "Invalid unit full structure with statement recovery enabled" + testName,
- expectedFullWithStatementRecoveryUnitToString,
- computedUnitToString);
-
- }
-}
-
-public void test0001() {
-
- String s =
- " function foo() { \n"
- + " System.out.println(); \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- expectedDietPlusBodyUnitToString;
-
- String expectedFullUnitToString =
- expectedDietPlusBodyUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedFullUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0002() {
-
- String s =
- " function foo() { \n"
- + " # \n"
- + " System.out.println(); \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-
-public void test0002a() {
-
- String s =
- " System.out.print1(); \n"
- + " # \n"
- + " System.out.print2(); \n"
- + " \n";
-
- String expectedDietUnitToString =
- "System.out.print1();\n"+
- "System.out.print2();\n"+
- "";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- " System.out.println();\n"+
- "\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "System.out.print1();\n"+
- "System.out.print2();\n"+
- "";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-
-public void test0002b() {
-
- String s =
- " foo = function () { \n"
- + " # \n"
- + " System.out.println(); \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "foo = function () {\n" +
- " System.out.println();\n"+
- "};\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "foo = function () {\n" +
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "foo = function () {\n" +
- " System.out.println();\n"+
- "};\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-
-
-
-
-public void test0002c() {
-
- String s =
- " obj ={ \n"
- +" p1 : 2, \n"
- +" meth: function () { \n"
- + " # \n"
- + " FOO(); \n"
- + "} \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "foo = function () {\n" +
- " System.out.println();\n"+
- "};\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "foo = function () {\n" +
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "foo = function () {\n" +
- " System.out.println();\n"+
- "};\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-
-
-
-public void test0002d() {
-
- String s =
- " a= foo{ \n"
- +" function () { \n"
- + " # \n"
- + " bar(); \n"
- + "} \n"
- + "); \n";
-
- String expectedDietUnitToString =
- "foo = function () {\n" +
- " System.out.println();\n"+
- "};\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "foo = function () {\n" +
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "foo = function () {\n" +
- " System.out.println();\n"+
- "};\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-
-
-
-
-public void test0003() {
-
- String s =
- " function foo() { \n"
- + " System.out.println(); \n"
- + " # \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-
-
-public void test0003b() {
-
- String s =
- " function foo1() { \n"
- + " var i; \n"
- + "} \n"
- + " function foo2() { \n"
- + " # \n"
- + " a=1; \n"
- + "} \n"
- + " function foo3() { \n"
- + " var k; \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-
-
-
-public void test0004() {
-
- String s =
- " function foo() { \n"
- + " # \n"
- + " System.out.println(); \n"
- + " System.out.println(); \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- " System.out.println();\n"+
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0005() {
-
- String s =
- " function foo() { \n"
- + " System.out.println(); \n"
- + " System.out.println(); \n"
- + " # \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- " System.out.println();\n"+
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0006() {
-
- String s =
- "function foo() {\n"
- + " System.out.println(); \n"
- + " System.out.println(); \n"
- + " # \n"
- + " System.out.println(); \n"
- + " System.out.println(); \n"
- +"}\n";
-
- String expectedDietUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- " System.out.println();\n"+
- " System.out.println();\n"+
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- " System.out.println();\n"+
- " System.out.println();\n"+
- " System.out.println();\n"+
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "function foo() {\n" +
- " System.out.println();\n"+
- " System.out.println();\n"+
- " System.out.println();\n"+
- " System.out.println();\n"+
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0007() {
-
- String s =
- "function foo() {\n"
- + " # \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- +"}\n";
-
- String expectedDietUnitToString =
- "function foo() {\n"
- + " System.out.println();\n"
- + " if (true)\n"
- + " {\n"
- + " System.out.println();\n"
- + " }\n"
- + " System.out.println();\n"
- +"}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "function foo() {\n"
- + " System.out.println();\n"
- + " if (true)\n"
- + " {\n"
- + " System.out.println();\n"
- + " }\n"
- + " System.out.println();\n"
- +"}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "function foo() {\n"
- + " System.out.println();\n"
- + " if (true)\n"
- + " {\n"
- + " System.out.println();\n"
- + " }\n"
- + " System.out.println();\n"
- +"}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0008() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " # \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0009() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " # \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0010() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " class Z { \n"
- + " void foo() {} \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietPlusBodyUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietPlusBodyUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0011() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " class Z { \n"
- + " void foo() {} \n"
- + " } \n"
- + " System.out.println(); \n"
- + " # \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0012() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " # \n"
- + " System.out.println(); \n"
- + " class Z { \n"
- + " void foo() {} \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0013() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " class Z { \n"
- + " void foo() {} \n"
- + " } \n"
- + " System.out.println(); \n"
- + " # \n"
- + " System.out.println(); \n"
- + " class Y { \n"
- + " void foo() {} \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " System.out.println();\n" +
- " class Y {\n" +
- " Y() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0014() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " class Z { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " } \n"
- + " System.out.println(); \n"
- + " # \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0015() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " # \n"
- + " System.out.println(); \n"
- + " class Z { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0016() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " class Z { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " } \n"
- + " System.out.println(); \n"
- + " # \n"
- + " System.out.println(); \n"
- + " class Z { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " System.out.println();\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0017() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " class Z { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " # \n"
- + " } \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0018() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " class Z { \n"
- + " void foo() { \n"
- + " # \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0019() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " class Z { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " # \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0020() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " # \n"
- + " System.out.println(); \n"
- + " class Z { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " # \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0021() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " new Object() { \n"
- + " void foo() {} \n"
- + " }; \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " new Object() {\n" +
- " void foo() {\n" +
- " }\n" +
- " };\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " new Object() {\n" +
- " void foo() {\n" +
- " }\n" +
- " };\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietPlusBodyUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietPlusBodyUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0022() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " new Object() { \n"
- + " void foo() {} \n"
- + " }; \n"
- + " System.out.println(); \n"
- + " # \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " new Object() {\n" +
- " () {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- " };\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0023() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " # \n"
- + " System.out.println(); \n"
- + " new Object() { \n"
- + " void bar() {} \n"
- + " }; \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " new Object() {\n" +
- " () {\n" +
- " super();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " };\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0024() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " new Object() { \n"
- + " void bar() {} \n"
- + " }; \n"
- + " System.out.println(); \n"
- + " # \n"
- + " System.out.println(); \n"
- + " new Object() { \n"
- + " void bar() {} \n"
- + " }; \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " new Object() {\n" +
- " () {\n" +
- " super();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " };\n" +
- " System.out.println();\n" +
- " System.out.println();\n" +
- " new Object() {\n" +
- " () {\n" +
- " super();\n" +
- " }\n" +
- " void bar() {\n" +
- " }\n" +
- " };\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0025() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " new Object() { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " }; \n"
- + " System.out.println(); \n"
- + " # \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " new Object() {\n" +
- " () {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " };\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0026() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " # \n"
- + " System.out.println(); \n"
- + " new Object() { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " }; \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " new Object() {\n" +
- " () {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " };\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0027() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " new Object() { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " }; \n"
- + " System.out.println(); \n"
- + " # \n"
- + " System.out.println(); \n"
- + " new Object() { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " }; \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " new Object() {\n" +
- " () {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " };\n" +
- " System.out.println();\n" +
- " System.out.println();\n" +
- " new Object() {\n" +
- " () {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " };\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0028() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " new Object() { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " # \n"
- + " } \n"
- + " }; \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " new Object() {\n" +
- " () {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- " };\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0029() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " new Object() { \n"
- + " void foo() { \n"
- + " # \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + " }; \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " new Object() {\n" +
- " () {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- " };\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0030() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " new Object() { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " # \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + " }; \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " new Object() {\n" +
- " () {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- " };\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0031() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " # \n"
- + " System.out.println(); \n"
- + " new Object() { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " # \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + " }; \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " new Object() {\n" +
- " () {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- " };\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0032() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " # \n"
- + " System.out.println(); \n"
- + " bar(new Object() { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " # \n"
- + " System.out.println(); \n"
- + " if(true) { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + " }); \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " bar(new Object() {\n" +
- " () {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " System.out.println();\n" +
- " if (true)\n" +
- " {\n" +
- " System.out.println();\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- "});\n" +
- " System.out.println();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0033() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " # \n"
- + " class Z { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " } \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " class Z {\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0034() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " # \n"
- + " new Object() { \n"
- + " void foo() { \n"
- + " System.out.println(); \n"
- + " } \n"
- + " }; \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " new Object() {\n" +
- " () {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " System.out.println();\n" +
- " }\n" +
- " };\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0035() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " bar(\\u0029 \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " bar();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0036() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " if(true) { \n"
- + " foo(); \n"
- + " } \n"
- + " for(; \n"
- + " if(true) { \n"
- + " foo(); \n"
- + " } \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " if (true)\n" +
- " {\n" +
- " foo();\n" +
- " }\n" +
- " for (; ; ) \n" +
- " ;\n" +
- " if (true)\n" +
- " {\n" +
- " foo();\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0037() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " if() { \n"
- + " foo(); \n"
- + " } \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " if ($missing$)\n" +
- " {\n" +
- " foo();\n" +
- " }\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0038() {
- String s =
- "package p1; \n"+
- "public class A { \n"+
- " public interface B { \n"+
- " public abstract void aMethod (int A); \n"+
- " public interface C { \n"+
- " public abstract void anotherMethod(int A);\n"+
- " } \n"+
- " } \n"+
- " public class aClass implements B, B.C { \n"+
- " public void aMethod (int A) { \n"+
- " public void anotherMethod(int A) {}; \n"+
- " } \n"+
- " } \n"+
- " public static void main (String argv[]) { \n"+
- " System.out.println(\"SUCCESS\"); \n"+
- " } \n"+
- "}";
-
- String expectedDietUnitToString =
- "package p1;\n" +
- "public class A {\n" +
- " public interface B {\n" +
- " public interface C {\n" +
- " public abstract void anotherMethod(int A);\n" +
- " }\n" +
- " public abstract void aMethod(int A);\n" +
- " }\n" +
- " public class aClass implements B, B.C {\n" +
- " public aClass() {\n" +
- " }\n" +
- " public void aMethod(int A) {\n" +
- " }\n" +
- " }\n" +
- " public A() {\n" +
- " }\n" +
- " public static void main(String[] argv) {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package p1;\n" +
- "public class A {\n" +
- " public interface B {\n" +
- " public interface C {\n" +
- " public abstract void anotherMethod(int A);\n" +
- " }\n" +
- " public abstract void aMethod(int A);\n" +
- " }\n" +
- " public class aClass implements B, B.C {\n" +
- " public aClass() {\n" +
- " super();\n" +
- " }\n" +
- " public void aMethod(int A) {\n" +
- " }\n" +
- " }\n" +
- " public A() {\n" +
- " super();\n" +
- " }\n" +
- " public static void main(String[] argv) {\n" +
- " System.out.println(\"SUCCESS\");\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package p1;\n" +
- "public class A {\n" +
- " public interface B {\n" +
- " public interface C {\n" +
- " public abstract void anotherMethod(int A);\n" +
- " }\n" +
- " public abstract void aMethod(int A);\n" +
- " }\n" +
- " public class aClass implements B, B.C {\n" +
- " public aClass() {\n" +
- " super();\n" +
- " }\n" +
- " public void aMethod(int A) {\n" +
- " public void anotherMethod;\n" +
- " int A;\n" +
- " ;\n" +
- " }\n" +
- " }\n" +
- " public A() {\n" +
- " super();\n" +
- " }\n" +
- " public static void main(String[] argv) {\n" +
- " System.out.println(\"SUCCESS\");\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- "package p1;\n" +
- "public class A {\n" +
- " public interface B {\n" +
- " public interface C {\n" +
- " public abstract void anotherMethod(int A);\n" +
- " }\n" +
- " public abstract void aMethod(int A);\n" +
- " }\n" +
- " public class aClass implements B, B.C {\n" +
- " public aClass() {\n" +
- " }\n" +
- " public void aMethod(int A) {\n" +
- " }\n" +
- " public void anotherMethod(int A) {\n" +
- " }\n" +
- " }\n" +
- " {\n" +
- " }\n" +
- " public A() {\n" +
- " }\n" +
- " public static void main(String[] argv) {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedFullUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0039() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " { \n"
- + " System.out.println(); \n"
- + " foo() \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " {\n" +
- " System.out.println();\n" +
- " foo();\n" +
- " System.out.println();\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0040() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " { \n"
- + " System.out.println(); \n"
- + " class Y { \n"
- + " { \n"
- + " System.out.println(); \n"
- + " foo() \n"
- + " System.out.println(); \n"
- + " } \n"
- + " } \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " {\n" +
- " System.out.println();\n" +
- " class Y {\n" +
- " {\n" +
- " System.out.println();\n" +
- " foo();\n" +
- " System.out.println();\n" +
- " }\n" +
- " Y() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0041() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " { \n"
- + " System.out.println(); \n"
- + " class Y { \n"
- + " { \n"
- + " System.out.println(); \n"
- + " foo() \n"
- + " System.out.println(); \n"
- + " } \n"
- + " } \n"
- + " System.out.println(); \n"
- + " class Z { \n"
- + " { \n"
- + " System.out.println(); \n"
- + " foo() \n"
- + " System.out.println(); \n"
- + " } \n"
- + " } \n"
- + " System.out.println(); \n"
- + " foo() \n"
- + " System.out.println(); \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " {\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " {\n" +
- " System.out.println();\n" +
- " class Y {\n" +
- " {\n" +
- " System.out.println();\n" +
- " foo();\n" +
- " System.out.println();\n" +
- " }\n" +
- " Y() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " class Z {\n" +
- " {\n" +
- " System.out.println();\n" +
- " foo();\n" +
- " System.out.println();\n" +
- " }\n" +
- " Z() {\n" +
- " super();\n" +
- " }\n" +
- " }\n" +
- " System.out.println();\n" +
- " foo();\n" +
- " System.out.println();\n" +
- " }\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-public void test0042() {
-
- String s =
- "package a; \n"
- + "public class X { \n"
- + " void foo() { \n"
- + " for(int i \n"
- + " } \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public class X {\n" +
- " public X() {\n" +
- " super();\n" +
- " }\n" +
- " void foo() {\n" +
- " for (int i;; ; ) \n" +
- " ;\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=80339
-public void test0043() {
-
- String s =
- "package a; \n"
- + "public interface Test { \n"
- + " public void myMethod() \n"
- + "} \n";
-
- String expectedDietUnitToString =
- "package a;\n" +
- "public interface Test {\n" +
- " public void myMethod() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String expectedDietPlusBodyUnitToString =
- "package a;\n" +
- "public interface Test {\n" +
- " public void myMethod() {\n" +
- " }\n" +
- "}\n";
-
- String expectedDietPlusBodyWithStatementRecoveryUnitToString =
- "package a;\n" +
- "public interface Test {\n" +
- " public void myMethod() {\n" +
- " }\n" +
- "}\n";
-
- String expectedFullUnitToString =
- expectedDietUnitToString;
-
- String expectedFullWithStatementRecoveryUnitToString =
- expectedDietUnitToString;
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedDietUnitToString,
- expectedDietWithStatementRecoveryUnitToString,
- expectedDietPlusBodyUnitToString,
- expectedDietPlusBodyWithStatementRecoveryUnitToString,
- expectedFullUnitToString,
- expectedFullWithStatementRecoveryUnitToString,
- testName);
-}
-
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SyntaxErrorTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SyntaxErrorTest.java
deleted file mode 100644
index ab3f37b..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SyntaxErrorTest.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import java.util.Locale;
-
-import org.eclipse.wst.jsdt.core.compiler.CategorizedProblem;
-import org.eclipse.wst.jsdt.core.tests.util.AbstractCompilerTest;
-import org.eclipse.wst.jsdt.core.tests.util.Util;
-import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
-import org.eclipse.wst.jsdt.internal.compiler.DefaultErrorHandlingPolicies;
-import org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFileConstants;
-import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.wst.jsdt.internal.compiler.parser.Parser;
-import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblem;
-import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblemFactory;
-import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
-
-public class SyntaxErrorTest extends AbstractCompilerTest {
- public static boolean optimizeStringLiterals = false;
- public static long sourceLevel = ClassFileConstants.JDK1_3; //$NON-NLS-1$
-
-public SyntaxErrorTest(String testName){
- super(testName);
-}
-public void checkParse(
- char[] source,
- String expectedSyntaxErrorDiagnosis,
- String testName) {
-
- /* using regular parser in DIET mode */
- Parser parser =
- new Parser(
- new ProblemReporter(
- DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- new CompilerOptions(getCompilerOptions()),
- new DefaultProblemFactory(Locale.getDefault())),
- optimizeStringLiterals);
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
- CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
-
- parser.parse(sourceUnit, compilationResult);
-
- StringBuffer buffer = new StringBuffer(100);
- if (compilationResult.hasProblems() || compilationResult.hasTasks()) {
- CategorizedProblem[] problems = compilationResult.getAllProblems();
- int count = problems.length;
- int problemCount = 0;
- char[] unitSource = compilationResult.compilationUnit.getContents();
- for (int i = 0; i < count; i++) {
- if (problems[i] != null) {
- if (problemCount == 0)
- buffer.append("----------\n");
- problemCount++;
- buffer.append(problemCount + (problems[i].isError() ? ". ERROR" : ". WARNING"));
- buffer.append(" in " + new String(problems[i].getOriginatingFileName()).replace('/', '\\'));
- try {
- buffer.append(((DefaultProblem)problems[i]).errorReportSource(unitSource));
- buffer.append("\n");
- buffer.append(problems[i].getMessage());
- buffer.append("\n");
- } catch (Exception e) {
- }
- buffer.append("----------\n");
- }
- }
- }
- String computedSyntaxErrorDiagnosis = buffer.toString();
- //System.out.println(Util.displayString(computedSyntaxErrorDiagnosis));
- assertEquals(
- "Invalid syntax error diagnosis" + testName,
- Util.convertToIndependantLineDelimiter(expectedSyntaxErrorDiagnosis),
- Util.convertToIndependantLineDelimiter(computedSyntaxErrorDiagnosis));
-}
-/*
- * Should diagnose parenthesis mismatch
- */
-//TODO - fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=279009
-public void Xtest01() {
-
- String s =
- "function X() { \n"+
- " function solve(){ \n"+
- " \n"+
- " var results = new X[10]; \n"+
- " for(var i = 0; i < 10; i++){ \n"+
- " var result = results[i]; \n"+
- " var found = false; \n"+
- " for(var j = 0; j < 10; j++){ \n"+
- " if (this == (result.documentName){ \n"+
- " found = true; \n"+
- " break; \n"+
- " } \n"+
- " } \n"+
- " } \n"+
- " return andResult; \n"+
- " } \n"+
- "} \n";
-
- String expectedSyntaxErrorDiagnosis =
- "----------\n" +
- "1. ERROR in <parenthesis mismatch> (at line 9)\n" +
- " if (this == (result.documentName){ \n" +
- " ^\n" +
- "Syntax error, insert \") BlockStatement\" to complete BlockStatements\n" +
- "----------\n";
-
- String testName = "<parenthesis mismatch>";
- checkParse(
- s.toCharArray(),
- expectedSyntaxErrorDiagnosis,
- testName);
-}
-/*
- * Should diagnose brace mismatch
- */
-public void test02() {
-
- String s =
- "function Bar() { \n"+
- " this.a = (fred().x{); \n"+
- "} \n";
-
- String expectedSyntaxErrorDiagnosis =
- "----------\n" +
- "1. ERROR in <brace mismatch> (at line 2)\n" +
- " this.a = (fred().x{); \n" +
- " ^\n" +
- "Syntax error on token \"{\", delete this token\n" +
- "----------\n";
-
- String testName = "<brace mismatch>";
- checkParse(
- s.toCharArray(),
- expectedSyntaxErrorDiagnosis,
- testName);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=133292
-public void test03() {
-
- String s =
- "function X() { \n"+
- " o = { s: \"Success\"; }; \n"+
- "} \n";
-
- String expectedSyntaxErrorDiagnosis =
- "----------\n"+
- "1. ERROR in <test> (at line 2)\n"+
- " o = { s: \"Success\"; }; \n"+
- " ^\n"+
- "Syntax error on token \";\", delete this token\n"+
- "----------\n";
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedSyntaxErrorDiagnosis,
- testName);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=133292
-public void test04() {
-
- String s =
- "function X() { \n"+
- " var o = { s: \"Success\"; }; \n"+
- "} \n";
-
- String expectedSyntaxErrorDiagnosis =
- "----------\n"+
- "1. ERROR in <test> (at line 2)\n"+
- " var o = { s: \"Success\"; }; \n"+
- " ^\n"+
- "Syntax error on token \";\", delete this token\n"+
- "----------\n";
-
- String testName = "<test>";
- checkParse(
- s.toCharArray(),
- expectedSyntaxErrorDiagnosis,
- testName);
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/TestAll.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/TestAll.java
deleted file mode 100644
index 67161d6..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/TestAll.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.jsdt.core.tests.junit.extension.TestCase;
-import org.eclipse.wst.jsdt.core.tests.util.AbstractCompilerTest;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * Run all parser regression tests
- */
-public class TestAll extends junit.framework.TestCase {
-
- public final static List TEST_CLASSES_1_5 = new ArrayList();
- static {
- /* completion tests */
- TEST_CLASSES_1_5.addAll(RunCompletionParserTests.TEST_CLASSES_1_5);
- }
-
-public TestAll(String testName) {
- super(testName);
-}
-
-public static Test suite() {
- ArrayList testClasses = new ArrayList();
-
- /* completion tests */
- testClasses.addAll(RunCompletionParserTests.TEST_CLASSES);
-
- /* selection tests */
- testClasses.add(ExplicitConstructorInvocationSelectionTest.class);
- testClasses.add(SelectionTest.class);
- testClasses.add(SelectionTest2.class);
- testClasses.add(SelectionJavadocTest.class);
-
- /* recovery tests */
- testClasses.add(DietRecoveryTest.class);
- testClasses.add(StatementRecoveryTest.class);
-
- /* source element parser tests */
- testClasses.add(SourceElementParserTest.class);
-
- /* syntax error diagnosis tests */
- testClasses.add(SyntaxErrorTest.class);
- testClasses.add(DualParseSyntaxErrorTest.class);
- testClasses.add(ParserTest.class);
- testClasses.add(ComplianceDiagnoseTest.class);
-
- TestSuite all = new TestSuite(TestAll.class.getName());
- int possibleComplianceLevels = AbstractCompilerTest.getPossibleComplianceLevels();
- if ((possibleComplianceLevels & AbstractCompilerTest.F_1_3) != 0) {
- ArrayList tests_1_3 = (ArrayList)testClasses.clone();
- // Reset forgotten subsets tests
- TestCase.TESTS_PREFIX = null;
- TestCase.TESTS_NAMES = null;
- TestCase.TESTS_NUMBERS= null;
- TestCase.TESTS_RANGE = null;
- TestCase.RUN_ONLY_ID = null;
- all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_3, tests_1_3));
- }
- if ((possibleComplianceLevels & AbstractCompilerTest.F_1_4) != 0) {
- ArrayList tests_1_4 = (ArrayList)testClasses.clone();
- // Reset forgotten subsets tests
- TestCase.TESTS_PREFIX = null;
- TestCase.TESTS_NAMES = null;
- TestCase.TESTS_NUMBERS= null;
- TestCase.TESTS_RANGE = null;
- TestCase.RUN_ONLY_ID = null;
- all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_4, tests_1_4));
- }
- if ((possibleComplianceLevels & AbstractCompilerTest.F_1_5) != 0) {
- ArrayList tests_1_5 = (ArrayList)testClasses.clone();
- tests_1_5.addAll(TEST_CLASSES_1_5);
- // Reset forgotten subsets tests
- TestCase.TESTS_PREFIX = null;
- TestCase.TESTS_NAMES = null;
- TestCase.TESTS_NUMBERS= null;
- TestCase.TESTS_RANGE = null;
- TestCase.RUN_ONLY_ID = null;
- all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_5, tests_1_5));
- }
- if ((possibleComplianceLevels & AbstractCompilerTest.F_1_6) != 0) {
- ArrayList tests_1_6 = (ArrayList)testClasses.clone();
- tests_1_6.addAll(TEST_CLASSES_1_5);
- // Reset forgotten subsets tests
- TestCase.TESTS_PREFIX = null;
- TestCase.TESTS_NAMES = null;
- TestCase.TESTS_NUMBERS= null;
- TestCase.TESTS_RANGE = null;
- TestCase.RUN_ONLY_ID = null;
- all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_6, tests_1_6));
- }
- if ((possibleComplianceLevels & AbstractCompilerTest.F_1_7) != 0) {
- ArrayList tests_1_7 = (ArrayList)testClasses.clone();
- tests_1_7.addAll(TEST_CLASSES_1_5);
- // Reset forgotten subsets tests
- TestCase.TESTS_PREFIX = null;
- TestCase.TESTS_NAMES = null;
- TestCase.TESTS_NUMBERS= null;
- TestCase.TESTS_RANGE = null;
- TestCase.RUN_ONLY_ID = null;
- all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_7, tests_1_7));
- }
-
- return all;
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/TestSourceElementRequestor.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/TestSourceElementRequestor.java
deleted file mode 100644
index 4e06d49..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/TestSourceElementRequestor.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.parser;
-
-import org.eclipse.wst.jsdt.core.compiler.CategorizedProblem;
-import org.eclipse.wst.jsdt.internal.compiler.ISourceElementRequestor;
-
-public class TestSourceElementRequestor implements ISourceElementRequestor {
-/**
- * DummySourceElementRequestor constructor comment.
- */
-public TestSourceElementRequestor() {
- super();
-}
-/**
- * acceptConstructorReference method comment.
- */
-public void acceptConstructorReference(char[] typeName, int argCount, int sourcePosition) {}
-/**
- * acceptFieldReference method comment.
- */
-public void acceptFieldReference(char[] fieldName, int sourcePosition) {}
-/**
- * acceptImport method comment.
- */
-public void acceptImport(int declarationStart, int declarationEnd, char[][] tokens, boolean onDemand) {}
-/**
- * acceptLineSeparatorPositions method comment.
- */
-public void acceptLineSeparatorPositions(int[] positions) {}
-/**
- * acceptMethodReference method comment.
- */
-public void acceptMethodReference(char[] methodName, int argCount, int sourcePosition) {}
-/**
- * acceptPackage method comment.
- */
-public void acceptPackage(int declarationStart, int declarationEnd, char[] name) {}
-/**
- * acceptProblem method comment.
- */
-public void acceptProblem(CategorizedProblem problem) {}
-/**
- * acceptTypeReference method comment.
- */
-public void acceptTypeReference(char[][] typeName, int sourceStart, int sourceEnd) {}
-/**
- * acceptTypeReference method comment.
- */
-public void acceptTypeReference(char[] typeName, int sourcePosition) {}
-/**
- * acceptUnknownReference method comment.
- */
-public void acceptUnknownReference(char[][] name, int sourceStart, int sourceEnd) {}
-/**
- * acceptUnknownReference method comment.
- */
-public void acceptUnknownReference(char[] name, int sourcePosition) {}
-/**
- * enterCompilationUnit method comment.
- */
-public void enterCompilationUnit() {}
-/**
- * enterConstructor method comment.
- */
-public void enterConstructor(MethodInfo methodInfo) {}
-/**
- * enterField method comment.
- */
-public void enterField(FieldInfo fieldInfo) {}
-/**
- * enterMethod method comment.
- */
-public void enterMethod(MethodInfo methodInfo) {}
-/**
- * enterType method comment.
- */
-public void enterType(TypeInfo typeInfo) {}
-/**
- * exitCompilationUnit method comment.
- */
-public void exitCompilationUnit(int declarationEnd) {}
-/**
- * exitConstructor method comment.
- */
-public void exitConstructor(int declarationEnd) {}
-/**
- * exitField method comment.
- */
-public void exitField(int initializationStart, int declarationEnd, int declarationSourceEnd) {}
-/**
- * exitMethod method comment.
- */
-public void exitMethod(int declarationEnd, int defaultValueStart, int defaultValueEnd) {}
-
-/**
- * enterInitializer method comment.
- */
-public void enterInitializer(int sourceStart, int sourceEnd) {
-}
-
-/**
- * exitInitializer method comment.
- */
-public void exitInitializer(int sourceEnd) {
-}
-/**
- * exitType method comment.
- */
-public void exitType(int declarationEnd) {}
-
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ASTImplTests.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ASTImplTests.java
deleted file mode 100644
index d3501c6..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ASTImplTests.java
+++ /dev/null
@@ -1,995 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import junit.framework.Test;
-
-import org.eclipse.wst.jsdt.core.tests.util.Util;
-import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor;
-import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
-import org.eclipse.wst.jsdt.internal.compiler.DefaultErrorHandlingPolicies;
-import org.eclipse.wst.jsdt.internal.compiler.ast.Argument;
-import org.eclipse.wst.jsdt.internal.compiler.ast.BinaryExpression;
-import org.eclipse.wst.jsdt.internal.compiler.ast.CombinedBinaryExpression;
-import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.ast.ExtendedStringLiteral;
-import org.eclipse.wst.jsdt.internal.compiler.ast.JavadocSingleTypeReference;
-import org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.ast.SingleNameReference;
-import org.eclipse.wst.jsdt.internal.compiler.ast.StringLiteral;
-import org.eclipse.wst.jsdt.internal.compiler.ast.StringLiteralConcatenation;
-import org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope;
-import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope;
-import org.eclipse.wst.jsdt.internal.compiler.parser.Parser;
-import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblemFactory;
-import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
-
-/**
- * A tests series especially meant to validate the internals of our AST
- * implementation.
- */
-public class ASTImplTests extends AbstractRegressionTest {
-public ASTImplTests(String name) {
- super(name);
-}
-
- // Static initializer to specify tests subset using TESTS_* static variables
- // All specified tests which does not belong to the class are skipped...
- // Only the highest compliance level is run; add the VM argument
- // -Dcompliance=1.4 (for example) to lower it if needed
- static {
-// TESTS_NAMES = new String[] { "test2050" };
-// TESTS_NUMBERS = new int[] { 3 };
-// TESTS_NUMBERS = new int[] { 2999 };
-// TESTS_RANGE = new int[] { 2050, -1 };
- }
-
-public static Test suite() {
- return buildAllCompliancesTestSuite(testClass());
-}
-
-public static Class testClass() {
- return ASTImplTests.class;
-}
-
-// Helper methods
-static Parser defaultParser = new Parser(
- new ProblemReporter(DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- new CompilerOptions(),
- new DefaultProblemFactory()), false);
-public void runConformTest(String fileName, String fileContents,
- Parser parser, ASTCollector visitor, String expected) {
- CompilationUnit source =
- new CompilationUnit(fileContents.toCharArray(), fileName, null);
- CompilationResult compilationResult =
- new CompilationResult(source, 1, 1, 10);
- CompilationUnitDeclaration unit = parser.parse(source, compilationResult);
- assertEquals(0, compilationResult.problemCount);
- unit.traverse(visitor, unit.scope);
- String result = visitor.result();
- if (! expected.equals(result)) {
- System.out.println(getClass().getName() + '#' + getName());
- System.out.println("Expected:");
- System.out.println(expected);
- System.out.println("But was:");
- System.out.println(result);
- System.out.println("Cut and paste:");
- System.out.println(Util.displayString(result, INDENT, SHIFT));
- }
- assertEquals(expected, result);
-}
-
-// AST implementation - visiting binary expressions
-public void test0001_regular_binary_expression() {
- runConformTest(
- "X.js",
- " function foo() {\n" +
- " var s1 = \"s1\";\n" +
- " var s2 = \"s2\";\n" +
- " var s3 = \"s3\";\n" +
- " var s4 = \"s4\";\n" +
- " println(s1 + \"l1\" + s2 + \"l2\" +\n" +
- " s3 + \"l3\" + s4);\n" +
- " }\n" +
- "\n",
- defaultParser,
- new ASTBinaryExpressionCollector(),
- "[v SL \"s1\"]\n" +
- "[ev SL \"s1\"]\n" +
- "[v SL \"s2\"]\n" +
- "[ev SL \"s2\"]\n" +
- "[v SL \"s3\"]\n" +
- "[ev SL \"s3\"]\n" +
- "[v SL \"s4\"]\n" +
- "[ev SL \"s4\"]\n" +
- "[v BE ((((((s1 + \"l1\") + s...) + s4)]\n" +
- "[v BE (((((s1 + \"l1\") + s2...+ \"l3\")]\n" +
- "[v BE ((((s1 + \"l1\") + s2)...) + s3)]\n" +
- "[v BE (((s1 + \"l1\") + s2) + \"l2\")]\n" +
- "[v BE ((s1 + \"l1\") + s2)]\n" +
- "[v BE (s1 + \"l1\")]\n" +
- "[v SNR s1]\n" +
- "[ev SNR s1]\n" +
- "[v SL \"l1\"]\n" +
- "[ev SL \"l1\"]\n" +
- "[ev BE (s1 + \"l1\")]\n" +
- "[v SNR s2]\n" +
- "[ev SNR s2]\n" +
- "[ev BE ((s1 + \"l1\") + s2)]\n" +
- "[v SL \"l2\"]\n" +
- "[ev SL \"l2\"]\n" +
- "[ev BE (((s1 + \"l1\") + s2) + \"l2\")]\n" +
- "[v SNR s3]\n" +
- "[ev SNR s3]\n" +
- "[ev BE ((((s1 + \"l1\") + s2)...) + s3)]\n" +
- "[v SL \"l3\"]\n" +
- "[ev SL \"l3\"]\n" +
- "[ev BE (((((s1 + \"l1\") + s2...+ \"l3\")]\n" +
- "[v SNR s4]\n" +
- "[ev SNR s4]\n" +
- "[ev BE ((((((s1 + \"l1\") + s...) + s4)]\n");
-}
-
-// AST implementation - visiting binary expressions
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102728
-// Adding combined binary expressions
-public void test0002_combined_binary_expression() {
- CombinedBinaryExpression.defaultArityMaxStartingValue = 3;
- // one CBE each fourth BE
- runConformTest(
- "X.js",
- " function foo() {\n" +
- " var s1 = \"s1\";\n" +
- " var s2 = \"s2\";\n" +
- " var s3 = \"s3\";\n" +
- " var s4 = \"s4\";\n" +
- " println(s1 + \"l1\" + s2 + \"l2\" +\n" +
- " s3 + \"l3\" + s4);\n" +
- " }\n" +
- "\n",
- defaultParser,
- new ASTBinaryExpressionCollector() {
- public void endVisit(BinaryExpression binaryExpression, BlockScope scope) {
- if (binaryExpression instanceof CombinedBinaryExpression &&
- ((CombinedBinaryExpression) binaryExpression).
- referencesTable != null) {
- this.collector.append("[ev CBE " +
- cut(binaryExpression.toString()) + "]\n");
- } else {
- super.endVisit(binaryExpression, scope);
- }
- }
- },
- "[v SL \"s1\"]\n" +
- "[ev SL \"s1\"]\n" +
- "[v SL \"s2\"]\n" +
- "[ev SL \"s2\"]\n" +
- "[v SL \"s3\"]\n" +
- "[ev SL \"s3\"]\n" +
- "[v SL \"s4\"]\n" +
- "[ev SL \"s4\"]\n" +
- "[v BE ((((((s1 + \"l1\") + s...) + s4)]\n" +
- "[v BE (((((s1 + \"l1\") + s2...+ \"l3\")]\n" +
- "[v BE ((((s1 + \"l1\") + s2)...) + s3)]\n" +
- "[v BE (((s1 + \"l1\") + s2) + \"l2\")]\n" +
- "[v BE ((s1 + \"l1\") + s2)]\n" +
- "[v BE (s1 + \"l1\")]\n" +
- "[v SNR s1]\n" +
- "[ev SNR s1]\n" +
- "[v SL \"l1\"]\n" +
- "[ev SL \"l1\"]\n" +
- "[ev BE (s1 + \"l1\")]\n" +
- "[v SNR s2]\n" +
- "[ev SNR s2]\n" +
- "[ev BE ((s1 + \"l1\") + s2)]\n" +
- "[v SL \"l2\"]\n" +
- "[ev SL \"l2\"]\n" +
- "[ev BE (((s1 + \"l1\") + s2) + \"l2\")]\n" +
- "[v SNR s3]\n" +
- "[ev SNR s3]\n" +
- "[ev CBE ((((s1 + \"l1\") + s2)...) + s3)]\n" +
- "[v SL \"l3\"]\n" +
- "[ev SL \"l3\"]\n" +
- "[ev BE (((((s1 + \"l1\") + s2...+ \"l3\")]\n" +
- "[v SNR s4]\n" +
- "[ev SNR s4]\n" +
- "[ev BE ((((((s1 + \"l1\") + s...) + s4)]\n");
- CombinedBinaryExpression.defaultArityMaxStartingValue =
- CombinedBinaryExpression.ARITY_MAX_MIN;
-}
-
-// AST implementation - visiting binary expressions
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102728
-// Adding combined binary expressions
-public void test0003_combined_binary_expression() {
- Parser parser = new Parser(
- new ProblemReporter(DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- new CompilerOptions(),
- new DefaultProblemFactory()), true); // optimize string literals
- CombinedBinaryExpression.defaultArityMaxStartingValue = 2;
- // one CBE each third BE - except the top one, which is degenerate (no
- // references table)
- runConformTest(
- "X.js",
- " function foo() {\n" +
- " var s1 = \"s1\";\n" +
- " var s2 = \"s2\";\n" +
- " var s3 = \"s3\";\n" +
- " var s4 = \"s4\";\n" +
- " println(s1 + \"l1\" + s2 + \"l2\" +\n" +
- " s3 + \"l3\" + s4);\n" +
- " }\n" +
- "\n",
- parser,
- new ASTBinaryExpressionCollector() {
- public void endVisit(BinaryExpression binaryExpression, BlockScope scope) {
- if (binaryExpression instanceof CombinedBinaryExpression &&
- ((CombinedBinaryExpression) binaryExpression).
- referencesTable != null) {
- this.collector.append("[ev CBE " +
- cut(binaryExpression.toString()) + "]\n");
- } else {
- super.endVisit(binaryExpression, scope);
- }
- }
- },
- "[v SL \"s1\"]\n" +
- "[ev SL \"s1\"]\n" +
- "[v SL \"s2\"]\n" +
- "[ev SL \"s2\"]\n" +
- "[v SL \"s3\"]\n" +
- "[ev SL \"s3\"]\n" +
- "[v SL \"s4\"]\n" +
- "[ev SL \"s4\"]\n" +
- "[v BE ((((((s1 + \"l1\") + s...) + s4)]\n" +
- "[v BE (((((s1 + \"l1\") + s2...+ \"l3\")]\n" +
- "[v BE ((((s1 + \"l1\") + s2)...) + s3)]\n" +
- "[v BE (((s1 + \"l1\") + s2) + \"l2\")]\n" +
- "[v BE ((s1 + \"l1\") + s2)]\n" +
- "[v BE (s1 + \"l1\")]\n" +
- "[v SNR s1]\n" +
- "[ev SNR s1]\n" +
- "[v SL \"l1\"]\n" +
- "[ev SL \"l1\"]\n" +
- "[ev BE (s1 + \"l1\")]\n" +
- "[v SNR s2]\n" +
- "[ev SNR s2]\n" +
- "[ev BE ((s1 + \"l1\") + s2)]\n" +
- "[v SL \"l2\"]\n" +
- "[ev SL \"l2\"]\n" +
- "[ev CBE (((s1 + \"l1\") + s2) + \"l2\")]\n" +
- "[v SNR s3]\n" +
- "[ev SNR s3]\n" +
- "[ev BE ((((s1 + \"l1\") + s2)...) + s3)]\n" +
- "[v SL \"l3\"]\n" +
- "[ev SL \"l3\"]\n" +
- "[ev BE (((((s1 + \"l1\") + s2...+ \"l3\")]\n" +
- "[v SNR s4]\n" +
- "[ev SNR s4]\n" +
- "[ev BE ((((((s1 + \"l1\") + s...) + s4)]\n");
- CombinedBinaryExpression.defaultArityMaxStartingValue =
- CombinedBinaryExpression.ARITY_MAX_MIN;
-}
-
-// AST implementation - visiting binary expressions
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102728
-// Adding combined binary expressions - effect of a literal at the start with
-// string literal optimization
-public void test0004_combined_binary_expression() {
- Parser parser = new Parser(
- new ProblemReporter(DefaultErrorHandlingPolicies.proceedWithAllProblems(),
- new CompilerOptions(),
- new DefaultProblemFactory()), true); // optimize string literals
- runConformTest(
- "X.js",
- " function foo() {\n" +
- " var s1 = \"s1\";\n" +
- " println(\"l\" + \"1\" + s1);\n" +
- // "l" + "1" is collapsed into "l1" without affecting binary
- // expressions: only one BE
- " }\n" +
- "\n",
- parser,
- new ASTBinaryExpressionCollector(),
- "[v SL \"s1\"]\n" +
- "[ev SL \"s1\"]\n" +
- "[v BE (ExtendedStringLiter...} + s1)]\n" +
- "[v ESL ExtendedStringLiteral{l1}]\n" +
- "[ev ESL ExtendedStringLiteral{l1}]\n" +
- "[v SNR s1]\n" +
- "[ev SNR s1]\n" +
- "[ev BE (ExtendedStringLiter...} + s1)]\n");
-}
-
-// AST implementation - visiting binary expressions
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102728
-// Adding combined binary expressions - effect of a literal at the start without
-// string literals optimization
-public void test0005_combined_binary_expression() {
- runConformTest(
- "X.js",
- " function foo() {\n" +
- " var s1 = \"s1\";\n" +
- " println(\"l\" + \"1\" + s1);\n" +
- // "l" + "1" is handled by a string literal concatenation without
- // affecting binary expressions: only one BE
- " }\n" +
- "\n",
- defaultParser,
- new ASTBinaryExpressionCollector(),
- "[v SL \"s1\"]\n" +
- "[ev SL \"s1\"]\n" +
- "[v BE (StringLiteralConcat...} + s1)]\n" +
- "[v SLC StringLiteralConcate...\n" +
- "\"1\"+\n" +
- "}]\n" +
- "[v SL \"l\"]\n" +
- "[ev SL \"l\"]\n" +
- "[v SL \"1\"]\n" +
- "[ev SL \"1\"]\n" +
- "[ev SLC StringLiteralConcate...\n" +
- "\"1\"+\n" +
- "}]\n" +
- "[v SNR s1]\n" +
- "[ev SNR s1]\n" +
- "[ev BE (StringLiteralConcat...} + s1)]\n");
-}
-
-// AST implementation - visiting binary expressions
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102728
-// Adding combined binary expressions - cutting the traversal half-way down
-public void test0006_combined_binary_expression() {
- CombinedBinaryExpression.defaultArityMaxStartingValue = 1;
- runConformTest(
- "X.js",
- " function foo() {\n" +
- " var s1 = \"s1\";\n" +
- " var s2 = \"s2\";\n" +
- " var s3 = \"s3\";\n" +
- " var s4 = \"s4\";\n" +
- " println(s1 + \"l1\" + s2 + \"l2\" +\n" +
- " s3 + s1 + s4);\n" +
- " }\n" +
- "\n",
- defaultParser,
- new ASTBinaryExpressionCollector() {
- public boolean visit(BinaryExpression binaryExpression, BlockScope scope) {
- super.visit(binaryExpression, scope);
- if (binaryExpression.right instanceof StringLiteral) {
- return false;
- }
- return true;
- }
- },
- "[v SL \"s1\"]\n" +
- "[ev SL \"s1\"]\n" +
- "[v SL \"s2\"]\n" +
- "[ev SL \"s2\"]\n" +
- "[v SL \"s3\"]\n" +
- "[ev SL \"s3\"]\n" +
- "[v SL \"s4\"]\n" +
- "[ev SL \"s4\"]\n" +
- "[v BE ((((((s1 + \"l1\") + s...) + s4)]\n" +
- "[v BE (((((s1 + \"l1\") + s2...) + s1)]\n" +
- "[v BE ((((s1 + \"l1\") + s2)...) + s3)]\n" +
- "[v BE (((s1 + \"l1\") + s2) + \"l2\")]\n" +
- "[ev BE (((s1 + \"l1\") + s2) + \"l2\")]\n" +
- "[v SNR s3]\n" +
- "[ev SNR s3]\n" +
- "[ev BE ((((s1 + \"l1\") + s2)...) + s3)]\n" +
- "[v SNR s1]\n" +
- "[ev SNR s1]\n" +
- "[ev BE (((((s1 + \"l1\") + s2...) + s1)]\n" +
- "[v SNR s4]\n" +
- "[ev SNR s4]\n" +
- "[ev BE ((((((s1 + \"l1\") + s...) + s4)]\n");
- CombinedBinaryExpression.defaultArityMaxStartingValue =
- CombinedBinaryExpression.ARITY_MAX_MIN;
-}
-
-// AST implementation - visiting binary expressions
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102728
-// Adding combined binary expressions - cutting the traversal right away
-public void test0007_combined_binary_expression() {
- CombinedBinaryExpression.defaultArityMaxStartingValue = 4;
- runConformTest(
- "X.js",
- " function foo() {\n" +
- " var s1 = \"s1\";\n" +
- " var s2 = \"s2\";\n" +
- " var s3 = \"s3\";\n" +
- " var s4 = \"s4\";\n" +
- " println(s1 + \"l1\" + s2 + \"l2\" +\n" +
- " s3 + \"l3\" + s4);\n" +
- " }\n" +
- "\n",
- defaultParser,
- new ASTBinaryExpressionCollector() {
- public boolean visit(BinaryExpression binaryExpression, BlockScope scope) {
- super.visit(binaryExpression, scope);
- return false;
- }
- },
- "[v SL \"s1\"]\n" +
- "[ev SL \"s1\"]\n" +
- "[v SL \"s2\"]\n" +
- "[ev SL \"s2\"]\n" +
- "[v SL \"s3\"]\n" +
- "[ev SL \"s3\"]\n" +
- "[v SL \"s4\"]\n" +
- "[ev SL \"s4\"]\n" +
- "[v BE ((((((s1 + \"l1\") + s...) + s4)]\n" +
- "[ev BE ((((((s1 + \"l1\") + s...) + s4)]\n");
- CombinedBinaryExpression.defaultArityMaxStartingValue =
- CombinedBinaryExpression.ARITY_MAX_MIN;
-}
-
-// AST implementation - visiting binary expressions
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102728
-// Adding combined binary expressions - case of one-deep expression
-public void test0008_combined_binary_expression() {
- runConformTest(
- "X.js",
- " function foo() {\n" +
- " var s1 = \"s1\";\n" +
- " var s2 = \"s2\";\n" +
- " println(s1 + \"l1\" + s2 + \"l2\");\n" +
- " println(s1 + s2);\n" +
- " }\n" +
- "\n",
- defaultParser,
- new ASTBinaryExpressionCollector() {
- public void endVisit(BinaryExpression binaryExpression, BlockScope scope) {
- if (binaryExpression instanceof CombinedBinaryExpression) {
- this.collector.append("[ev CBE " +
- cut(binaryExpression.toString()) + "]\n");
- } else {
- super.endVisit(binaryExpression, scope);
- }
- }
- },
- "[v SL \"s1\"]\n" +
- "[ev SL \"s1\"]\n" +
- "[v SL \"s2\"]\n" +
- "[ev SL \"s2\"]\n" +
- "[v BE (((s1 + \"l1\") + s2) + \"l2\")]\n" +
- "[v BE ((s1 + \"l1\") + s2)]\n" +
- "[v BE (s1 + \"l1\")]\n" +
- "[v SNR s1]\n" +
- "[ev SNR s1]\n" +
- "[v SL \"l1\"]\n" +
- "[ev SL \"l1\"]\n" +
- "[ev BE (s1 + \"l1\")]\n" +
- "[v SNR s2]\n" +
- "[ev SNR s2]\n" +
- "[ev BE ((s1 + \"l1\") + s2)]\n" +
- "[v SL \"l2\"]\n" +
- "[ev SL \"l2\"]\n" +
- "[ev CBE (((s1 + \"l1\") + s2) + \"l2\")]\n" +
- "[v BE (s1 + s2)]\n" +
- "[v SNR s1]\n" +
- "[ev SNR s1]\n" +
- "[v SNR s2]\n" +
- "[ev SNR s2]\n" +
- "[ev BE (s1 + s2)]\n");
-}
-
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102728
-// check if the generated code is OK when leveraging CombinedBinaryExpression
-public void test0009_combined_binary_expression() {
- assertEquals(20, CombinedBinaryExpression.ARITY_MAX_MIN);
- this.runConformTest(
- new String[] {
- "X.js",
- " function main(args) {\n" +
- " var max = 30; \n" +
- " var s = new Array();\n" +
- " for (var i = 0; i < max; i++) {\n" +
- " s[i] = \"a\";\n" +
- " }\n" +
- " foo(s);\n" +
- "}\n" +
- " function foo (s) {\n" +
- " println(\n" +
- " s[0] + s[1] + s[2] + s[3] + s[4] + s[5] + s[6] + \n" +
- " s[7] + s[8] + s[9] + s[10] + s[11] + s[12] + s[13] +\n" +
- " s[14] + s[15] + s[16] + s[17] + s[18] + s[19] + \n" +
- " s[20] + s[21] + s[22] + s[23] + s[24] + s[25] + \n" +
- " s[26] + s[27] + s[28] + s[29]\n" +
- " );\n" +
- "}\n" +
- ""},
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
-}
-
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102728
-// check if the generated code is OK when leveraging CombinedBinaryExpression
-// variant involving constant binary expressions deep in the tree
-public void test0010_combined_binary_expression() {
- assertEquals(20, CombinedBinaryExpression.ARITY_MAX_MIN);
- this.runConformTest(
- new String[] {
- "X.js",
- "public class X {\n" +
- " function main(String args[]) {\n" +
- " final int max = 30; \n" +
- " String s[] = new String[max];\n" +
- " for (int i = 0; i < max; i++) {\n" +
- " s[i] = \"a\";\n" +
- " }\n" +
- " foo(s);\n" +
- "}\n" +
- " function foo (s) {\n" +
- " var c = \"a\";" +
- " println(\n" +
- " c + c + c + c + s[4] + s[5] + s[6] + s[7] + s[8] + \n" +
- " s[9] + s[10] + s[11] + s[12] + s[13] + s[14] + \n" +
- " s[15] + s[16] + s[17] + s[18] + s[19] + s[20] + \n" +
- " s[21] + s[22] + s[23] + s[24] + s[25] + s[26] + \n" +
- " s[27] + s[28] + s[29]\n" +
- " );\n" +
- "}\n" +
- "}"
- },
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
-}
-
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102728
-// check if the generated code is OK when leveraging CombinedBinaryExpression
-// variant involving a constant combined binary expression
-public void test0011_combined_binary_expression() {
- assertEquals(20, CombinedBinaryExpression.ARITY_MAX_MIN);
- this.runConformTest(
- new String[] {
- "X.js",
- " function main(String args[]) {\n" +
- " var max = 30; \n" +
- " var s = new Array();\n" +
- " for (var i = 0; i < max; i++) {\n" +
- " s[i] = \"a\";\n" +
- " }\n" +
- " foo(s);\n" +
- "}\n" +
- " function foo (s) {\n" +
- " var c = \"a\";" +
- " println(\n" +
- " c + c + c + c + c + c + c + c + c + c + \n" +
- " c + c + c + c + c + c + c + c + c + c + \n" +
- " c + c + s[22] + s[23] + s[24] + s[25] + s[26] + \n" +
- " s[27] + s[28] + s[29]\n" +
- " );\n" +
- "}\n" +
- ""
- },
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
-}
-
-// AST implementation - visiting binary expressions
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102728
-// Adding combined binary expressions - checking recursive print
-public void test0012_combined_binary_expression() {
- CombinedBinaryExpression.defaultArityMaxStartingValue = 2;
- runConformTest(
- "X.js",
- " function foo() {\n" +
- " var s1 = \"s1\";\n" +
- " var s2 = \"s2\";\n" +
- " var s3 = \"s3\";\n" +
- " var s4 = \"s4\";\n" +
- " println(s1 + \"l1\" + s2 + \"l2\" +\n" +
- " s3 + s1 + s4);\n" +
- " }\n" +
- "\n",
- defaultParser,
- new ASTCollector() {
- public boolean visit(BinaryExpression binaryExpression,
- BlockScope scope) {
- super.visit(binaryExpression, scope);
- this.collector.append(binaryExpression);
- return true;
- }
- },
- "((((((s1 + \"l1\") + s2) + \"l2\") + s3) + s1) + s4)(((((s1 + \"l1\")" +
- " + s2) + \"l2\") + s3) + s1)((((s1 + \"l1\") + s2) + \"l2\") + s3)" +
- "(((s1 + \"l1\") + s2) + \"l2\")((s1 + \"l1\") + s2)(s1 + \"l1\")");
- CombinedBinaryExpression.defaultArityMaxStartingValue =
- CombinedBinaryExpression.ARITY_MAX_MIN;
-}
-
-//// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102728
-//// check if the generated code is OK when leveraging CombinedBinaryExpression
-//// variant involving a left-deep right expression at the topmost level
-//public void test0013_combined_binary_expression() {
-// assertEquals(20, CombinedBinaryExpression.ARITY_MAX_MIN);
-// this.runConformTest(
-// new String[] {
-// "X.js",
-// " function main(var args[]) {\n" +
-// " final int max = 30; \n" +
-// " var s[] = new String[max];\n" +
-// " for (int i = 0; i < max; i++) {\n" +
-// " s[i] = \"a\";\n" +
-// " }\n" +
-// " foo(s);\n" +
-// "}\n" +
-// " function foo (var s[]) {\n" +
-// " println(\n" +
-// " \"b\" + (s[0] + s[1] + s[2] + s[3] + s[4] + s[5] + s[6] + \n" +
-// " s[7] + s[8] + s[9] + s[10] + s[11] + s[12] + s[13] +\n" +
-// " s[14] + s[15] + s[16] + s[17] + s[18] + s[19] + \n" +
-// " s[20] + s[21] + s[22] + s[23] + s[24] + s[25] + \n" +
-// " s[26] + s[27] + s[28] + s[29])\n" +
-// " );\n" +
-// "}\n" +
-// "}"
-// },
-// "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
-//}
-
-//// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102728
-//// check if the generated code is OK when leveraging CombinedBinaryExpression
-//// variant involving a left-deep right expression at the topmost level, with
-//// a constant high in tree
-//public void test0014_combined_binary_expression() {
-// assertEquals(20, CombinedBinaryExpression.ARITY_MAX_MIN);
-// this.runConformTest(
-// new String[] {
-// "X.js",
-// " class X {\n" +
-// " function main(var args[]) {\n" +
-// " final int max = 30; \n" +
-// " var s[] = new String[max];\n" +
-// " for (int i = 0; i < max; i++) {\n" +
-// " s[i] = \"a\";\n" +
-// " }\n" +
-// " foo(s);\n" +
-// "}\n" +
-// " function foo (var s[]) {\n" +
-// " final var c = \"c\";\n" +
-// " println(\n" +
-// " \"b\" + \n" +
-// " (c + c + c + c + c + c + c + c + c + c + \n" +
-// " c + c + c + c + c + c + c + c + c + c + \n" +
-// " c + c + s[0])\n" +
-// " );\n" +
-// "}\n" +
-// "}"
-// },
-// "bcccccccccccccccccccccca");
-//}
-
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102728
-// check if the generated code is OK when leveraging CombinedBinaryExpression
-// variant involving a left-deep right expression at the topmost level, with
-// a constant low in tree
-//public void test0015_combined_binary_expression() {
-// assertEquals(20, CombinedBinaryExpression.ARITY_MAX_MIN);
-// this.runConformTest(
-// new String[] {
-// "X.js",
-// " class X {\n" +
-// " function main(var args[]) {\n" +
-// " final int max = 30; \n" +
-// " var s[] = new String[max];\n" +
-// " for (int i = 0; i < max; i++) {\n" +
-// " s[i] = \"a\";\n" +
-// " }\n" +
-// " foo(s);\n" +
-// "}\n" +
-// " function foo (var s[]) {\n" +
-// " final var c = \"c\";\n" +
-// " println(\n" +
-// " \"b\" + \n" +
-// " (c + c + c + c + c + c + c + c + c + c + \n" +
-// " c + c + c + c + c + c + c + c + c + c + \n" +
-// " s[0] + s[1] + s[2])\n" +
-// " );\n" +
-// "}\n" +
-// "}"
-// },
-// "bccccccccccccccccccccaaa");
-//}
-
-// AST implementation - binary expressions
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102728
-// Adding combined binary expressions - alternate operands
-public void test0016_combined_binary_expression() {
- CombinedBinaryExpression.defaultArityMaxStartingValue = 2;
- this.runConformTest(
- "X.js",
- "function foo( i1, i2, i3, i4) {\n" +
- " println(i1 - i2 + 0 + i3 + 0 + i4);\n" +
- "}\n" +
- "\n",
- defaultParser,
- new ASTCollector() {
- public boolean visit(BinaryExpression binaryExpression,
- BlockScope scope) {
- super.visit(binaryExpression, scope);
- this.collector.append(binaryExpression);
- return true;
- }
- },
- "(((((i1 - i2) + 0) + i3) + 0) + i4)((((i1 - i2) + 0) + i3) + 0)" +
- "(((i1 - i2) + 0) + i3)((i1 - i2) + 0)(i1 - i2)");
- CombinedBinaryExpression.defaultArityMaxStartingValue =
- CombinedBinaryExpression.ARITY_MAX_MIN;
-}
-
-//
-//
-////https://bugs.eclipse.org/bugs/show_bug.cgi?id=157170
-//public void test0017() {
-// CompilerOptions options = new CompilerOptions();
-// options.complianceLevel = ClassFileConstants.JDK1_5;
-// options.sourceLevel = ClassFileConstants.JDK1_5;
-// options.targetJDK = ClassFileConstants.JDK1_5;
-// this.runConformTest(
-// "X.js",
-// "@interface Annot {\n" +
-// " int value() default 0;\n" +
-// "}\n" +
-// "@Annot\n" +
-// "@Annot(3)\n" +
-// "@Annot(value=4)\n" +
-// " class X {\n" +
-// "}\n",
-// new Parser(
-// new ProblemReporter(DefaultErrorHandlingPolicies.proceedWithAllProblems(),
-// options,
-// new DefaultProblemFactory()), false),
-// new AnnotationCollector(),
-// "marker annotation start visit\n" +
-// "marker annotation end visit\n" +
-// "single member annotation start visit\n" +
-// "3\n" +
-// "single member annotation end visit\n" +
-// "normal annotation start visit\n" +
-// "member value pair start visit\n" +
-// "value, 4\n" +
-// "member value pair end visit\n" +
-// "normal annotation end visit\n");
-//}
-////https://bugs.eclipse.org/bugs/show_bug.cgi?id=157170
-//public void test0018() {
-// CompilerOptions options = new CompilerOptions();
-// options.complianceLevel = ClassFileConstants.JDK1_5;
-// options.sourceLevel = ClassFileConstants.JDK1_5;
-// options.targetJDK = ClassFileConstants.JDK1_5;
-// options.docCommentSupport = true;
-// this.runConformTest(
-// "X.js",
-// "@interface Annot {\n" +
-// " int value() default 0;\n" +
-// "}\n" +
-// "/**\n" +
-// " * @see Annot\n" +
-// " */\n" +
-// "@Annot\n" +
-// "@Annot(3)\n" +
-// "@Annot(value=4)\n" +
-// " class X {\n" +
-// " /**\n" +
-// " * @see Annot\n" +
-// " */\n" +
-// " public function foo() {}\n" +
-// "}\n",
-// new Parser(
-// new ProblemReporter(DefaultErrorHandlingPolicies.proceedWithAllProblems(),
-// options,
-// new DefaultProblemFactory()), false),
-// new AnnotationCollector(),
-// "java doc single type reference start visit\n" +
-// "java doc single type reference end visit\n" +
-// "marker annotation start visit\n" +
-// "marker annotation end visit\n" +
-// "single member annotation start visit\n" +
-// "3\n" +
-// "single member annotation end visit\n" +
-// "normal annotation start visit\n" +
-// "member value pair start visit\n" +
-// "value, 4\n" +
-// "member value pair end visit\n" +
-// "normal annotation end visit\n" +
-// "java doc single type reference start visit\n" +
-// "java doc single type reference end visit\n");
-//}
-////https://bugs.eclipse.org/bugs/show_bug.cgi?id=157170
-//public void test0019() {
-// CompilerOptions options = new CompilerOptions();
-// options.complianceLevel = ClassFileConstants.JDK1_5;
-// options.sourceLevel = ClassFileConstants.JDK1_5;
-// options.targetJDK = ClassFileConstants.JDK1_5;
-// options.docCommentSupport = true;
-// this.runConformTest(
-// "X.js",
-// "@interface Annot {\n" +
-// " int value() default 0;\n" +
-// "}\n" +
-// "/**\n" +
-// " * @see Annot\n" +
-// " */\n" +
-// "@Annot\n" +
-// "@Annot(3)\n" +
-// "@Annot(value=4)\n" +
-// "public class X {\n" +
-// " /**\n" +
-// " * @see Annot\n" +
-// " */\n" +
-// " public function foo(@Annot int i) {\n" +
-// " @Annot int j = 0;" +
-// " }\n" +
-// "}\n",
-// new Parser(
-// new ProblemReporter(DefaultErrorHandlingPolicies.proceedWithAllProblems(),
-// options,
-// new DefaultProblemFactory()), false),
-// new AnnotationCollector(),
-// "java doc single type reference start visit\n" +
-// "java doc single type reference end visit\n" +
-// "marker annotation start visit\n" +
-// "marker annotation end visit\n" +
-// "single member annotation start visit\n" +
-// "3\n" +
-// "single member annotation end visit\n" +
-// "normal annotation start visit\n" +
-// "member value pair start visit\n" +
-// "value, 4\n" +
-// "member value pair end visit\n" +
-// "normal annotation end visit\n" +
-// "java doc single type reference start visit\n" +
-// "java doc single type reference end visit\n" +
-// "start argument\n" +
-// "marker annotation start visit\n" +
-// "marker annotation end visit\n" +
-// "exit argument\n" +
-// "start local declaration\n" +
-// "marker annotation start visit\n" +
-// "marker annotation end visit\n" +
-// "exit local declaration\n");
-//}
-}
-
-// Helper classes: define visitors leveraged by some tests
-class ASTCollector extends ASTVisitor {
- StringBuffer collector = new StringBuffer();
-public String result() {
- return this.collector.toString();
-}
-}
-
-class ASTBinaryExpressionCollector extends ASTCollector {
-static final int LIMIT = 30;
-// help limit the output in length by suppressing the middle
-// part of strings which length exceeds LIMIT
-String cut(String source) {
- int length;
- if ((length = source.length()) > LIMIT) {
- StringBuffer result = new StringBuffer(length);
- result.append(source.substring(0, LIMIT - 10));
- result.append("...");
- result.append(source.substring(length - 7, length));
- return result.toString();
- } else {
- return source;
- }
-}
-public void endVisit(BinaryExpression binaryExpression, BlockScope scope) {
- this.collector.append("[ev BE " + cut(binaryExpression.toString()) + "]\n");
- super.endVisit(binaryExpression, scope);
-}
-
-public void endVisit(ExtendedStringLiteral literal, BlockScope scope) {
- this.collector.append("[ev ESL " + cut(literal.toString()) + "]\n");
- super.endVisit(literal, scope);
-}
-
-public void endVisit(SingleNameReference singleNameReference,
- BlockScope scope) {
- this.collector.append("[ev SNR " + cut(singleNameReference.toString()) +
- "]\n");
- super.endVisit(singleNameReference, scope);
-}
-
-public void endVisit(StringLiteral stringLiteral, BlockScope scope) {
- this.collector.append("[ev SL " + cut(stringLiteral.toString()) + "]\n");
- super.endVisit(stringLiteral, scope);
-}
-
-public void endVisit(StringLiteralConcatenation literal, BlockScope scope) {
- this.collector.append("[ev SLC " + cut(literal.toString()) + "]\n");
- super.endVisit(literal, scope);
-}
-
-public boolean visit(BinaryExpression binaryExpression, BlockScope scope) {
- this.collector.append("[v BE " + cut(binaryExpression.toString()) + "]\n");
- return super.visit(binaryExpression, scope);
-}
-
-public boolean visit(ExtendedStringLiteral literal, BlockScope scope) {
- this.collector.append("[v ESL " + cut(literal.toString()) + "]\n");
- return super.visit(literal, scope);
-}
-
-public boolean visit(SingleNameReference singleNameReference,
- BlockScope scope) {
- this.collector.append("[v SNR " + cut(singleNameReference.toString()) +
- "]\n");
- return super.visit(singleNameReference, scope);
-}
-
-public boolean visit(StringLiteral stringLiteral, BlockScope scope) {
- this.collector.append("[v SL " + cut(stringLiteral.toString()) + "]\n");
- return super.visit(stringLiteral, scope);
-}
-
-public boolean visit(StringLiteralConcatenation literal, BlockScope scope) {
- this.collector.append("[v SLC " + cut(literal.toString()) + "]\n");
- return super.visit(literal, scope);
-}
-}
-class AnnotationCollector extends ASTCollector {
-public void endVisit(JavadocSingleTypeReference typeRef, BlockScope scope) {
- this.collector.append("java doc single type reference end visit\n");
-}
-public void endVisit(JavadocSingleTypeReference typeRef, ClassScope scope) {
- this.collector.append("java doc single type reference end visit\n");
-}
-public boolean visit(JavadocSingleTypeReference typeRef, BlockScope scope) {
- this.collector.append("java doc single type reference start visit\n");
- return true;
-}
-public boolean visit(JavadocSingleTypeReference typeRef, ClassScope scope) {
- this.collector.append("java doc single type reference start visit\n");
- return true;
-}
-/* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.internal.compiler.ASTVisitor#endVisit(org.eclipse.wst.jsdt.internal.compiler.ast.Argument, org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
- */
-public void endVisit(Argument argument, BlockScope scope) {
- this.collector.append("exit argument\n");
-}
-/* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.internal.compiler.ASTVisitor#endVisit(org.eclipse.wst.jsdt.internal.compiler.ast.Argument, org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope)
- */
-public void endVisit(Argument argument, ClassScope scope) {
- this.collector.append("exit argument\n");
-}
-/* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.internal.compiler.ASTVisitor#endVisit(org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration, org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
- */
-public void endVisit(LocalDeclaration localDeclaration, BlockScope scope) {
- this.collector.append("exit local declaration\n");
-}
-/* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.internal.compiler.ASTVisitor#visit(org.eclipse.wst.jsdt.internal.compiler.ast.Argument, org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
- */
-public boolean visit(Argument argument, BlockScope scope) {
- this.collector.append("start argument\n");
- return true;
-}
-/* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.internal.compiler.ASTVisitor#visit(org.eclipse.wst.jsdt.internal.compiler.ast.Argument, org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope)
- */
-public boolean visit(Argument argument, ClassScope scope) {
- this.collector.append("start argument\n");
- return true;
-}
-/* (non-Javadoc)
- * @see org.eclipse.wst.jsdt.internal.compiler.ASTVisitor#visit(org.eclipse.wst.jsdt.internal.compiler.ast.LocalDeclaration, org.eclipse.wst.jsdt.internal.compiler.lookup.BlockScope)
- */
-public boolean visit(LocalDeclaration localDeclaration, BlockScope scope) {
- this.collector.append("start local declaration\n");
- return true;
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AbstractComparableTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AbstractComparableTest.java
deleted file mode 100644
index fc969d6..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AbstractComparableTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import java.util.Map;
-
-import junit.framework.Test;
-
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-
-public class AbstractComparableTest extends AbstractRegressionTest {
- public static Test buildComparableTestSuite(Class evaluationTestClass) {
- Test suite = buildMinimalComplianceTestSuite(evaluationTestClass, F_1_5);
- TESTS_COUNTERS.put(evaluationTestClass.getName(), new Integer(suite
- .countTestCases()));
- return suite;
- }
-
- public AbstractComparableTest(String name) {
- super(name);
- }
-
- /*
- * Toggle compiler in mode -1.5
- */
- protected Map getCompilerOptions() {
- Map options = super.getCompilerOptions();
- options.put(CompilerOptions.OPTION_Compliance,
- CompilerOptions.VERSION_1_5);
- options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
- options.put(CompilerOptions.OPTION_TargetPlatform,
- CompilerOptions.VERSION_1_5);
- options.put(CompilerOptions.OPTION_ReportFinalParameterBound,
- CompilerOptions.WARNING);
- options.put(CompilerOptions.OPTION_ReportUnnecessaryTypeCheck,
- CompilerOptions.WARNING);
- options.put(CompilerOptions.OPTION_ReportRawTypeReference,
- CompilerOptions.WARNING);
- return options;
- }
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AbstractRegressionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AbstractRegressionTest.java
deleted file mode 100644
index 0fc895e..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AbstractRegressionTest.java
+++ /dev/null
@@ -1,1721 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-import java.util.Map;
-
-import junit.framework.AssertionFailedError;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.jsdt.core.compiler.CategorizedProblem;
-import org.eclipse.wst.jsdt.core.infer.DefaultInferrenceProvider;
-import org.eclipse.wst.jsdt.core.infer.IInferEngine;
-import org.eclipse.wst.jsdt.core.infer.InferEngine;
-import org.eclipse.wst.jsdt.core.infer.InferOptions;
-import org.eclipse.wst.jsdt.core.infer.InferrenceProvider;
-import org.eclipse.wst.jsdt.core.search.SearchDocument;
-import org.eclipse.wst.jsdt.core.search.SearchParticipant;
-import org.eclipse.wst.jsdt.core.tests.junit.extension.StopableTestCase;
-import org.eclipse.wst.jsdt.core.tests.util.AbstractCompilerTest;
-import org.eclipse.wst.jsdt.core.tests.util.CompilerTestSetup;
-import org.eclipse.wst.jsdt.core.tests.util.Util;
-import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
-import org.eclipse.wst.jsdt.internal.compiler.Compiler;
-import org.eclipse.wst.jsdt.internal.compiler.DefaultErrorHandlingPolicies;
-import org.eclipse.wst.jsdt.internal.compiler.ICompilerRequestor;
-import org.eclipse.wst.jsdt.internal.compiler.IErrorHandlingPolicy;
-import org.eclipse.wst.jsdt.internal.compiler.IProblemFactory;
-import org.eclipse.wst.jsdt.internal.compiler.SourceJavadocParser;
-import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
-import org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.batch.FileSystem;
-import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
-import org.eclipse.wst.jsdt.internal.compiler.env.INameEnvironment;
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.wst.jsdt.internal.compiler.impl.ReferenceContext;
-import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeConstants;
-import org.eclipse.wst.jsdt.internal.compiler.parser.Parser;
-import org.eclipse.wst.jsdt.internal.compiler.problem.AbortCompilation;
-import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblemFactory;
-import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
-import org.eclipse.wst.jsdt.internal.core.search.JavaSearchParticipant;
-import org.eclipse.wst.jsdt.internal.core.search.indexing.SourceIndexer;
-
-public abstract class AbstractRegressionTest extends AbstractCompilerTest
- implements StopableTestCase {
- // javac comparison related types, fields and methods - see runJavac for
- // details
- class Logger extends Thread {
- StringBuffer buffer;
- InputStream inputStream;
- String type;
-
- Logger(InputStream inputStream, String type) {
- this.inputStream = inputStream;
- this.type = type;
- this.buffer = new StringBuffer();
- }
-
- public void run() {
- try {
- BufferedReader reader = new BufferedReader(
- new InputStreamReader(this.inputStream));
- String line = null;
- while ((line = reader.readLine()) != null) {
- this.buffer./* append(this.type).append("->"). */append(
- line).append("\n");
- }
- reader.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- protected static int[] DIFF_COUNTERS = new int[3];
- protected static final String EVAL_DIRECTORY = Util.getOutputDirectory()
- + File.separator + "eval";
- public static int INDENT = 2;
- protected static final String JAVA_NAME = File.pathSeparatorChar == ':' ? "java"
- : "java.exe";
- protected static final String JAVAC_NAME = File.pathSeparatorChar == ':' ? "javac"
- : "javac.exe";
-
- protected static String JAVAC_OUTPUT_DIR = Util.getOutputDirectory()
- + File.separator + "javac";
- protected static String javacCommandLineHeader;
- protected static PrintWriter javacFullLog;
- // flags errors so that any error in a test case prevents
- // java execution
- private static String javacFullLogFileName;
- protected static String javaCommandLineHeader;
-
- // needed for multiple test calls within a single test method
- protected static boolean javacTestErrorFlag;
-
- protected static String javacTestName;
-
- protected static IPath jdkRootDirPath;
-
- public static final String OUTPUT_DIR = Util.getOutputDirectory()
- + File.separator + "regression";
-
- public final static String PACKAGE_INFO_NAME = new String(
- TypeConstants.PACKAGE_INFO_NAME);
-
- public static boolean SHIFT = false;
-
- protected static final String SOURCE_DIRECTORY = Util.getOutputDirectory()
- + File.separator + "source";
-
- public static final String INFERENCE_ENGINES = "InferenceEnginesOption";
-
- protected String[] classpaths;
-// protected boolean createdVerifier;
- protected INameEnvironment javaClassLib;
-// protected TestVerifier verifier;
-
- public AbstractRegressionTest(String name) {
- super(name);
- }
-
- // protected void checkClassFile(String className, String source, String
- // expectedOutput) throws ClassFormatException, IOException {
- // // this.checkClassFile("", className, source, expectedOutput,
- // ClassFileBytesDisassembler.SYSTEM);
- // }
- // protected void checkClassFile(String className, String source, String
- // expectedOutput, int mode) throws ClassFormatException, IOException {
- // this.checkClassFile("", className, source, expectedOutput, mode);
- // }
- // protected void checkClassFile(String directoryName, String className,
- // String disassembledClassName, String source, String expectedOutput, int
- // mode) throws ClassFormatException, IOException {
- // // compileAndDeploy(source, directoryName, className);
- // // try {
- // // File directory = new File(EVAL_DIRECTORY, directoryName);
- // // if (!directory.exists()) {
- // // assertTrue(".class file not generated properly in " + directory,
- // false);
- // // }
- // // File f = new File(directory, disassembledClassName + ".class");
- // // byte[] classFileBytes =
- // org.eclipse.wst.jsdt.internal.compiler.util.Util.getFileByteContent(f);
- // // ClassFileBytesDisassembler disassembler =
- // ToolFactory.createDefaultClassFileBytesDisassembler();
- // // String result = disassembler.disassemble(classFileBytes, "\n", mode);
- // // int index = result.indexOf(expectedOutput);
- // // if (index == -1 || expectedOutput.length() == 0) {
- // // System.out.println(Util.displayString(result, 3));
- // // }
- // // if (index == -1) {
- // // assertEquals("Wrong contents", expectedOutput, result);
- // // }
- // //
- // // try {
- // // FileInputStream stream = new FileInputStream(f);
- // // ClassFileReader.read(stream, className + ".class", true);
- // // stream.close();
- // // } catch
- // (org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFormatException e)
- // {
- // // e.printStackTrace();
- // // assertTrue("ClassFormatException", false);
- // // } catch (IOException e) {
- // // e.printStackTrace();
- // // assertTrue("IOException", false);
- // // }
- // // } finally {
- // // removeTempClass(className);
- // // }
- // }
- //
- // protected void checkClassFile(String directoryName, String className,
- // String source, String expectedOutput, int mode) throws
- // ClassFormatException, IOException {
- // this.checkClassFile(directoryName, className, className, source,
- // expectedOutput, mode);
- // }
- //
- protected void checkDisassembledClassFile(String fileName,
- String className, String expectedOutput) {
- // this.checkDisassembledClassFile(fileName, className, expectedOutput,
- // ClassFileBytesDisassembler.DETAILED);
- }
-
- protected void checkDisassembledClassFile(String fileName,
- String className, String expectedOutput, int mode) {
- // File classFile = new File(fileName);
- // if (!classFile.exists()) {
- // assertTrue(".class file doesn't exist", false);
- // }
- // String result = null;
- // try {
- // byte[] classFileBytes =
- // org.eclipse.wst.jsdt.internal.compiler.util.Util.getFileByteContent(classFile);
- // ClassFileBytesDisassembler disassembler =
- // ToolFactory.createDefaultClassFileBytesDisassembler();
- // result = disassembler.disassemble(classFileBytes, "\n", mode);
- // } catch (IOException e) {
- // e.printStackTrace();
- // assertTrue("Should not happen : ", false);
- // } catch (ClassFormatException e) {
- // e.printStackTrace();
- // assertTrue("Should not happen : ", false);
- // }
- // int index = result.indexOf(expectedOutput);
- // if (index == -1 || expectedOutput.length() == 0) {
- // System.out.println(Util.displayString(result, 2));
- // }
- // if (index == -1) {
- // assertEquals("Wrong contents", expectedOutput, result);
- // }
- //
- // try {
- // FileInputStream stream = new FileInputStream(classFile);
- // ClassFileReader.read(stream, className + ".class", true);
- // stream.close();
- // } catch
- // (org.eclipse.wst.jsdt.internal.compiler.classfmt.ClassFormatException
- // e) {
- // e.printStackTrace();
- // assertTrue("ClassFormatException", false);
- // } catch (IOException e) {
- // e.printStackTrace();
- // assertTrue("IOException", false);
- // }
- }
-
- /*
- * ###################################### Specific method to let tests Sun
- * javac compilation available... #######################################
- */
- protected void compileAndDeploy(String source, String directoryName,
- String className) {
- File directory = new File(SOURCE_DIRECTORY);
- if (!directory.exists()) {
- if (!directory.mkdirs()) {
- System.out.println("Could not create " + SOURCE_DIRECTORY);
- return;
- }
- }
- if (directoryName != null && directoryName.length() != 0) {
- directory = new File(SOURCE_DIRECTORY, directoryName);
- if (!directory.exists()) {
- if (!directory.mkdirs()) {
- System.out.println("Could not create " + directory);
- return;
- }
- }
- }
- String fileName = directory.getAbsolutePath() + File.separator
- + className + ".java";
- try {
- BufferedWriter writer = new BufferedWriter(new FileWriter(fileName));
- writer.write(source);
- writer.flush();
- writer.close();
- } catch (IOException e) {
- e.printStackTrace();
- return;
- }
- StringBuffer buffer = new StringBuffer().append("\"").append(fileName)
- .append("\" -d \"").append(EVAL_DIRECTORY);
- if (this.complianceLevel.compareTo(COMPLIANCE_1_5) < 0) {
- buffer.append("\" -1.4 -source 1.3 -target 1.2");
- } else {
- buffer.append("\" -1.5");
- }
- buffer.append(" -preserveAllLocals -nowarn -g -classpath \"").append(
- Util.getJavaClassLibsAsString()).append(SOURCE_DIRECTORY)
- .append("\"");
- org.eclipse.wst.jsdt.internal.compiler.batch.Main.compile(buffer
- .toString());
- }
-
- protected void dualPrintln(String message) {
- System.out.println(message);
- javacFullLog.println(message);
- }
-
- protected void executeClass(String sourceFile,
- String expectedSuccessOutputString, String[] classLib,
- boolean shouldFlushOutputDirectory, String[] vmArguments,
- Map customOptions, ICompilerRequestor clientRequestor) {
-
- // Compute class name by removing ".java" and replacing slashes with
- // dots
- String className = sourceFile.substring(0, sourceFile.length() - 5)
- .replace('/', '.').replace('\\', '.');
- if (className.endsWith(PACKAGE_INFO_NAME))
- return;
-
-// if (vmArguments != null) {
-// if (this.verifier != null) {
-// this.verifier.shutDown();
-// }
-// this.verifier = new TestVerifier(false);
-// this.createdVerifier = true;
-// }
-// boolean passed = this.verifier
-// .verifyClassFiles(sourceFile, className,
-// expectedSuccessOutputString, this.classpaths, null,
-// vmArguments);
-// assertTrue(this.verifier.failureReason, // computed by
-// // verifyClassFiles(...) action
-// passed);
-// if (vmArguments != null) {
-// if (this.verifier != null) {
-// this.verifier.shutDown();
-// }
-// this.verifier = new TestVerifier(false);
-// this.createdVerifier = true;
-// }
- }
-
- /*
- * Returns the references in the given .class file.
- */
- protected String findReferences(String classFilePath) {
- // check that "new Z().init()" is bound to "AbstractB.init()"
- final StringBuffer references = new StringBuffer(10);
- final SearchParticipant participant = new JavaSearchParticipant() {
- final SearchParticipant searchParticipant = this;
-
- public SearchDocument getDocument(final String documentPath) {
- return new SearchDocument(documentPath, this.searchParticipant) {
- public byte[] getByteContents() {
- try {
- return org.eclipse.wst.jsdt.internal.compiler.util.Util
- .getFileByteContent(new File(getPath()));
- } catch (IOException e) {
- e.printStackTrace();
- return null;
- }
- }
-
- public char[] getCharContents() {
- // not used
- return null;
- }
-
- public String getEncoding() {
- // not used
- return null;
- }
- };
- }
- };
- SearchDocument document = participant.getDocument(new File(
- classFilePath).getPath());
- SourceIndexer indexer = new SourceIndexer(document) {
- protected void addIndexEntry(char[] category, char[] key) {
- references.append(category);
- references.append('/');
- references.append(key);
- references.append('\n');
- }
- };
- indexer.indexDocument();
- String computedReferences = references.toString();
- return computedReferences;
- }
-
- protected INameEnvironment[] getClassLibs() {
- String encoding = (String) getCompilerOptions().get(
- CompilerOptions.OPTION_Encoding);
- if ("".equals(encoding))
- encoding = null;
-
- INameEnvironment[] classLibs = new INameEnvironment[1];
- classLibs[0] = new FileSystem(this.classpaths, new String[] {}, // ignore
- // initial
- // file
- // names
- encoding // default encoding
- );
- return classLibs;
- }
-
- protected Map getCompilerOptions() {
- Map defaultOptions = super.getCompilerOptions();
- defaultOptions.put(CompilerOptions.OPTION_LocalVariableAttribute,
- CompilerOptions.GENERATE);
- defaultOptions.put(CompilerOptions.OPTION_ReportUnusedPrivateMember,
- CompilerOptions.WARNING);
- defaultOptions.put(CompilerOptions.OPTION_ReportLocalVariableHiding,
- CompilerOptions.WARNING);
- defaultOptions.put(CompilerOptions.OPTION_ReportFieldHiding,
- CompilerOptions.WARNING);
- defaultOptions
- .put(
- CompilerOptions.OPTION_ReportPossibleAccidentalBooleanAssignment,
- CompilerOptions.WARNING);
- defaultOptions.put(CompilerOptions.OPTION_ReportWrongNumberOfArguments,
- CompilerOptions.WARNING);
- defaultOptions.put(CompilerOptions.OPTION_PreserveUnusedLocal,
- CompilerOptions.PRESERVE);
- defaultOptions.put(CompilerOptions.OPTION_ReportUnnecessaryElse,
- CompilerOptions.WARNING);
- defaultOptions.put(CompilerOptions.OPTION_Unresolved_Field,
- CompilerOptions.ERROR);
- defaultOptions.put(CompilerOptions.OPTION_Unresolved_Method,
- CompilerOptions.ERROR);
- defaultOptions.put(CompilerOptions.OPTION_Unresolved_Type,
- CompilerOptions.ERROR);
- defaultOptions.put(CompilerOptions.OPTION_ReportUninitializedLocalVariable,
- CompilerOptions.WARNING);
- defaultOptions.put(CompilerOptions.OPTION_ReportUninitializedGlobalVariable,
- CompilerOptions.IGNORE);
- defaultOptions.put(CompilerOptions.OPTION_ReportUnusedLocal,
- CompilerOptions.WARNING);
- return defaultOptions;
- }
-
- protected String[] getDefaultClassPaths() {
- return Util.concatWithClassLibs(OUTPUT_DIR, false);
- }
-
- protected IErrorHandlingPolicy getErrorHandlingPolicy() {
- return new IErrorHandlingPolicy() {
- public boolean stopOnFirstError() {
- return false;
- }
-
- public boolean proceedOnErrors() {
- return true;
- }
- };
- }
-
- /*
- * Will consider first the source units passed as arguments, then
- * investigate the classpath: jdklib + output dir
- */
- protected INameEnvironment getNameEnvironment(final String[] testFiles,
- String[] classPaths) {
- this.classpaths = classPaths == null ? getDefaultClassPaths()
- : classPaths;
- return new InMemoryNameEnvironment(testFiles, getClassLibs());
- }
-
- protected INameEnvironment getNameEnvironment(final String[] testFiles,
- String[] files, String[] classPaths) {
- this.classpaths = classPaths == null ? getDefaultClassPaths()
- : classPaths;
- InMemoryNameEnvironment inMemoryNameEnvironment = new InMemoryNameEnvironment(
- testFiles, getClassLibs());
- return inMemoryNameEnvironment;
- }
-
- protected IProblemFactory getProblemFactory() {
- return new DefaultProblemFactory(Locale.getDefault());
- }
-
- public void initialize(CompilerTestSetup setUp) {
- super.initialize(setUp);
- if (setUp instanceof RegressionTestSetup) {
- RegressionTestSetup regressionTestSetUp = (RegressionTestSetup) setUp;
- this.javaClassLib = regressionTestSetUp.javaClassLib;
-// this.verifier = regressionTestSetUp.verifier;
- }
- }
-
- /*
- * Write given source test files in current output sub-directory. Use test
- * name for this sub-directory name (ie. test001, test002, etc...)
- */
- protected void printFiles(String[] testFiles) {
- for (int i = 0, length = testFiles.length; i < length; i++) {
- System.out.println(testFiles[i++]);
- System.out.println(testFiles[i]);
- }
- System.out.println("");
- }
-
- protected void printJavacResultsSummary() {
- if (RUN_JAVAC) {
- Integer count = (Integer) TESTS_COUNTERS.get(CURRENT_CLASS_NAME);
- if (count != null) {
- int newCount = count.intValue() - 1;
- TESTS_COUNTERS.put(CURRENT_CLASS_NAME, new Integer(newCount));
- if (newCount == 0) {
- if (DIFF_COUNTERS[0] != 0 || DIFF_COUNTERS[1] != 0
- || DIFF_COUNTERS[2] != 0) {
- dualPrintln("===========================================================================");
- dualPrintln("Results summary:");
- }
- if (DIFF_COUNTERS[0] != 0)
- dualPrintln(" - "
- + DIFF_COUNTERS[0]
- + " test(s) where Javac found errors/warnings but Eclipse did not");
- if (DIFF_COUNTERS[1] != 0)
- dualPrintln(" - "
- + DIFF_COUNTERS[1]
- + " test(s) where Eclipse found errors/warnings but Javac did not");
- if (DIFF_COUNTERS[2] != 0)
- dualPrintln(" - "
- + DIFF_COUNTERS[2]
- + " test(s) where Eclipse and Javac did not have same output");
- System.out.println("\n");
- }
- }
- dualPrintln("\n\nFull results sent to " + javacFullLogFileName);
- javacFullLog.flush();
- }
- }
-
- protected void removeTempClass(String className) {
- File dir = new File(SOURCE_DIRECTORY);
- String[] fileNames = dir.list();
- if (fileNames != null) {
- for (int i = 0, max = fileNames.length; i < max; i++) {
- if (fileNames[i].indexOf(className) != -1) {
- Util.delete(SOURCE_DIRECTORY + File.separator
- + fileNames[i]);
- }
- }
- }
-
- dir = new File(EVAL_DIRECTORY);
- fileNames = dir.list();
- if (fileNames != null) {
- for (int i = 0, max = fileNames.length; i < max; i++) {
- if (fileNames[i].indexOf(className) != -1) {
- Util.delete(EVAL_DIRECTORY + File.separator + fileNames[i]);
- }
- }
- }
-
- }
-
- protected void runConformTest(String[] testFiles) {
- runConformTest(testFiles, null /* no expected output string */,
- null /* no extra class libraries */, true /*
- * flush output
- * directory
- */, null /*
- * no vm
- * arguments
- */, null /*
- * no
- * custom
- * options
- */,
- null /* no custom requestor */, false /*
- * do not skip javac for
- * this peculiar test
- */);
- }
-
- protected void runConformTest(String[] testFiles,
- String expectedSuccessOutputString) {
- runConformTest(testFiles, expectedSuccessOutputString, null /*
- * no extra
- * class
- * libraries
- */,
- true /* flush output directory */, null /* no vm arguments */,
- null /* no custom options */, null /* no custom requestor */,
- false /* do not skip javac for this peculiar test */);
- }
-
- protected void runConformTest(String[] testFiles,
- String expectedSuccessOutputString, String[] vmArguments) {
- runConformTest(testFiles, expectedSuccessOutputString, null /*
- * no extra
- * class
- * libraries
- */,
- true /* flush output directory */, vmArguments, null /*
- * no custom
- * options
- */,
- null /* no custom requestor */, false /*
- * do not skip javac for
- * this peculiar test
- */);
- }
-
- protected void runConformTest(String[] testFiles,
- String expectedSuccessOutputString, String[] classLib,
- boolean shouldFlushOutputDirectory, String[] vmArguments) {
- runConformTest(testFiles, expectedSuccessOutputString, classLib,
- shouldFlushOutputDirectory, vmArguments,
- null /* no custom options */, null /* no custom requestor */,
- false /* do not skip javac for this peculiar test */);
- }
-
- protected void runConformTest(String[] testFiles,
- String expectedSuccessOutputString, String[] classLib,
- boolean shouldFlushOutputDirectory, String[] vmArguments,
- Map customOptions, ICompilerRequestor clientRequestor) {
- runConformTest(testFiles, expectedSuccessOutputString, classLib,
- shouldFlushOutputDirectory, vmArguments, customOptions,
- clientRequestor, false /*
- * do not skip javac for this peculiar
- * test
- */);
- }
-
- protected void runConformTest(String[] testFiles,
- String expectedSuccessOutputString, String[] classLib,
- boolean shouldFlushOutputDirectory, String[] vmArguments,
- Map customOptions, ICompilerRequestor clientRequestor,
- boolean skipJavac) {
- // Non-javac part
- try {
- if (shouldFlushOutputDirectory)
- Util.flushDirectoryContent(new File(OUTPUT_DIR));
-
- IProblemFactory problemFactory = getProblemFactory();
- Requestor requestor = new Requestor(problemFactory, OUTPUT_DIR
- .endsWith(File.separator) ? OUTPUT_DIR : OUTPUT_DIR
- + File.separator, false, clientRequestor, false, /*
- * show
- * category
- */
- false /* show warning token */);
-
- Map options = getCompilerOptions();
- if (customOptions != null) {
- options.putAll(customOptions);
- }
- CompilerOptions compilerOptions = new CompilerOptions(options);
- compilerOptions.performMethodsFullRecovery = false;
- compilerOptions.performStatementsRecovery = false;
- Compiler batchCompiler = new Compiler(getNameEnvironment(
- new String[] {}, classLib), getErrorHandlingPolicy(),
- compilerOptions, requestor, problemFactory);
- compilerOptions.produceReferenceInfo = true;
- try {
- batchCompiler.compile(Util.compilationUnits(testFiles)); // compile
- // all
- // files
- // together
- } catch (RuntimeException e) {
- System.out.println(getClass().getName() + '#' + getName());
- e.printStackTrace();
- for (int i = 0; i < testFiles.length; i += 2) {
- System.out.print(testFiles[i]);
- System.out.println(" ["); //$NON-NLS-1$
- System.out.println(testFiles[i + 1]);
- System.out.println("]"); //$NON-NLS-1$
- }
- throw e;
- }
- if (!requestor.hasErrors) {
- String sourceFile = testFiles[0];
-
- // Compute class name by removing ".java" and replacing slashes
- // with dots
- String className = sourceFile.substring(0,
- sourceFile.length() - 5).replace('/', '.').replace(
- '\\', '.');
- if (className.endsWith(PACKAGE_INFO_NAME))
- return;
-
-// if (vmArguments != null) {
-// if (this.verifier != null) {
-// this.verifier.shutDown();
-// }
-// this.verifier = new TestVerifier(false);
-// this.createdVerifier = true;
-// }
-// boolean passed = this.verifier.verifyClassFiles(sourceFile,
-// className, expectedSuccessOutputString,
-// this.classpaths, null, vmArguments);
-// if (!passed) {
-// System.out.println(getClass().getName() + '#' + getName());
-// for (int i = 0; i < testFiles.length; i += 2) {
-// System.out.print(testFiles[i]);
-// System.out.println(" ["); //$NON-NLS-1$
-// System.out.println(testFiles[i + 1]);
-// System.out.println("]"); //$NON-NLS-1$
-// }
-// }
-// assertTrue(this.verifier.failureReason, // computed by
-// // verifyClassFiles(...)
-// // action
-// passed);
- if (vmArguments != null) {
-// if (this.verifier != null) {
-// this.verifier.shutDown();
-// }
-// this.verifier = new TestVerifier(false);
-// this.createdVerifier = true;
- }
- } else {
- System.out.println(getClass().getName() + '#' + getName());
- System.out.println(Util.displayString(requestor.problemLog,
- INDENT, SHIFT));
- for (int i = 0; i < testFiles.length; i += 2) {
- System.out.print(testFiles[i]);
- System.out.println(" ["); //$NON-NLS-1$
- System.out.println(testFiles[i + 1]);
- System.out.println("]"); //$NON-NLS-1$
- }
- assertTrue("Unexpected problems: " + requestor.problemLog,
- false);
- }
- // javac part
- } catch (AssertionFailedError e) {
- throw e;
- } finally {
- if (RUN_JAVAC && !skipJavac)
- runJavac(testFiles, null, expectedSuccessOutputString,
- shouldFlushOutputDirectory);
- // PREMATURE for now, skipping javac implies skipping the compile
- // and execution steps; yet, only cases for which the
- // execution step was a problem have been discovered so
- // far; may consider skipping the execution step only
- }
- }
-
- protected void runConformTest(String[] testFiles, String[] vmArguments) {
- runConformTest(testFiles, null /* no expected output string */,
- null /* no extra class libraries */, true /*
- * flush output
- * directory
- */, vmArguments,
- null /* no custom options */, null /* no custom requestor */,
- false /* do not skip javac for this peculiar test */);
- }
-
- // PREMATURE consider whether conform tests throwing errors should
- // implement javac comparison or not
- protected void runConformTestThrowingError(String[] testFiles,
- String expectedSuccessOutputString, String[] classLib,
- boolean shouldFlushOutputDirectory, String[] vmArguments) {
-
- if (shouldFlushOutputDirectory)
- Util.flushDirectoryContent(new File(OUTPUT_DIR));
-
- IProblemFactory problemFactory = getProblemFactory();
- Requestor requestor = new Requestor(problemFactory, OUTPUT_DIR
- .endsWith(File.separator) ? OUTPUT_DIR : OUTPUT_DIR
- + File.separator, false, null/* no custom requestor */, false, /*
- * show
- * category
- */
- false /* show warning token */);
-
- CompilerOptions compilerOptions = new CompilerOptions(
- getCompilerOptions());
- compilerOptions.performMethodsFullRecovery = false;
- compilerOptions.performStatementsRecovery = false;
- Compiler batchCompiler = new Compiler(getNameEnvironment(
- new String[] {}, classLib), getErrorHandlingPolicy(),
- compilerOptions, requestor, problemFactory);
- batchCompiler.options.produceReferenceInfo = true;
- Throwable exception = null;
- try {
- batchCompiler.compile(Util.compilationUnits(testFiles)); // compile
- // all
- // files
- // together
- } catch (RuntimeException e) {
- exception = e;
- throw e;
- } catch (Error e) {
- exception = e;
- throw e;
- } finally {
-
- if (!requestor.hasErrors) {
- String sourceFile = testFiles[0];
-
- // Compute class name by removing ".java" and replacing slashes
- // with dots
- String className = sourceFile.substring(0,
- sourceFile.length() - 5).replace('/', '.').replace(
- '\\', '.');
-
-// boolean passed = this.verifier.verifyClassFilesThrowingError(
-// sourceFile, className, expectedSuccessOutputString,
-// this.classpaths, null, vmArguments);
-// if (exception == null)
-// assertTrue(this.verifier.failureReason, // computed by
-// // verifyClassFiles(...)
-// // action
-// passed);
- } else {
- if (exception == null)
- assertTrue("Unexpected problems: " + requestor.problemLog,
- false);
- }
- }
- }
-
- /*
- * Run Sun compilation using javac. Launch compilation in a thread and
- * verify that it does not take more than 5s to perform it. Otherwise abort
- * the process and log in console. TODO (maxime) not sure we really do that
- * 5s cap any more. A semi verbose output is sent to the console that
- * analyzes differences of behaviors between javac and Eclipse on a per test
- * basis. A more verbose output is produced into a file which name is
- * printed on the console. Such files can be compared between various javac
- * releases to check potential changes. To enable such tests, specify the
- * following VM properies in the launch configuration: -Drun.javac=enabled
- * mandatory - tells the test suite to run javac tests -Djdk.root=<the root
- * directory of the tested javac> optional - enables to find the javac that
- * will be run by the tests suite; the root directory must be specified as
- * an absolute path and should point to the JDK root, aka /opt/jdk1.5.0_05
- * for Linux or c:/JDK_50 for Windows; in case this property is not
- * specified, the tests suite will use the runtime JRE of the launching
- * configuration. Note that enabling javac tests implies running into 1.5
- * compliance level (without having to specify it into the VM properties.)
- * TODO (maxime) consider impacts of Java 6
- */
- protected void runJavac(String[] testFiles,
- final String expectedProblemLog,
- final String expectedSuccessOutputString,
- boolean shouldFlushOutputDirectory) {
- String testName = null;
- Process compileProcess = null;
- Process execProcess = null;
- try {
- // Init test name
- testName = testName();
-
- // Cleanup javac output dir if needed
- File javacOutputDirectory = new File(JAVAC_OUTPUT_DIR);
- if (shouldFlushOutputDirectory) {
- Util.delete(javacOutputDirectory);
- }
-
- // Write files in dir
- writeFiles(testFiles);
-
- // Prepare command line
- StringBuffer cmdLine = new StringBuffer(javacCommandLineHeader);
- // compute extra classpath
- String[] classpath = Util.concatWithClassLibs(JAVAC_OUTPUT_DIR,
- false);
- StringBuffer cp = new StringBuffer(" -classpath ");
- int length = classpath.length;
- for (int i = 0; i < length; i++) {
- if (i > 0)
- cp.append(File.pathSeparatorChar);
- if (classpath[i].indexOf(" ") != -1) {
- cp.append("\"" + classpath[i] + "\"");
- } else {
- cp.append(classpath[i]);
- }
- }
- cmdLine.append(cp);
- // add source files
- for (int i = 0; i < testFiles.length; i += 2) {
- // *.java is not enough (p1/X.java, p2/Y.java)
- cmdLine.append(' ');
- cmdLine.append(testFiles[i]);
- }
-
- // Launch process
- compileProcess = Runtime.getRuntime().exec(cmdLine.toString(),
- null, this.outputTestDirectory);
-
- // Log errors
- Logger errorLogger = new Logger(compileProcess.getErrorStream(),
- "ERROR");
-
- // Log output
- Logger outputLogger = new Logger(compileProcess.getInputStream(),
- "OUTPUT");
-
- // start the threads to run outputs (standard/error)
- errorLogger.start();
- outputLogger.start();
-
- // Wait for end of process
- int exitValue = compileProcess.waitFor();
- errorLogger.join(); // make sure we get the whole output
- outputLogger.join();
-
- // Report raw javac results
- if (!testName.equals(javacTestName)) {
- javacTestName = testName;
- javacTestErrorFlag = false;
- javacFullLog
- .println("-----------------------------------------------------------------");
- javacFullLog.println(CURRENT_CLASS_NAME + " " + testName);
- }
- if (exitValue != 0) {
- javacTestErrorFlag = true;
- }
- if (errorLogger.buffer.length() > 0) {
- javacFullLog.println("--- javac err: ---");
- javacFullLog.println(errorLogger.buffer.toString());
- }
- if (outputLogger.buffer.length() > 0) {
- javacFullLog.println("--- javac out: ---");
- javacFullLog.println(outputLogger.buffer.toString());
- }
-
- // Compare compilation results
- if (expectedProblemLog == null || expectedProblemLog.length() == 0) {
- // Eclipse found no error and no warning
- if (exitValue != 0) {
- // Javac found errors
- System.out
- .println("----------------------------------------");
- System.out
- .println(testName
- + " - Javac has found error(s) but Eclipse expects conform result:\n");
- javacFullLog
- .println("JAVAC_MISMATCH: Javac has found error(s) but Eclipse expects conform result");
- System.out.println(errorLogger.buffer.toString());
- printFiles(testFiles);
- DIFF_COUNTERS[0]++;
- } else {
- // Javac found no error - may have found warnings
- if (errorLogger.buffer.length() > 0) {
- System.out
- .println("----------------------------------------");
- System.out
- .println(testName
- + " - Javac has found warning(s) but Eclipse expects conform result:\n");
- javacFullLog
- .println("JAVAC_MISMATCH: Javac has found warning(s) but Eclipse expects conform result");
- System.out.println(errorLogger.buffer.toString());
- printFiles(testFiles);
- DIFF_COUNTERS[0]++;
- }
- if (expectedSuccessOutputString != null
- && !javacTestErrorFlag) {
- // Neither Eclipse nor Javac found errors, and we have a
- // runtime
- // bench value
- StringBuffer javaCmdLine = new StringBuffer(
- javaCommandLineHeader);
- javaCmdLine.append(cp);
- javaCmdLine.append(' ').append(
- testFiles[0].substring(0, testFiles[0]
- .indexOf('.')));
- // assume executable class is name of first test file -
- // PREMATURE check if this is also the case in other
- // test fwk classes
- execProcess = Runtime.getRuntime().exec(
- javaCmdLine.toString(), null,
- this.outputTestDirectory);
- Logger logger = new Logger(
- execProcess.getInputStream(), "");
- // PREMATURE implement consistent error policy
- logger.start();
- exitValue = execProcess.waitFor();
- logger.join(); // make sure we get the whole output
- String javaOutput = logger.buffer.toString().trim();
- if (!expectedSuccessOutputString.equals(javaOutput)) {
- System.out
- .println("----------------------------------------");
- System.out
- .println(testName
- + " - Javac and Eclipse runtime output is not the same:");
- javacFullLog
- .println("JAVAC_MISMATCH: Javac and Eclipse runtime output is not the same");
- dualPrintln("eclipse:");
- dualPrintln(expectedSuccessOutputString);
- dualPrintln("javac:");
- dualPrintln(javaOutput);
- System.out.println("\n");
- printFiles(testFiles); // PREMATURE consider
- // printing files to the log
- // as well
- DIFF_COUNTERS[2]++;
- }
- }
- }
- } else {
- // Eclipse found errors or warnings
- if (errorLogger.buffer.length() == 0) {
- System.out
- .println("----------------------------------------");
- System.out
- .println(testName
- + " - Eclipse has found error(s)/warning(s) but Javac did not find any:");
- javacFullLog
- .println("JAVAC_MISMATCH: Eclipse has found error(s)/warning(s) but Javac did not find any");
- dualPrintln("eclipse:");
- dualPrintln(expectedProblemLog);
- printFiles(testFiles);
- DIFF_COUNTERS[1]++;
- } else if (expectedProblemLog.indexOf("ERROR") > 0
- && exitValue == 0) {
- System.out
- .println("----------------------------------------");
- System.out
- .println(testName
- + " - Eclipse has found error(s) but Javac only found warning(s):");
- javacFullLog
- .println("JAVAC_MISMATCH: Eclipse has found error(s) but Javac only found warning(s)");
- dualPrintln("eclipse:");
- dualPrintln(expectedProblemLog);
- System.out.println("javac:");
- System.out.println(errorLogger.buffer.toString());
- printFiles(testFiles);
- DIFF_COUNTERS[1]++;
- } else {
- // PREMATURE refine comparison
- // TODO (frederic) compare warnings in each result and
- // verify they are similar...
- // System.out.println(testName+": javac has found warnings :");
- // System.out.print(errorLogger.buffer.toString());
- // System.out.println(testName+": we're expecting warning results:");
- // System.out.println(expectedProblemLog);
- }
- }
- } catch (InterruptedException e1) {
- if (compileProcess != null)
- compileProcess.destroy();
- if (execProcess != null)
- execProcess.destroy();
- System.out.println(testName
- + ": Sun javac compilation was aborted!");
- javacFullLog
- .println("JAVAC_WARNING: Sun javac compilation was aborted!");
- e1.printStackTrace(javacFullLog);
- } catch (Throwable e) {
- System.out.println(testName
- + ": could not launch Sun javac compilation!");
- e.printStackTrace();
- javacFullLog
- .println("JAVAC_ERROR: could not launch Sun javac compilation!");
- e.printStackTrace(javacFullLog);
- // PREMATURE failing the javac pass or comparison could also fail
- // the test itself
- } finally {
- // Clean up written file(s)
- Util.delete(outputTestDirectory);
- }
- }
-
- /**
- * Log contains all problems (warnings+errors)
- */
- protected void runNegativeTest(String[] testFiles, String expectedProblemLog) {
- runNegativeTest(testFiles, expectedProblemLog, null, true);
- runNegativeTest(testFiles, expectedProblemLog, null /*
- * no extra class
- * libraries
- */, true /*
- * flush
- * output
- * directory
- */,
- null /* no custom options */,
- false /* do not generate output */,
- false /* do not show category */,
- false /* do not show warning token */, false /*
- * do not skip javac
- * for this peculiar
- * test
- */, false /*
- * do
- * not
- * perform
- * statements
- * recovery
- */,
- null);
- }
-
- /**
- * Log contains all problems (warnings+errors)
- */
- protected void runNegativeTest(String[] testFiles,
- String expectedProblemLog, String[] classLib,
- boolean shouldFlushOutputDirectory) {
- runNegativeTest(testFiles, expectedProblemLog, classLib,
- shouldFlushOutputDirectory, null /* no custom options */,
- false /* do not generate output */,
- false /* do not show category */,
- false /* do not show warning token */, false /*
- * do not skip javac
- * for this peculiar
- * test
- */, false /*
- * do
- * not
- * perform
- * statements
- * recovery
- */,
- null);
- }
-
- /**
- * Log contains all problems (warnings+errors)
- */
- protected void runNegativeTest(String[] testFiles,
- String expectedProblemLog, String[] classLib,
- boolean shouldFlushOutputDirectory, Map customOptions) {
- runNegativeTest(testFiles, expectedProblemLog, classLib,
- shouldFlushOutputDirectory, customOptions, false /*
- * do not
- * generate
- * output
- */,
- false /* do not show category */,
- false /* do not show warning token */, false /*
- * do not skip javac
- * for this peculiar
- * test
- */, false /*
- * do
- * not
- * perform
- * statements
- * recovery
- */,
- null);
- }
-
- /**
- * Log contains all problems (warnings+errors)
- */
- protected void runNegativeTest(String[] testFiles,
- String expectedProblemLog, String[] classLib,
- boolean shouldFlushOutputDirectory, Map customOptions,
- boolean generateOutput, boolean showCategory,
- boolean showWarningToken) {
- runNegativeTest(testFiles, expectedProblemLog, classLib,
- shouldFlushOutputDirectory, customOptions, generateOutput,
- showCategory, showWarningToken, false /*
- * do not skip javac for
- * this peculiar test
- */, false /*
- * do not
- * perform
- * statements
- * recovery
- */, null);
- }
-
- /**
- * Log contains all problems (warnings+errors)
- */
- protected void runNegativeTest(String[] testFiles,
- String expectedProblemLog, String[] classLib,
- boolean shouldFlushOutputDirectory, Map customOptions,
- boolean generateOutput, boolean showCategory,
- boolean showWarningToken, boolean skipJavac,
- boolean performStatementsRecovery, String[] otherFiles) {
- // Non-javac part
- try {
- if (shouldFlushOutputDirectory)
- Util.flushDirectoryContent(new File(OUTPUT_DIR));
-
- if (otherFiles == null)
- otherFiles = new String[] {};
- IProblemFactory problemFactory = getProblemFactory();
- Requestor requestor = new Requestor(problemFactory, OUTPUT_DIR
- .endsWith(File.separator) ? OUTPUT_DIR : OUTPUT_DIR
- + File.separator, generateOutput,
- null/* no custom requestor */, showCategory,
- showWarningToken);
- Map options = getCompilerOptions();
- if (customOptions != null) {
- options.putAll(customOptions);
- }
- CompilerOptions compilerOptions = new CompilerOptions(options);
- compilerOptions.performMethodsFullRecovery = performStatementsRecovery;
- compilerOptions.performStatementsRecovery = performStatementsRecovery;
- Compiler batchCompiler = new Compiler(getNameEnvironment(
- otherFiles, classLib), getErrorHandlingPolicy(),
- compilerOptions, requestor, problemFactory);
- Object inferEngines = options.get(INFERENCE_ENGINES);
- if (inferEngines != null) {
- batchCompiler.parser.inferenceEngines = (IInferEngine[]) inferEngines;
-
- }
- batchCompiler.options.produceReferenceInfo = true;
- Throwable exception = null;
- try {
- batchCompiler.compile(Util.compilationUnits(testFiles)); // compile
- // all
- // files
- // together
- } catch (RuntimeException e) {
- exception = e;
- throw e;
- } catch (Error e) {
- exception = e;
- throw e;
- } finally {
- String computedProblemLog = Util
- .convertToIndependantLineDelimiter(requestor.problemLog
- .toString());
- String platformIndependantExpectedLog = Util
- .convertToIndependantLineDelimiter(expectedProblemLog);
- if (!platformIndependantExpectedLog.equals(computedProblemLog)) {
- System.out.println(getClass().getName() + '#' + getName());
- System.out.println(Util.displayString(computedProblemLog,
- INDENT, SHIFT));
- for (int i = 0; i < testFiles.length; i += 2) {
- System.out.print(testFiles[i]);
- System.out.println(" ["); //$NON-NLS-1$
- System.out.println(testFiles[i + 1]);
- System.out.println("]"); //$NON-NLS-1$
- }
- }
- if (exception == null)
- assertEquals("Invalid problem log ",
- platformIndependantExpectedLog, computedProblemLog);
- }
- // javac part
- } catch (AssertionFailedError e) {
- throw e;
- } finally {
- if (RUN_JAVAC && !skipJavac)
- runJavac(testFiles, expectedProblemLog, null,
- shouldFlushOutputDirectory);
- }
- }
-
- protected void runNegativeTestWithExecution(String[] testFiles,
- String expectedProblemLog, String expectedSuccessOutputString,
- String[] classLib, boolean shouldFlushOutputDirectory,
- String[] vmArguments, Map customOptions,
- ICompilerRequestor clientRequestor) {
-
- if (shouldFlushOutputDirectory)
- Util.flushDirectoryContent(new File(OUTPUT_DIR));
-
- IProblemFactory problemFactory = getProblemFactory();
- Requestor requestor = new Requestor(problemFactory, OUTPUT_DIR
- .endsWith(File.separator) ? OUTPUT_DIR : OUTPUT_DIR
- + File.separator, true, clientRequestor,
- false /* show category */, false /* show warning token */);
-
- Map options = getCompilerOptions();
- if (customOptions != null) {
- options.putAll(customOptions);
- }
- CompilerOptions compilerOptions = new CompilerOptions(options);
- compilerOptions.performMethodsFullRecovery = false;
- compilerOptions.performStatementsRecovery = false;
- Compiler batchCompiler = new Compiler(getNameEnvironment(
- new String[] {}, classLib), getErrorHandlingPolicy(),
- compilerOptions, requestor, problemFactory);
- batchCompiler.options.produceReferenceInfo = true;
- try {
- batchCompiler.compile(Util.compilationUnits(testFiles)); // compile
- // all
- // files
- // together
- } catch (RuntimeException e) {
- System.out.println(getClass().getName() + '#' + getName());
- e.printStackTrace();
- for (int i = 0; i < testFiles.length; i += 2) {
- System.out.print(testFiles[i]);
- System.out.println(" ["); //$NON-NLS-1$
- System.out.println(testFiles[i + 1]);
- System.out.println("]"); //$NON-NLS-1$
- }
- throw e;
- }
- assertTrue("Must have errors", requestor.hasErrors);
-
- String computedProblemLog = Util
- .convertToIndependantLineDelimiter(requestor.problemLog
- .toString());
- String platformIndependantExpectedLog = Util
- .convertToIndependantLineDelimiter(expectedProblemLog);
- if (!platformIndependantExpectedLog.equals(computedProblemLog)) {
- System.out.println(getClass().getName() + '#' + getName());
- System.out.println(Util.displayString(computedProblemLog, INDENT,
- SHIFT));
- for (int i = 0; i < testFiles.length; i += 2) {
- System.out.print(testFiles[i]);
- System.out.println(" ["); //$NON-NLS-1$
- System.out.println(testFiles[i + 1]);
- System.out.println("]"); //$NON-NLS-1$
- }
- assertEquals("Invalid problem log ",
- platformIndependantExpectedLog, computedProblemLog);
- }
-
- String sourceFile = testFiles[0];
-
- // Compute class name by removing ".java" and replacing slashes with
- // dots
- String className = sourceFile.substring(0, sourceFile.length() - 5)
- .replace('/', '.').replace('\\', '.');
- if (className.endsWith(PACKAGE_INFO_NAME))
- return;
-
-// if (vmArguments != null) {
-// if (this.verifier != null) {
-// this.verifier.shutDown();
-// }
-// this.verifier = new TestVerifier(false);
-// this.createdVerifier = true;
-// }
-// boolean passed = this.verifier
-// .verifyClassFiles(sourceFile, className,
-// expectedSuccessOutputString, this.classpaths, null,
-// vmArguments);
-// if (!passed) {
-// String platformIndependantExpectedSuccessOutputString = Util
-// .convertToIndependantLineDelimiter(expectedSuccessOutputString);
-// String platformIndependantFailureReason = Util
-// .convertToIndependantLineDelimiter(this.verifier.failureReason);
-// if (platformIndependantFailureReason
-// .indexOf(platformIndependantExpectedSuccessOutputString) == -1) {
-// System.out.println(getClass().getName() + '#' + getName());
-// System.out.println(Util.displayString(
-// platformIndependantFailureReason, INDENT, SHIFT));
-// assertEquals("Invalid runtime log ",
-// platformIndependantExpectedSuccessOutputString,
-// platformIndependantFailureReason);
-// System.out.println(getClass().getName() + '#' + getName());
-// for (int i = 0; i < testFiles.length; i += 2) {
-// System.out.print(testFiles[i]);
-// System.out.println(" ["); //$NON-NLS-1$
-// System.out.println(testFiles[i + 1]);
-// System.out.println("]"); //$NON-NLS-1$
-// }
-// }
-// } else if (vmArguments != null) {
-// if (this.verifier != null) {
-// this.verifier.shutDown();
-// }
-// this.verifier = new TestVerifier(false);
-// this.createdVerifier = true;
-// }
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-// if (this.verifier == null) {
-// this.verifier = new TestVerifier(true);
-// this.createdVerifier = true;
-// }
- if (RUN_JAVAC) {
- if (isFirst()) {
- if (javacFullLog == null) {
- // One time initialization of javac related concerns
- // compute command lines and extract javac version
- String jdkRootDirectory = System.getProperty("jdk.root");
- if (jdkRootDirectory == null)
- jdkRootDirPath = (new Path(Util.getJREDirectory()))
- .removeLastSegments(1);
- else
- jdkRootDirPath = new Path(jdkRootDirectory);
-
- StringBuffer cmdLineHeader = new StringBuffer(
- jdkRootDirPath.append("bin").append(JAVA_NAME)
- .toString()); // PREMATURE replace JAVA_NAME
- // and JAVAC_NAME with
- // locals? depends on
- // potential reuse
- javaCommandLineHeader = cmdLineHeader.toString();
- cmdLineHeader = new StringBuffer(jdkRootDirPath.append(
- "bin").append(JAVAC_NAME).toString());
- cmdLineHeader.append(" -classpath . ");
- // start with the current directory which contains the
- // source files
- Process compileProcess = Runtime.getRuntime().exec(
- cmdLineHeader.toString() + " -version", null, null);
- Logger versionLogger = new Logger(compileProcess
- .getErrorStream(), "");
- // PREMATURE implement consistent error policy
- versionLogger.start();
- compileProcess.waitFor();
- versionLogger.join(); // make sure we get the whole output
- String version = versionLogger.buffer.toString();
- int eol = version.indexOf('\n');
- version = version.substring(0, eol);
- cmdLineHeader.append(" -d ");
- cmdLineHeader
- .append(JAVAC_OUTPUT_DIR.indexOf(" ") != -1 ? "\""
- + JAVAC_OUTPUT_DIR + "\""
- : JAVAC_OUTPUT_DIR);
- cmdLineHeader
- .append(" -source 1.5 -deprecation -Xlint:unchecked "); // enable
- // recommended
- // warnings
- // REVIEW consider enabling all warnings instead? Philippe
- // does not see
- // this as ez to use (too many changes in logs)
- javacCommandLineHeader = cmdLineHeader.toString();
- new File(Util.getOutputDirectory()).mkdirs();
- // TODO maxime check why this happens to miss in some cases
- javacFullLogFileName = Util.getOutputDirectory()
- + File.separatorChar
- + version.replace(' ', '_')
- + "_"
- + (new SimpleDateFormat("yyyyMMdd_HHmmss"))
- .format(new Date()) + ".txt";
- javacFullLog = new PrintWriter(new FileOutputStream(
- javacFullLogFileName));
- javacFullLog.println(version); // so that the contents is
- // self sufficient
- System.out
- .println("***************************************************************************");
- System.out
- .println("* Sun Javac compiler output archived into file:");
- System.out.println("* " + javacFullLogFileName);
- System.out
- .println("***************************************************************************");
- }
- // per class initialization
- CURRENT_CLASS_NAME = getClass().getName();
- dualPrintln("***************************************************************************");
- System.out
- .print("* Comparison with Sun Javac compiler for class ");
- dualPrintln(CURRENT_CLASS_NAME.substring(CURRENT_CLASS_NAME
- .lastIndexOf('.') + 1)
- + " ("
- + TESTS_COUNTERS.get(CURRENT_CLASS_NAME)
- + " tests)");
- System.out
- .println("***************************************************************************");
- DIFF_COUNTERS[0] = 0;
- DIFF_COUNTERS[1] = 0;
- DIFF_COUNTERS[2] = 0;
- }
- }
- }
-
- public void stop() {
-// this.verifier.shutDown();
- }
-
- protected void tearDown() throws Exception {
-// if (this.createdVerifier) {
-// this.stop();
-// }
- // clean up output dir
- File outputDir = new File(OUTPUT_DIR);
- if (outputDir.exists()) {
- Util.flushDirectoryContent(outputDir);
- }
- super.tearDown();
- if (RUN_JAVAC) {
- printJavacResultsSummary();
- }
- }
-
- protected void runBasicTest(String[] testFiles) {
- runBasicTest(testFiles, null /* no extra class libraries */, null /*
- * no
- * custom
- * options
- */,
- null /* no custom requestor */);
- }
-
- protected void runBasicTest(String[] testFiles, String[] classLib,
- Map customOptions, ICompilerRequestor clientRequestor) {
- // Non-javac part
- try {
-
- IProblemFactory problemFactory = getProblemFactory();
- Requestor requestor = new Requestor(problemFactory, OUTPUT_DIR
- .endsWith(File.separator) ? OUTPUT_DIR : OUTPUT_DIR
- + File.separator, false, clientRequestor, false, /*
- * show
- * category
- */
- false /* show warning token */);
-
- Map options = getCompilerOptions();
- if (customOptions != null) {
- options.putAll(customOptions);
- }
- CompilerOptions compilerOptions = new CompilerOptions(options);
- compilerOptions.performStatementsRecovery = false;
- Compiler batchCompiler = new Compiler(getNameEnvironment(
- new String[] {}, classLib), getErrorHandlingPolicy(),
- compilerOptions, requestor, problemFactory);
- compilerOptions.produceReferenceInfo = true;
- try {
- batchCompiler.compile(Util.compilationUnits(testFiles)); // compile
- // all
- // files
- // together
- } catch (RuntimeException e) {
- System.out.println(getClass().getName() + '#' + getName());
- e.printStackTrace();
- for (int i = 0; i < testFiles.length; i += 2) {
- System.out.print(testFiles[i]);
- System.out.println(" ["); //$NON-NLS-1$
- System.out.println(testFiles[i + 1]);
- System.out.println("]"); //$NON-NLS-1$
- }
- throw e;
- }
- if (!requestor.hasErrors) {
-// String sourceFile = testFiles[0];
-// boolean passed = true;
-// if (!passed) {
-// System.out.println(getClass().getName() + '#' + getName());
-// for (int i = 0; i < testFiles.length; i += 2) {
-// System.out.print(testFiles[i]);
-// System.out.println(" ["); //$NON-NLS-1$
-// System.out.println(testFiles[i + 1]);
-// System.out.println("]"); //$NON-NLS-1$
-// }
-// }
-// assertTrue(this.verifier.failureReason, // computed by
-// // verifyClassFiles(...)
-// // action
-// passed);
- } else {
- System.out.println(getClass().getName() + '#' + getName());
- System.out.println(Util.displayString(requestor.problemLog,
- INDENT, SHIFT));
- for (int i = 0; i < testFiles.length; i += 2) {
- System.out.print(testFiles[i]);
- System.out.println(" ["); //$NON-NLS-1$
- System.out.println(testFiles[i + 1]);
- System.out.println("]"); //$NON-NLS-1$
- }
- assertTrue("Unexpected problems: " + requestor.problemLog,
- false);
- }
- // javac part
- } catch (AssertionFailedError e) {
- throw e;
- } finally {
- }
- }
-
- static class TestParser extends Parser {
-
- public TestParser(IProblemFactory problemFactory,
- CompilerOptions options, boolean optimizeStringLiterals,
- boolean useSourceJavadocParser) {
-
- super(new ProblemReporter(DefaultErrorHandlingPolicies
- .exitAfterAllProblems(), options, problemFactory),
- optimizeStringLiterals);
-
- // we want to notify all syntax error with the acceptProblem API
- // To do so, we define the record method of the ProblemReporter
- this.problemReporter = new ProblemReporter(
- DefaultErrorHandlingPolicies.exitAfterAllProblems(),
- options, problemFactory) {
- public void record(CategorizedProblem problem,
- CompilationResult unitResult, ReferenceContext context) {
- unitResult.record(problem, context); // TODO (jerome)
- // clients are
- // trapping problems
- // either through
- // factory or
- // requestor... is
- // result storing
- // needed?
- System.out.println("PARSER ERROR: " + problem.toString());
- assertTrue("unexpected parse Error", false);
- }
- };
- this.options = options;
- // set specific javadoc parser
- if (useSourceJavadocParser) {
- this.javadocParser = new SourceJavadocParser(this);
-
- }
- }
-
- public CompilationUnitDeclaration parseCompilationUnit(
- ICompilationUnit unit, boolean fullParse) {
-
- boolean old = diet;
-
- try {
- diet = !fullParse;
- CompilationResult compilationUnitResult = new CompilationResult(
- unit, 0, 0, this.options.maxProblemsPerUnit);
- CompilationUnitDeclaration parsedUnit = parse(unit,
- compilationUnitResult);
- int initialStart = this.scanner.initialPosition;
- int initialEnd = this.scanner.eofPosition;
- if (fullParse) {
- diet = false;
- this.getMethodBodies(parsedUnit);
- }
- this.scanner.resetTo(initialStart, initialEnd);
- assertTrue(this.expressionPtr < 0);
- assertTrue(this.expressionLengthPtr < 0);
- assertTrue(this.astPtr < 0);
- assertTrue(this.astLengthPtr < 0);
- assertTrue(this.intPtr < 0);
- return parsedUnit;
- } catch (AbortCompilation e) {
- // ignore this exception
- } finally {
- diet = old;
- }
- return null;
- }
- }
-
- protected CompilationUnitDeclaration runParseTest(String s,
- String testName, String expected) {
- // Non-javac part
- try {
-
- char[] source = s.toCharArray();
- TestParser parser = new TestParser(new DefaultProblemFactory(Locale
- .getDefault()), new CompilerOptions(getCompilerOptions()),
- true/* optimize string literals */, false);
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName,
- null);
-
- CompilationUnitDeclaration compUnit = parser.parseCompilationUnit(
- sourceUnit, true);
- if (expected != null) {
- String result = compUnit.toString();
- assertEquals(expected, result);
- }
- return compUnit;
- // javac part
- } catch (AssertionFailedError e) {
- throw e;
- } finally {
- }
- }
-
- protected CompilationUnitDeclaration runJSDocParseTest(String s,
- String testName, String expected) {
- // Non-javac part
- try {
-
- char[] source = s.toCharArray();
- TestParser parser = new TestParser(new DefaultProblemFactory(Locale
- .getDefault()), new CompilerOptions(getCompilerOptions()),
- true/* optimize string literals */, false);
-
- parser.javadocParser.checkDocComment = true;
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName,
- null);
-
- CompilationUnitDeclaration compUnit = parser.parseCompilationUnit(
- sourceUnit, true);
- if (expected != null) {
- String result = compUnit.toString();
- assertEquals(expected, result);
- }
- return compUnit;
- // javac part
- } catch (AssertionFailedError e) {
- throw e;
- } finally {
- }
- }
-
- protected CompilationUnitDeclaration runInferTest(String s,
- String testName, String expected, InferOptions inferOptions) {
-
- return runInferTest(s, testName, expected, inferOptions,
- new DefaultInferrenceProvider());
- }
-
- protected CompilationUnitDeclaration runInferTest(String s,
- String testName, String expected, InferOptions inferOptions,
- InferrenceProvider inferrenceProvider) {
- // Non-javac part
- try {
-
- char[] source = s.toCharArray();
- CompilerOptions compilerOptions = new CompilerOptions(
- getCompilerOptions());
- compilerOptions.inferOptions = inferOptions;
- TestParser parser = new TestParser(new DefaultProblemFactory(Locale
- .getDefault()), compilerOptions, true/*
- * optimize string
- * literals
- */, false);
-
- parser.javadocParser.checkDocComment = true;
-
- ICompilationUnit sourceUnit = new CompilationUnit(source, testName,
- null);
-
- CompilationUnitDeclaration compUnit = parser.parseCompilationUnit(
- sourceUnit, true);
-
- InferEngine inferEngine = (InferEngine)inferrenceProvider.getInferEngine();
-
- inferEngine.initialize();
- inferEngine.setCompilationUnit(compUnit);
- inferEngine.doInfer();
- if (expected != null) {
- StringBuffer sb = new StringBuffer();
- compUnit.printInferredTypes(sb);
- String result = sb.toString();
- assertEquals(expected, result);
- }
- return compUnit;
- // javac part
- } catch (AssertionFailedError e) {
- throw e;
- } finally {
- }
- }
-
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AssignmentTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AssignmentTest.java
deleted file mode 100644
index 9514ccb..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AssignmentTest.java
+++ /dev/null
@@ -1,614 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import java.util.Map;
-
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-
-public class AssignmentTest extends AbstractRegressionTest {
-
- public AssignmentTest(String name) {
- super(name);
- }
-
- protected Map getCompilerOptions() {
- Map options = super.getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportNullReference,
- CompilerOptions.ERROR);
- options.put(CompilerOptions.OPTION_ReportNoEffectAssignment,
- CompilerOptions.ERROR);
- return options;
- }
-
- /*
- * no effect assignment bug
- * http://bugs.eclipse.org/bugs/show_bug.cgi?id=27235
- */
- public void test001() {
- this.runConformTest(
- new String[] {
- "X.js",
- " var i; \n" + " function X(j) { \n"
- + " i = j; \n" + " } \n"
- + " function B() { \n"
- + " this.i =this.i; \n"
- + " } \n"
- + " function main( args) { \n"
- + " X a = new X(3); \n"
- + " print(a.i + \" \"); \n"
- + " print(a.new B().i); \n" + " } \n"
- + "} \n", }, "3 3");
- }
-
- public void test002() {
- this
- .runNegativeTest(
- new String[] {
- "X.js",
- " var a; \n"
- + " var next; \n"
- + " function foo( arg){ \n"
- + " \n"
- + " zork = zork; \n"
- + " arg = zork; \n"
- + " \n"
- + " arg = arg; // noop \n"
- + " a = a; // noop \n"
- + " this.next = this.next; // noop \n"
- + " this.next = next; // noop \n"
- + " \n"
- + " next.a = next.a; // could raise NPE \n"
- + " this.next.next.a = next.next.a; // could raise NPE \n"
- + " a = next.a; // could raise NPE \n"
- + " this. a = next.a; \n" + " } \n"
- + "\n", },
- "----------\n"
- + "2. ERROR in X.js (at line 5)\n"
- + " zork = zork; \n"
- + " ^^^^\n"
- + "zork cannot be resolved\n"
- + "----------\n"
- + "3. ERROR in X.js (at line 6)\n"
- + " arg = zork; \n"
- + " ^^^^\n"
- + "zork cannot be resolved\n"
- + "----------\n"
- + "4. ERROR in X.js (at line 8)\n"
- + " arg = arg; // noop \n"
- + " ^^^^^^^^^\n"
- + "The assignment to variable arg has no effect\n"
- + "----------\n"
- + "5. ERROR in X.js (at line 9)\n"
- + " a = a; // noop \n"
- + " ^^^^^\n"
- + "The assignment to variable a has no effect\n"
- + "----------\n"
- + "6. ERROR in X.js (at line 10)\n"
- + " this.next = this.next; // noop \n"
- + " ^^^^^^^^^^^^^^^^^^^^^\n"
- + "The assignment to variable next has no effect\n"
- + "----------\n"
- + "7. ERROR in X.js (at line 11)\n"
- + " this.next = next; // noop \n"
- + " ^^^^^^^^^^^^^^^^\n"
- + "The assignment to variable next has no effect\n"
- + "----------\n");
- }
-
- // // final multiple assignment
- // public void test020() {
- // this.runNegativeTest(
- // new String[] {
- // "X.js",
- // " function foo() {\n" +
- // " var v;\n" +
- // " for (var i = 0; i < 10; i++) {\n" +
- // " v = i;\n" +
- // " }\n" +
- // " v = 0;\n" +
- // " }\n" +
- // "\n",
- // },
- // "----------\n" +
- // "1. ERROR in X.js (at line 4)\n" +
- // " v = i;\n" +
- // " ^\n" +
- // "The final local variable v may already have been assigned\n" +
- // "----------\n" +
- // "2. ERROR in X.js (at line 6)\n" +
- // " v = 0;\n" +
- // " ^\n" +
- // "The final local variable v may already have been assigned\n" +
- // "----------\n");
- // }
-
- // null part has been repeated into NullReferenceTest#test1033
- public void test033() {
- this
- .runNegativeTest(
- new String[] {
- "X.js",
- " \n" + " function foo() {\n" + " var a,b;\n"
- + " do{\n" + " a=\"Hello \";\n"
- + " }while(a!=null);\n" + " \n"
- + " if(a!=null)\n" + " {\n"
- + " b=\"World!\";\n" + " }\n"
- + " println(a+b);\n" + " }\n" + "\n", },
- "----------\n"
- + "1. ERROR in X.js (at line 6)\n"
- + " }while(a!=null);\n"
- + " ^\n"
- + "The variable a cannot be null; it was either set to a non-null value or assumed to be non-null when last used\n"
- + "----------\n"
- + "2. ERROR in X.js (at line 8)\n"
- + " if(a!=null)\n"
- + " ^\n"
- + "The variable a can only be null; it was either set to null or checked for null when last used\n"
- + "----------\n"
- + "3. ERROR in X.js (at line 12)\n"
- + " println(a+b);\n"
- + " ^\n"
- + "The local variable b may not have been initialized\n"
- + "----------\n");
- }
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=84215
- // TODO (philippe) should move to InitializationTest suite
- public void test034() {
- this.runConformTest(new String[] {
- "X.js",
- "public final class X \n" + "{\n" + " var vdg;\n"
- + " var aa = null;\n" + " var a = 14;\n"
- + " var b = 3;\n" + " var c = 12;\n"
- + " var d = 2; \n" + " var e = 3; \n"
- + " var f = 34; \n" + " var g = 35; \n"
- + " var h = 36; \n" + " var j = 4;\n"
- + " var k = 1;\n" + " var aba = 1;\n"
- + " var as = 11;\n" + " var ad = 12;\n"
- + " var af = 13;\n" + " var ag = 2;\n"
- + " var ah = 21;\n" + " var aj = 22;\n"
- + " var ak = 3;\n" + " var aaad = null;\n"
- + " var aaaf = 1;\n" + " var aaag = 2;\n"
- + " var aaha = 2;\n" + " var cxvvb = 1;\n"
- + " var z = a;\n" + " var asdff;\n" + " var ppfp;\n"
- + " var ppfpged;\n" + " boolean asfadf;\n"
- + " boolean cbxbx;\n" + " long tyt, rrky;\n"
- + " var dgjt, ykjr6y;\n" + " var krykr = 1;\n"
- + " var rykr5;\n" + " var dhfg;\n"
- + " var dthj;\n" + " var fkffy;\n"
- + " var fhfy;\n" + " var fhmf;\n"
- + " var ryur6;\n" + " var dhdthd;\n"
- + " var dth5;\n" + " var kfyk;\n" + " var ntd;\n"
- + " var asdasdads;\n" + " var dntdr = 7;\n"
- + " var asys = 1;\n" + " var djd5rwas = 11;\n"
- + " var dhds45rjd = 12;\n"
- + " var srws4jd = 13;\n" + " var s4ts = 2;\n"
- + " var dshes4 = 21;\n"
- + " var drthed56u = 22;\n"
- + " var drtye45 = 23;\n" + " var xxbxrb = 3;\n"
- + " var xfbxr = 31;\n" + " var asgw4y = 32;\n"
- + " var hdtrhs5r = 33;\n" + " var dshsh = 34;\n"
- + " var ds45yuwsuy = 4;\n"
- + " var astgs45rys = 5;\n" + " var srgs4y = 6;\n"
- + " var srgsryw45 = -6;\n"
- + " var srgdtgjd45ry = -7;\n"
- + " var srdjs43t = 1;\n"
- + " var sedteued5y = 2;\n" + " var jrfd6u;\n"
- + " var udf56u;\n" + " var jf6tu;\n"
- + " var jf6tud;\n" + " var bsrh;\n" + " X(var a)\n"
- + " {\n" + " }\n" + " long sfhdsrhs;\n"
- + " boolean qaafasdfs;\n" + " var sdgsa;\n"
- + " long dgse4;\n" + " long sgrdsrg;\n"
- + " function gdsthsr()\n" + " {\n" + " }\n"
- + " var hsrhs;\n" + " function hsrhsdsh()\n" + " {\n"
- + " }\n" + " var dsfhshsr;\n"
- + " function sfhsh4rsrh()\n" + " {\n" + " }\n"
- + " function shsrhsh()\n" + " {\n" + " }\n"
- + " function sfhstuje56u()\n" + " {\n" + " }\n"
- + " function dhdrt6u()\n" + " {\n" + " }\n"
- + " function hdtue56u()\n" + " {\n" + " }\n"
- + " function htdws4()\n" + " {\n" + " }\n"
- + " var mfmgf;\n" + " var mgdmd;\n" + " var mdsrh;\n"
- + " var nmdr;\n" + " function oyioyio()\n" + " {\n"
- + " }\n" + " long oyioyreye()\n" + " {\n"
- + " return 0;\n" + " }\n" + " long etueierh()\n"
- + " {\n" + " return 0;\n" + " }\n"
- + " function sdfgsgs()\n" + " {\n" + " }\n"
- + " function fhsrhsrh()\n" + " {\n" + " }\n" + "\n"
- + " long dcggsdg;\n" + " var ssssssgsfh;\n"
- + " long ssssssgae;\n" + " long ssssssfaseg;\n"
- + " function zzzdged()\n" + " {\n" + " }\n" + " \n"
- + " var t;\n" + " function xxxxxcbsg()\n" + " {\n"
- + " }\n" + "\n" + " \n" + " function vdg()\n" + " {\n"
- + " }\n" + " \n" + " int[] fffcvffffffasdfaef;\n"
- + " int[] fffcffffffasdfaef;\n"
- + " long[] ffcvfffffffasdfaef;\n"
- + " var fffffghffffasdfaef; \n"
- + " var fffffdffffasdfaef; \n"
- + " var ffafffffffasdfaef;\n" + " \n"
- + " function fffffffffasdfaef()\n" + " {\n" + " }\n"
- + " \n" + " boolean aaaadgasrg;\n"
- + " function ddddgaergnj()\n" + " {\n" + " }\n" + "\n"
- + " function aaaadgaeg()\n" + " {\n" + " }\n" + " \n"
- + " function aaaaaaefadfgh()\n" + " {\n" + " }\n"
- + " \n" + " function addddddddafge()\n" + " {\n"
- + " }\n" + " \n" + " boolean aaaaaaaefae;\n"
- + " function aaaaaaefaef()\n" + " {\n" + " }\n" + "\n"
- + " function ggggseae()\n" + " {\n" + " }\n" + "\n"
- + " function ggggggsgsrg()\n" + " {\n" + " }\n"
- + "\n" + " synchronized function ggggggfsfgsr()\n"
- + " {\n" + " }\n" + "\n" + " function aaaaaadgaeg()\n"
- + " {\n" + " }\n" + " \n"
- + " function aaaaadgaerg()\n" + " {\n" + " }\n"
- + " \n" + " function bbbbbbsfryghs()\n" + " {\n"
- + " }\n" + " \n" + " function bfbbbbbbfssreg()\n"
- + " {\n" + " }\n" + "\n" + " function bbbbbbfssfb()\n"
- + " {\n" + " }\n" + "\n" + " function bbbbbbfssb()\n"
- + " {\n" + " }\n" + "\n" + " function bbbbfdssb()\n"
- + " {\n" + " }\n" + " \n" + " boolean dggggggdsg;\n"
- + "\n" + " function hdfhdr()\n" + " {\n" + " }\n"
- + " \n" + " function dhdrtdrs()\n" + " {\n" + " }\n"
- + " \n" + " function dghdthtdhd()\n" + " {\n" + " }\n"
- + " \n" + " function dhdhdtdh()\n" + " {\n" + " }\n"
- + " \n" + " function fddhdsh()\n" + " {\n" + " }\n"
- + " \n" + " boolean sdffgsdg()\n" + " {\n"
- + " return true;\n" + " }\n" + " \n"
- + " boolean sdgsdg()\n" + " {\n"
- + " return false;\n" + " }\n" + " \n"
- + " function sfdgsg()\n" + " {\n" + " }\n" + "\n"
- + " int[] fghtys;\n" + "\n" + " var sdsst = 1;\n"
- + " X asdfahnr;\n"
- + " var ssdsdbrtyrtdfhd, ssdsrtyrdbdfhd;\n"
- + " var ssdsrtydbdfhd, ssdsrtydffbdfhd;\n"
- + " var ssdrtyhrtysdbdfhd, ssyeghdsdbdfhd;\n"
- + " var ssdsdrtybdfhd, ssdsdehebdfhd;\n"
- + " var ssdthrtsdbdfhd, ssdshethetdbdfhd;\n"
- + " var sstrdrfhdsdbdfhd;\n"
- + " var ssdsdbdfhd, ssdsdethbdfhd;\n"
- + " long ssdshdfhchddbdfhd;\n"
- + " long ssdsdvbbdfhd;\n" + " \n" + " \n"
- + " long ssdsdbdfhd()\n" + " {\n" + " return 0;\n"
- + " }\n" + "\n" + " long sdgsrsbsf()\n" + " {\n"
- + " return 0;\n" + " }\n" + "\n"
- + " function sfgsfgssghr()\n" + " {\n" + " }\n"
- + " \n" + " var sgsgsrg()\n" + " {\n"
- + " return null;\n" + " }\n" + "\n"
- + " function sdgshsdygra()\n" + " {\n" + " }\n"
- + "\n" + " var sdfsdfs()\n" + " {\n"
- + " return null;\n" + " }\n" + "\n"
- + " boolean ryweyer;\n" + "\n"
- + " function adfadfaghsfh()\n" + " {\n" + " }\n"
- + " \n" + " function ghasghasrg()\n" + " {\n"
- + " }\n" + "\n" + " function aadfadfaf()\n" + " {\n"
- + " }\n" + "\n" + " function aadfadf()\n" + " {\n"
- + " }\n" + " \n" + " var fgsfhwr()\n" + " {\n"
- + " return 0;\n" + " }\n" + "\n"
- + " var gdfgfgrfg()\n" + " {\n" + " return 0;\n"
- + " }\n" + "\n" + " var asdfsfs()\n" + " {\n"
- + " return 0;\n" + " }\n" + "\n" + " var sdgs;\n"
- + " var sdfsh4e;\n" + " var gsregs = 0;\n" + " \n"
- + " var sgsgsd()\n" + " {\n" + " return null;\n"
- + " }\n" + "\n"
- + " byte[] sdhqtgwsrh(String rsName, var id)\n"
- + " {\n" + " var rs = null;\n" + " try\n" + " {\n"
- + " rs = \"\";\n" + " return null;\n" + " }\n"
- + " catch (Exception ex)\n" + " {\n" + " }\n"
- + " finally\n" + " {\n" + " if (rs != null)\n"
- + " {\n" + " try\n" + " {\n"
- + " rs.toString();\n" + " }\n"
- + " catch (Exception ex)\n" + " {\n" + " }\n"
- + " }\n" + " }\n" + " return null;\n" + " }\n"
- + "\n" + " function dgagadga()\n" + " {\n" + " }\n"
- + " \n" + " var adsyasta;\n" + "}\n", }, "");
- }
-
- /*
- * Check scenario: i = i++
- * http://bugs.eclipse.org/bugs/show_bug.cgi?id=84480 disabled:
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=111898
- */
- public void test035() {
- this.runNegativeTest(new String[] {
- "X.js",
- " var f;\n" + " function foo( i) {\n" + " i = i++;\n"
- + " i = ++i;\n" + " f = f++;\n" + " f = ++f;\n"
- + " var z;" + " }\n" + "\n", }, "----------\n"
- + "1. ERROR in X.js (at line 4)\n" + " i = ++i;\n"
- + " ^^^^^^^\n" + "The assignment to variable i has no effect\n"
- + "----------\n" + "2. ERROR in X.js (at line 6)\n"
- + " f = ++f;\n" + " ^^^^^^^\n"
- + "The assignment to variable f has no effect\n"
- + "----------\n");
- }
-
- public void test036() {
- this
- .runNegativeTest(
- new String[] {
- "X.js",
- "\n" + " function foo() {\n"
- + " var o = new Object();\n"
- + " do {\n" + " o = null;\n"
- + " } while (o != null);\n"
- + " if (o == null) {\n"
- + " // throw new Exception();\n"
- + " }\n" + " }\n" + "\n", },
- "----------\n"
- + "1. ERROR in X.js (at line 6)\n"
- + " } while (o != null);\n"
- + " ^\n"
- + "The variable o can only be null; it was either set to null or checked for null when last used\n"
- + "----------\n"
- + "2. ERROR in X.js (at line 7)\n"
- + " if (o == null) {\n"
- + " ^\n"
- + "The variable o can only be null; it was either set to null or checked for null when last used\n"
- + "----------\n");
- }
-
- // //https://bugs.eclipse.org/bugs/show_bug.cgi?id=93588
- // public void test037() {
- // this.runConformTest(
- // new String[] {
- // "X.js",
- // " class X extends Object implements Runnable {\n" +
- // " var interval = 5;\n" +
- // " function run() {\n" +
- // " try {\n" +
- // " Thread.sleep(interval = interval + 100);\n" +
- // " Thread.sleep(interval += 100);\n" +
- // " } catch (InterruptedException e) {\n" +
- // " e.printStackTrace();\n" +
- // " }\n" +
- // " }\n" +
- // "\n" +
- // " function main( args) {\n" +
- // " new X().run();\n" +
- // " }\n" +
- // "}\n",
- // },
- // "");
- // }
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=111703
- // public void test038() {
- // this.runNegativeTest(
- // new String[] {
- // "X.js",
- // "import java.awt.event.*;\n" +
- // "\n" +
- // "import javax.swing.*;\n" +
- // "import javax.swing.event.*;\n" +
- // "\n" +
- // " class X {\n" +
- // " JButton myButton = new JButton();\n" +
- // " JTree myTree = new JTree();\n" +
- // " ActionListener action;\n" +
- // " X() {\n" +
- // " action = new ActionListener() {\n" +
- // " function actionPerformed(ActionEvent e) {\n" +
- // " if (true) {\n" +
- // " // unlock document\n" +
- // " Object document = new Object();\n" +
- // " myButton.addActionListener(new ActionListener() {\n"
- // +
- // " boolean selectionChanged;\n" +
- // " TreeSelectionListener list = new TreeSelectionListener() {\n"
- // +
- // " function valueChanged(TreeSelectionEvent e) {\n"
- // +
- // " selectionChanged = true;\n" +
- // " }\n" +
- // " };\n" +
- // " {\n" +
- // " myTree.addTreeSelectionListener(list);\n" +
- // " }\n" +
- // " function actionPerformed(ActionEvent e) {\n" +
- // " if(!selectionChanged)\n" +
- // " myButton.removeActionListener(this);\n" +
- // " }\n" +
- // " });\n" +
- // " }\n" +
- // " }\n" +
- // " };\n" +
- // " }\n" +
- // " function main( args) {\n" +
- // " new X();\n" +
- // " }\n" +
- // "\n" +
- // "}",
- // },
- // "----------\n" +
- // "1. WARNING in X.js (at line 19)\n" +
- // " function valueChanged(TreeSelectionEvent e) {\n" +
- // " ^\n" +
- // "The parameter e is hiding another local variable defined in an enclosing type scope\n"
- // +
- // "----------\n" +
- // "2. ERROR in X.js (at line 23)\n" +
- // " {\n" +
- // " ^\n" +
- // "Cannot define initializer in inner type new ActionListener(){}\n" +
- // "----------\n" +
- // "3. ERROR in X.js (at line 24)\n" +
- // " myTree.addTreeSelectionListener(list);\n" +
- // " ^^^^^^\n" +
- // "Cannot make a reference to the non- field myTree\n" +
- // "----------\n" +
- // "4. WARNING in X.js (at line 26)\n" +
- // " function actionPerformed(ActionEvent e) {\n" +
- // " ^\n" +
- // "The parameter e is hiding another local variable defined in an enclosing type scope\n"
- // +
- // "----------\n");
- // }
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=111898
- // public void test039() {
- // this.runConformTest(
- // new String[] {
- // "X.js",
- // " class X {\n" +
- // " function main( args) {\n" +
- // " var a = 1;\n" +
- // " a = a++;\n" +
- // " print(\"a=\"+a);\n" +
- // " \n" +
- // " var b = 1;\n" +
- // " print(b = b++);\n" +
- // " println(\"b=\"+b);\n" +
- // " }\n" +
- // "}\n",
- // },
- // "a=11b=1");
- // }
- // warn upon parameter assignment
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=53773
- public void test040() {
- Map options = getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportParameterAssignment,
- CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function foo(b) {\n" + " b = false;\n" + " }\n"
- + "\n", }, "----------\n"
- + "1. ERROR in X.js (at line 2)\n" + " b = false;\n"
- + " ^\n" + "The parameter b should not be assigned\n"
- + "----------\n", null, true, options);
- }
-
- // warn upon parameter assignment
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=53773
- // diagnose within fake reachable code
- public void test041() {
- Map options = getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportParameterAssignment,
- CompilerOptions.ERROR);
- this.runNegativeTest(new String[] {
- "X.js",
- " function foo(b) {\n" + " if (false) {\n"
- + " b = false;\n" + " }\n" + " }\n" + "\n", },
- "----------\n" + "1. ERROR in X.js (at line 3)\n"
- + " b = false;\n" + " ^\n"
- + "The parameter b should not be assigned\n"
- + "----------\n", null, true, options);
- }
-
- // warn upon parameter assignment
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=53773
- // diagnose within fake reachable code
- public void test042() {
- Map options = getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportParameterAssignment,
- CompilerOptions.ERROR);
- this.runNegativeTest(new String[] {
- "X.js",
- " function foo(b) {\n" + " if (true) {\n"
- + " return;\n" + " }\n" + " b = false;\n"
- + " }\n" + "\n", }, "----------\n"
- + "1. ERROR in X.js (at line 5)\n" + " b = false;\n" + " ^\n"
- + "The parameter b should not be assigned\n" + "----------\n",
- null, true, options);
- }
-
- // // warn upon parameter assignment
- // // https://bugs.eclipse.org/bugs/show_bug.cgi?id=53773
- // // we only show the 'assignment to final' error here
- // public void test043() {
- // Map options = getCompilerOptions();
- // options.put(CompilerOptions.OPTION_ReportParameterAssignment,
- // CompilerOptions.ERROR);
- // this.runNegativeTest(
- // new String[] {
- // "X.js",
- // " class X {\n" +
- // " function foo( boolean b) {\n" +
- // " if (false) {\n" +
- // " b = false;\n" +
- // " }\n" +
- // " }\n" +
- // "}\n",
- // },
- // "----------\n" +
- // "1. ERROR in X.js (at line 4)\n" +
- // " b = false;\n" +
- // " ^\n" +
- // "The final local variable b cannot be assigned. It must be blank and not using a compound assignment\n"
- // +
- // "----------\n",
- // null, true, options);
- // }
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=100369
- public void test044() {
- this.runNegativeTest(new String[] {
- "X.js",
- " var length1 = 0;\n" + " {\n"
- + " length1 = length1; // already detected\n" + " }\n"
- + " var length2 = length2 = 0; // not detected\n"
- + " var length3 = 0;\n" + " {\n"
- + " length3 = length3 = 0; // not detected\n" + " }\n"
- + " function foo() {\n" + " var length1 = 0;\n"
- + " length1 = length1; // already detected\n"
- + " var length2 = length2 = 0; // not detected\n"
- + " var length3 = 0;\n"
- + " length3 = length3 = 0; // not detected\n" + " }\n"
- + "\n", }, "----------\n"
- + "1. ERROR in X.js (at line 3)\n"
- + " length1 = length1; // already detected\n"
- + " ^^^^^^^^^^^^^^^^^\n"
- + "The assignment to variable length1 has no effect\n"
- + "----------\n" + "2. ERROR in X.js (at line 5)\n"
- + " var length2 = length2 = 0; // not detected\n"
- + " ^^^^^^^^^^^^^^^^^^^^^\n"
- + "The assignment to variable length2 has no effect\n"
- + "----------\n" + "3. ERROR in X.js (at line 8)\n"
- + " length3 = length3 = 0; // not detected\n"
- + " ^^^^^^^^^^^^^^^^^^^^^\n"
- + "The assignment to variable length3 has no effect\n"
- + "----------\n" + "4. ERROR in X.js (at line 12)\n"
- + " length1 = length1; // already detected\n"
- + " ^^^^^^^^^^^^^^^^^\n"
- + "The assignment to variable length1 has no effect\n"
- + "----------\n" + "5. ERROR in X.js (at line 13)\n"
- + " var length2 = length2 = 0; // not detected\n"
- + " ^^^^^^^^^^^^^^^^^^^^^\n"
- + "The assignment to variable length2 has no effect\n"
- + "----------\n" + "6. ERROR in X.js (at line 15)\n"
- + " length3 = length3 = 0; // not detected\n"
- + " ^^^^^^^^^^^^^^^^^^^^^\n"
- + "The assignment to variable length3 has no effect\n"
- + "----------\n");
- }
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=133351
- public void test045() {
- this.runNegativeTest(new String[] {
- "X.js",
- " function foo() {\n"
- + " var length2 = length2 = 0; // first problem\n"
- + " var length3 = 0;\n"
- + " length3 = length3 = 0; // second problem\n"
- + " }\n" + "\n", }, "----------\n"
- + "1. ERROR in X.js (at line 2)\n"
- + " var length2 = length2 = 0; // first problem\n"
- + " ^^^^^^^^^^^^^^^^^^^^^\n"
- + "The assignment to variable length2 has no effect\n"
- + "----------\n" + "2. ERROR in X.js (at line 4)\n"
- + " length3 = length3 = 0; // second problem\n"
- + " ^^^^^^^^^^^^^^^^^^^^^\n"
- + "The assignment to variable length3 has no effect\n"
- + "----------\n");
- }
-
- public static Class testClass() {
- return AssignmentTest.class;
- }
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicAnalyseTests.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicAnalyseTests.java
deleted file mode 100644
index 49fb1e0..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicAnalyseTests.java
+++ /dev/null
@@ -1,197 +0,0 @@
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class BasicAnalyseTests extends AbstractRegressionTest {
- public BasicAnalyseTests(String name) {
- super(name);
- }
-
- public void testBug251374_1() {
- Map custom = new HashMap();
- custom.put("org.eclipse.wst.jsdt.core.compiler.problem.nullReference", "error");
- custom.put("org.eclipse.wst.jsdt.core.compiler.problem.potentialNullReference", "error");
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var b = null;\n" +
- "function boo() {\n" +
- "b.toString();\n" +
- "}\n" +
- "b = 2;\n" +
- "boo();"
- },
- "", null, false, custom
- );
- }
- public void testBug251374_2() {
- Map custom = new HashMap();
- custom.put("org.eclipse.wst.jsdt.core.compiler.problem.nullReference", "error");
- custom.put("org.eclipse.wst.jsdt.core.compiler.problem.potentialNullReference", "error");
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var b = null;\n" +
- "function boo() {\n" +
- "b.toString();\n" +
- "}\n" +
- "boo();"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 3)\n" +
- " b.toString();\n" +
- " ^\n" +
- "Null pointer access: The variable b can only be null at this location\n" +
- "----------\n", null, false, custom
- );
- }
-
- public void testBug251374_3() {
- Map custom = new HashMap();
- custom.put("org.eclipse.wst.jsdt.core.compiler.problem.nullReference", "error");
- custom.put("org.eclipse.wst.jsdt.core.compiler.problem.potentialNullReference", "error");
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var b = null;\n" +
- "function boo() {\n" +
- "b = null\n" +
- "b.toString();\n" +
- "}\n" +
- "b = 2;\n" +
- "boo();"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 4)\n" +
- " b.toString();\n" +
- " ^\n" +
- "Null pointer access: The variable b can only be null at this location\n" +
- "----------\n", null, false, custom
- );
- }
-
- public void testBug251374_4() {
- Map custom = new HashMap();
- custom.put("org.eclipse.wst.jsdt.core.compiler.problem.nullReference", "error");
- custom.put("org.eclipse.wst.jsdt.core.compiler.problem.potentialNullReference", "error");
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var b = null;\n" +
- "function boo() {\n" +
- "b = null\n" +
- "b.toString();\n" +
- "}\n" +
- "b = 2;\n" +
- "boo();\n" +
- "b.toString();"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 4)\n" +
- " b.toString();\n" +
- " ^\n" +
- "Null pointer access: The variable b can only be null at this location\n" +
- "----------\n", null, false, custom
- );
- }
-
- public void testBug251374_5() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var b = null;\n" +
- "function boo() {\n" +
- "b = null\n" +
- "b.toString();\n" +
- "}\n" +
- "b = 2;\n" +
- "boo();\n" +
- "b.toString();"
- },
- ""
- );
- }
-
- public void testBug286029_1() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var sub;\n" +
- "if(!sub) sub = {};"
- },
- ""
- );
- }
-
- public void testBug286029_2() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function abc() {\n" +
- "var sub;\n" +
- "if(!sub) sub = {};\n" +
- "}"
- },
- "----------\n" +
- "1. WARNING in X.js (at line 3)\n" +
- " if(!sub) sub = {};\n" +
- " ^^^\n" +
- "The local variable sub may not have been initialized\n" +
- "----------\n"
- );
- }
-
- public void testBug286029_3() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function abc() {\n" +
- "var sub; sub = {};\n" +
- "if(!sub) sub = {};\n" +
- "}"
- },
- ""
- );
- }
-
- public void testBug251225_1() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var temp = function () {};\n" +
- "temp();"
- },
- ""
- );
- }
-
- public void testBug251225_2() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var temp = function () {};\n" +
- "new temp();"
- },
- ""
- );
- }
-
- public void testBug251225_3() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function testFunction() {\n" +
- "var temp = function () {};\n" +
- "function temp2(){}" +
- "new temp2();}"
- },
- "----------\n" +
- "1. WARNING in X.js (at line 2)\n" +
- " var temp = function () {};\n" +
- " ^^^^\n" +
- "The local variable temp is never read\n" +
- "----------\n"
- );
- }
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicErrorTests.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicErrorTests.java
deleted file mode 100644
index 7c835d4..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicErrorTests.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
-
-public class BasicErrorTests extends AbstractRegressionTest {
-
- public BasicErrorTests(String name) {
- super(name);
-
- }
- public void test001() {
- CompilationUnitDeclaration declaration = this.runParseTest(
- "function foo(){\n" +
- " var c;\n" +
- " var d;\n" +
- " c.\n" +
- "}\n",
- "X.js",
- "function foo(){\n" +
- " var c;\n" +
- " var d;\n" +
- " c.\n" +
- "\n"
-
- );
- }
-
- public void test002() {
- CompilationUnitDeclaration declaration = this.runParseTest(
- "package p;\n" +
- "/**\n" +
- " * @category test\n" +
- " */\n" +
- "public class Y {\n" +
- "}\n",
- "X.js",
- "function foo(){\n" +
- " var c;\n" +
- " var d;\n" +
- " c.\n" +
- "\n"
-
- );
- }
-
-
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicJsdocTests.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicJsdocTests.java
deleted file mode 100644
index 3f4965d..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicJsdocTests.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
-
-public class BasicJsdocTests extends AbstractRegressionTest {
-
- public BasicJsdocTests(String name) {
- super(name);
-
- }
- public void test001() {
- CompilationUnitDeclaration declaration = this.runJSDocParseTest(
- "/**\n"
- + " * Valid class javadoc\n"
- + " * @param p1 param def\n"
- + " */\n"
- +"function foo(p1){}" +
- "\n",
- "X.js",
- "/**\n" +
- " * @param p1\n" +
- " */\n" +
- "function foo(p1) {\n}" +
- "\n"
-
- );
- }
-
- public void test002() {
- CompilationUnitDeclaration declaration = this.runJSDocParseTest(
- "/**\n"
- + " * Valid class javadoc\n"
- + " * @param {String} p1 param def\n"
- + " */\n"
- +"function foo(p1){}" +
- "\n",
- "X.js",
- "/**\n" +
- " * @param {String} p1\n" +
- " */\n" +
- "function foo(p1) {\n}" +
- "\n"
-
- );
- }
-
-// public void test002b() {
-// CompilationUnitDeclaration declaration = this.runJSDocParseTest(
-// "/**\n"
-// + " * Valid class javadoc\n"
-// + " * @param {String} p1 param def\n"
-// + " */\n"
-// +"function foo(p1){}" +
-// "\n",
-// "X.js",
-// "/**\n" +
-// " * @param {String*} p1\n" +
-// " */\n" +
-// "function foo(p1) {\n}" +
-// "\n"
-//
-// );
-// }
- public void test003() {
- CompilationUnitDeclaration declaration = this.runJSDocParseTest(
- "/**\n"
- + " * Valid class javadoc\n"
- + " * @param {String|Number} p1 param def\n"
- + " */\n"
- +"function foo(p1){}" +
- "\n",
- "X.js",
- "/**\n" +
- " * @param {String|Number} p1\n" +
- " */\n" +
- "function foo(p1) {\n}" +
- "\n"
-
- );
- }
- public void test004() {
- CompilationUnitDeclaration declaration = this.runJSDocParseTest(
- "/**\n"
- + " * Valid class javadoc\n"
- + " * @constructor \n"
- + " */\n"
- +"function foo(p1){}" +
- "\n",
- "X.js",
- "/**\n" +
- " * @constructor\n" +
- " */\n" +
- "function foo(p1) {\n}" +
- "\n"
-
- );
- }
- public void test005() {
- CompilationUnitDeclaration declaration = this.runJSDocParseTest(
- "/**\n"
- + " * Valid class javadoc\n"
- + " * @type String \n"
- + " */\n"
- +"function foo(p1){}" +
- "\n",
- "X.js",
- "/**\n" +
- " * @type String\n" +
- " */\n" +
- "function foo(p1) {\n}" +
- "\n"
-
- );
- }
-
- public void test006() {
- CompilationUnitDeclaration declaration = this.runJSDocParseTest(
- "/**\n"
- + " * Valid class javadoc\n"
- + " * @private \n"
- + " */\n"
- +"function foo(p1){}" +
- "\n",
- "X.js",
- "/**\n" +
- " * @private\n" +
- " */\n" +
- "function foo(p1) {\n}" +
- "\n"
-
- );
- }
-
- public void test007() {
- CompilationUnitDeclaration declaration = this.runJSDocParseTest(
- "/**\n"
- + " * Valid class javadoc\n"
- + " * @member MyClass \n"
- + " */\n"
- +"function foo(p1){}" +
- "\n",
- "X.js",
- "/**\n" +
- " * @member MyClass\n" +
- " */\n" +
- "function foo(p1) {\n}" +
- "\n"
-
- );
- }
-
- public void test008() {
- CompilationUnitDeclaration declaration = this.runJSDocParseTest(
- "/**\n"
- + " * Valid class javadoc\n"
- + " * @base MyClass \n"
- + " */\n"
- +"function foo(p1){}" +
- "\n",
- "X.js",
- "/**\n" +
- " * @extends MyClass\n" +
- " */\n" +
- "function foo(p1) {\n}" +
- "\n"
-
- );
- }
-
- public void test010() {
- CompilationUnitDeclaration declaration = this.runJSDocParseTest(
- "i= { \n"+
- "/**\n" +
- " * @type Number\n" +
- " */\n" +
- " a: 2 ,\n"+
- "/**\n" +
- " * @type Int\n" +
- " */\n" +
- " b: 3+4};" +
- "\n",
- "X.js",
- "i = {\n"+
- " /**\n" +
- " * @type Number\n" +
- " */\n" +
- "a : 2,\n"+
- " /**\n" +
- " * @type Int\n" +
- " */\n" +
- "b : (3 + 4)\n};" +
- "\n"
- );
-
-
- }
-
-
-
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicParserTests.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicParserTests.java
deleted file mode 100644
index 3e0d568..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicParserTests.java
+++ /dev/null
@@ -1,1017 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
-
-public class BasicParserTests extends AbstractRegressionTest {
-
- public BasicParserTests(String name) {
- super(name);
-
- }
- public void test001() {
- CompilationUnitDeclaration declaration = this.runParseTest(
- "{i=1;}" +
- "\n",
- "X.js",
- "{\n i = 1;\n}" +
- "\n"
-
- );
- }
- public void test002() { // missing semicolon
- CompilationUnitDeclaration declaration = this.runParseTest(
- "i=1\n" +
- "j=2;" +
- "\n",
- "X.js",
- "i = 1;\n" +
- "j = 2;" +
- "\n"
-
- );
- }
-
- public void test003() { // var
- CompilationUnitDeclaration declaration = this.runParseTest(
- "var i=1,c=4;" +
- "\n",
- "X.js",
- "var i = 1, c = 4;" +
- "\n"
- );
-
- this.runParseTest(
- "var i=1,c;" +
- "\n",
- "X.js",
- "var i = 1, c;" +
- "\n"
- );
- }
-
- public void test003a() { // var
- CompilationUnitDeclaration declaration = this.runParseTest(
- "var foo=null;" +
- "\n",
- "X.js",
- "var foo = null;" +
- "\n"
- );
-
- this.runParseTest(
- "var i=1,c;" +
- "\n",
- "X.js",
- "var i = 1, c;" +
- "\n"
- );
- }
-
- public void test004() { // functions
- this.runParseTest(
- "function abc(){}" +
- "\n",
- "X.js",
- "function abc() {\n}" +
- "\n"
- );
-
- }
-
- public void test004a() { // functions
- this.runParseTest(
- "function abc(a){}" +
- "\n",
- "X.js",
- "function abc(a) {\n}" +
- "\n"
- );
-
- }
-
- public void test004b() { // functions
- this.runParseTest(
- "function abc(a,b){i=1;}" +
- "\n",
- "X.js",
- "function abc(a, b) {\n i = 1;\n}" +
- "\n"
- );
-
- }
-
- public void test005a() { // expressions
- this.runParseTest(
- "i=this.v1+4;" +
- "\n",
- "X.js",
- "i = (this.v1 + 4);" +
- "\n"
- );
-
- }
-
- public void test005b() { // expressions
- this.runParseTest(
- "i=funccall(c,b);" +
- "i=cc.funccall(c,b);" +
- "i=dd.cc.funccall(c,b);" +
- "\n",
- "X.js",
- "i = funccall(c, b);\n" +
- "i = cc.funccall(c, b);\n" +
- "i = dd.cc.funccall(c, b);" +
- "\n"
- );
-
- }
-
-
- public void test005b2() { // expressions
- this.runParseTest(
- "i=funccall().methCall();" +
- "\n",
- "X.js",
- "i = funccall().methCall();" +
- "\n"
- );
-
- }
-
- public void test005d() { // expressions
- this.runParseTest(
- "i= function (c,b) {i=2;}" +
- "\n",
- "X.js",
- "i = function (c, b) {\n i = 2;\n};" +
- "\n"
- );
-
- }
-
- public void test005e() { // expressions/
- this.runParseTest(
- "i= 1+(z-v);" +
- "i= ++z * v--;" +
- "\n",
- "X.js",
- "i = (1 + (z - v));\n" +
- "i = ((++ z) * (v --));" +
- "\n"
- );
-
- }
-
- public void test005f() { // expressions
- this.runParseTest(
- "i= new abc(dd);" +
- "\n",
- "X.js",
- "i = new abc(dd);" +
- "\n"
- );
-
- }
-
- public void test005f1() { // expressions
- this.runParseTest(
- "i= new dojo.uri.Uri(1,2);" +
- "\n",
- "X.js",
- "i = new dojo.uri.Uri(1, 2);" +
- "\n"
- );
-
- }
-
- public void test005f2() { // expressions
- this.runParseTest(
- "dojo.string.normalizeNewlines = function (text,newlineChar) {i=1;}" +
- "\n",
- "X.js",
- "dojo.string.normalizeNewlines = function (text, newlineChar) {\n i = 1;\n};" +
- "\n"
- );
-
- }
-
- public void test005f3() { // expressions
- this.runParseTest(
- " function foo() {\n" +
- " var maxUnits = 0;\n" +
- " var unitResult = \n" +
- " new CompilationUnitResult(\n" +
- " null, \n" +
- " i, \n" +
- " maxUnits); \n" +
- "}\n",
- "X.js",
- "function foo() {\n"+
- " var maxUnits = 0;\n"+
- " var unitResult = new CompilationUnitResult(null, i, maxUnits);\n"+
- "}"+
- "\n"
- );
-
- }
-
- public void test005f4() { // expressions
- this.runParseTest(
- "i= new SomeClass;" +
- "\n",
- "X.js",
- "i = new SomeClass;" +
- "\n"
- );
-
- }
-
- public void test005f5() { // expressions
- this.runParseTest(
- "function f(){\n" +
- "i= new SomeClass \n}" +
- "\n",
- "X.js",
- "function f() {\n" +
- " i = new SomeClass;\n" +
- "}" +
- "\n"
- );
-
- }
-
- public void test005f6() { // expressions
- this.runParseTest(
- " function X(i){} \n" +
- " function foo(){ \n" +
- " var j = 0; \n" +
- " var x = new X(j); \n" +
- "} " +
- "\n",
- "X.js",
- "function X(i) {\n" +
- "}\n" +
- "function foo() {\n" +
- " var j = 0;\n" +
- " var x = new X(j);\n" +
- "}" +
- "\n"
- );
-
- }
-
-
-
- public void test005g1() { // expressions
- this.runParseTest(
- "i= typeof objpath != \"string\";" +
- "\n",
- "X.js",
- "i = ((typeof objpath) != \"string\");" +
- "\n"
- );
-
- }
-
- public void test005g2() { // expressions
- this.runParseTest(
- "i= ar instanceof Error;" +
- "\n",
- "X.js",
- "i = (ar instanceof Error);" +
- "\n"
- );
- }
-
- public void test005g3() { // expressions
- this.runParseTest(
- "i= anArg.name != null ;" +
- "\n",
- "X.js",
- "i = (anArg.name != null);" +
- "\n"
- );
- }
-
- public void test005g4() { // expressions
- this.runParseTest(
- "i= anArg.name != undefined ;" +
- "\n",
- "X.js",
- "i = (anArg.name != undefined);" +
- "\n"
- );
- }
-
- public void test005h1() { // expressions
- this.runParseTest(
- "i= { a: 2 , b: 3+4};" +
- "\n",
- "X.js",
- "i = {\n a : 2,\n b : (3 + 4)\n};" +
- "\n"
- );
-
-}
-
- public void test005h1a() { // expressions
- this.runParseTest(
- "i= { 'a': 2 , 'b': 3+4};" +
- "\n",
- "X.js",
- "i = {\n \"a\" : 2,\n \"b\" : (3 + 4)\n};" +
- "\n"
- );
-
-}
-
- public void test005h2() { // expressions
- this.runParseTest(
- "i= { a: function(){ var ar={c:3,d:4,e:4}; } , b: function(cc){ var c=1;} , d:function(){}};" +
- "\n",
- "X.js",
- "i = {\n a : function () {\n var ar = {\n c : 3,\n d : 4,\n e : 4\n };\n},\n b : function (cc) {\n var c = 1;\n},\n d : function () {\n}\n};" +
- "\n"
- );
-
-}
-
- public void test005i() { // expressions
- this.runParseTest(
- "i= arr[4];" +
- "\n",
- "X.js",
- "i = arr[4];" +
- "\n"
- );
- }
- public void test005i1() { // expressions
- this.runParseTest(
- "arr[4]=1;" +
- "\n",
- "X.js",
- "arr[4] = 1;" +
- "\n"
- );
- }
- public void test005i2() { // expressions
- this.runParseTest(
- "var arr=null;" +
- "arr[4]=1;" +
- "\n",
- "X.js",
- "var arr = null;\n" +
- "arr[4] = 1;" +
- "\n"
- );
- }
- public void test005j() { // expressions
- this.runParseTest(
- "i= [a,b];" +
- "\n",
- "X.js",
- "i = [a, b];" +
- "\n"
- );
- }
-
- public void test005j2() { // expressions
- this.runParseTest(
- "i= [,a];" +
- "\n",
- "X.js",
- "i = [, a];" +
- "\n"
- );
- }
-
- public void test005j3() { // expressions
- this.runParseTest(
- "i= [a,];" +
- "\n",
- "X.js",
- "i = [a, ];" +
- "\n"
- );
- }
-
- public void test005j4() { // expressions
- this.runParseTest(
- "i= [,];" +
- "\n",
- "X.js",
- "i = [, ];" +
- "\n"
- );
- }
-
- public void test005j5() { // expressions
- this.runParseTest(
- "i= [];" +
- "\n",
- "X.js",
- "i = [];" +
- "\n"
- );
- }
- public void test005j6() { // expressions
- this.runParseTest(
- "i= [a,,b];" +
- "\n",
- "X.js",
- "i = [a, , b];" +
- "\n"
- );
- }
-
- public void test005j7() { // expressions
- this.runParseTest(
- "i= [,,];" +
- "i= [,,,];" +
- "i= [,,b,];" +
- "\n",
- "X.js",
- "i = [, , ];\n" +
- "i = [, , , ];\n" +
- "i = [, , b, ];" +
- "\n"
- );
- }
-
- public void test005j8() { // expressions
- this.runParseTest(
- "i= [a,b,,c];" +
- "\n",
- "X.js",
- "i = [a, b, , c];" +
- "\n"
- );
- }
-
- public void test007() { // if
- this.runParseTest(
- "if (a>1) this.c=f+5;" +
- "\n",
- "X.js",
- "if ((a > 1))\n this.c = (f + 5);" +
- "\n"
- );
- }
-
- public void test008() { // try catch
- this.runParseTest(
- "try { a=2;} catch (ex) {a=3;}" +
- "\n",
- "X.js",
- "try \n {\n a = 2;\n }\ncatch (ex) {\n a = 3;\n }" +
- "\n"
- );
- }
-
- public void test009() { // for
- this.runParseTest(
- "for (i=1;i<3;i++)\n" +
- " f++;" +
- "\n",
- "X.js",
- "for (i = 1; (i < 3); i ++) \n f ++;"+
- "\n"
- );
- }
- public void test009a() { // for
- this.runParseTest(
- "for (;i<3;i++)\n" +
- " f++;" +
- "\n",
- "X.js",
- "for (; (i < 3); i ++) \n f ++;"+
- "\n"
- );
- }
-
- public void test010() { // for in
- this.runParseTest(
- "for (var a in this.vars)\n" +
- " f++;" +
- "\n",
- "X.js",
- "for (var a in this.vars) \n f ++;"+
- "\n"
- );
- }
-
-
- public void test011() { // for in
- this.runParseTest(
- "with (foo)\n" +
- " bar;" +
- "\n",
- "X.js",
- "with (foo)\n"+
- " bar;\n"
- );
- }
-
- public void test010a() { // for in
- this.runParseTest(
- "for (a in this.vars)\n" +
- " f++;" +
- "\n",
- "X.js",
- "for (a in this.vars) \n f ++;"+
- "\n"
- );
- }
-
-
- public void test015() { // missing semicolon
- this.runParseTest(
- " function bar() \n{\n" +
- " System.out.println()\n" +
- " }\n" ,
- "X.js",
- "function bar() {\n"+
- " System.out.println();\n" +
- "}\n"
- );
- }
-
- public void test015a() { // missing semicolon
- this.runParseTest(
- "function bar() {\n"+
- " System.out\n" +
- "}\n",
- "X.js",
- "function bar() {\n"+
- " System.out;\n" +
- "}\n"
- );
- }
-
- public void test020() { // missing semicolon
- this.runParseTest(
- "function Bob(firstname, lastname) {\n" +
- " var Firstname = firstname;\n" +
- " var Lastname = lastname;\n" +
- "}\n" +
- "Bob.prototype.name = function () {return this.Fistname + this.Lastname;};\n",
- "X.js",
- "function Bob(firstname, lastname) {\n" +
- " var Firstname = firstname;\n" +
- " var Lastname = lastname;\n" +
- "}\n" +
- "Bob.prototype.name = function () {\n return (this.Fistname + this.Lastname);\n};\n"
- );
- }
-
- public void test022() {
- this.runParseTest(
- "var SingleQuote = {\n" +
- " Version: '1.1-beta2' \n" +
- "}\n",
- "X.js",
- "var SingleQuote = {\n" +
- " Version : \"1.1-beta2\"\n" +
- "};\n"
- );
- }
-
- public void test023() {
- this.runParseTest(
- "var Try = { \n" +
- " these: function() { \n" +
- " var returnValue; \n" +
- " } \n"+
- " } \n",
- "X.js",
- "var Try = {\n" +
- " these : function () {\n" +
- " var returnValue;\n" +
- "}\n"+
- "};\n"
- );
- }
-
- public void test024() {
- this.runParseTest(
- "var Try = { \n" +
- " these: function() { \n" +
- " var returnValue; \n" +
- " } \n" +
- "};",
- "X.js",
- "var Try = {\n" +
- " these : function () {\n" +
- " var returnValue;\n" +
- "}\n" +
- "};\n"
- );
- }
-
-
- public void test026() {
- this.runParseTest(
- "String.replace(/&/g, '&amp;');",
- "X.js",
- "String.replace(/&/g, \"&amp;\");\n"
- );
- }
-
- public void test027() {
- this.runParseTest(
- " (!options) ? options = {} : '';",
- "X.js",
- "((! options) ? (options = {}) : \"\");\n"
- );
- }
-
- public void test027b() {
- this.runParseTest(
- " (!options) ? '' : options = {};",
- "X.js",
- "((! options) ? \"\" : (options = {}));\n"
- );
- }
-
- public void test028() {
- this.runParseTest(
- " if (typeof dojo==\"undefined\"){ \n" +
- " function dj_undef(){ \n" +
- " } \n" +
- "}",
- "X.js",
- "if (((typeof dojo) == \"undefined\"))\n" +
- " {\n" +
- " function dj_undef() {\n" +
- " }\n" +
- " }\n"
- );
- }
-
- public void test029() {
- this.runParseTest(
- " abc();",
- "X.js",
- "abc();\n"
- );
- }
-
- public void test030() {
- this.runParseTest(
- " \"cc\".abc();",
- "X.js",
- "\"cc\".abc();\n"
- );
- }
-
- public void test031() {
- this.runParseTest(
- "var a = 1;\n" +
- "// test unicode \\u00a var a =1; \n" +
- "var b = 2; \n",
- "X.js",
- "var a = 1;\n" +
- "var b = 2;\n"
- );
- }
- public void test032() {
- this.runParseTest(
- "var a = 1;\n" +
- "/* \n" +
- "* test unicode \\u00a var a =1; \n " +
- "*/" +
- "var b = 2; \n",
- "X.js",
- "var a = 1;\n" +
- "var b = 2;\n"
- );
- }
-
- public void test033() {
- this.runParseTest(
- "var a = \"a\\>\";\n",
- "X.js",
- "var a = \"a>\";\n"
- );
- }
-
- public void test034() {
- this.runParseTest(
- "label: for (var i = 0; i < 10; i++) {\n" +
- " continue label;\n" +
- "}",
- "X.js",
- "label: for (var i = 0;; (i < 10); i ++) \n" +
- " {\n"+
- " continue label;\n"+
- " }\n"
- );
- }
-
-
- public void test035() {
- // check a unicode " in string. The expected " is escaped
- // because of the way the test framework works. It converts
- // special characters to a character representation before
- // doing the compare.
- this.runParseTest(
- "\"abc\\u0022def\";\n",
- "X.js",
- "\"abc\\\"def\";\n"
- );
- }
-
- public void test036() {
- this.runParseTest(
- "'abc\\u0027def';\n",
- "X.js",
- "\"abc\\'def\";\n"
- );
- }
-
- public void test037() {
- // check a unicode " in string. The expected " is escaped
- // because of the way the test framework works. It converts
- // special characters to a character representation before
- // doing the compare.
- this.runParseTest(
- "\"\\u0022def\";\n",
- "X.js",
- "\"\\\"def\";\n"
- );
- }
-
- public void test038() {
- // check a unicode " in string. The expected " is escaped
- // because of the way the test framework works. It converts
- // special characters to a character representation before
- // doing the compare.
- this.runParseTest(
- "\"abc\\x22def\";\n",
- "X.js",
- "\"abc\\\"def\";\n"
- );
- }
-
- public void test039() {
- // check a unicode " in string. The expected " is escaped
- // because of the way the test framework works. It converts
- // special characters to a character representation before
- // doing the compare.
- this.runParseTest(
- "\"\\x22def\";\n",
- "X.js",
- "\"\\\"def\";\n"
- );
- }
-
- public void test040() {
- this.runParseTest(
- "var onStart = function() { \n" +
- " this.onStart.fire();\n" +
- " this.runtimeAttributes = {};\n" +
- " for (var attr in this.attributes) {\n" +
- " this.xyz(attr);\n" +
- " }\n" +
- "};",
- "X.js",
- "var onStart = function () {\n" +
- " this.onStart.fire();\n" +
- " this.runtimeAttributes = {};\n" +
- " for (var attr in this.attributes) \n" +
- " {\n" +
- " this.xyz(attr);\n" +
- " }\n" +
- "};\n"
- );
- }
-
- public void test041() {
- // check a unicode " in string. The expected " is escaped
- // because of the way the test framework works. It converts
- // special characters to a character representation before
- // doing the compare.
- this.runParseTest(
- "(function (){});\n",
- "X.js",
- "function () {\n};\n"
- );
- }
-
-
- public void test042() {
- // check a unicode " in string. The expected " is escaped
- // because of the way the test framework works. It converts
- // special characters to a character representation before
- // doing the compare.
- this.runParseTest(
- "function trim(oldString)\n" +
- "{\n" +
- "var newString = oldString;\n" +
- "var safety = 0;\n" +
- "var safetyLimit = 10000;\n" +
- "while(newString.charAt(0) == \" \" && safety < safetyLimit){\n" +
- " newString = newString.substring(1);\n" +
- " safety++;\n" +
- "}\n" +
- "while(newString.charAt(newString.length-1) == \" \" && safety < safetyLimit){\n" +
- "newString = newString.substring(0, newString.length-1);\n" +
- " safety++\n" +
- " }\n" +
- "return newString;\n" +
- "};",
- "X.js",
-
- "function trim(oldString) {\n" +
- " var newString = oldString;\n" +
- " var safety = 0;\n" +
- " var safetyLimit = 10000;\n" +
- " while (((newString.charAt(0) == \" \") && (safety < safetyLimit))) {\n" +
- " newString = newString.substring(1);\n" +
- " safety ++;\n" +
- " }\n" +
- " while (((newString.charAt((newString.length - 1)) == \" \") && (safety < safetyLimit))) {\n" +
- " newString = newString.substring(0, (newString.length - 1));\n" +
- " safety ++;\n" +
- " }\n" +
- " return newString;\n" +
- "}\n" +
- ";\n"
- );
- }
-
-
-
-
- public void test043() {
- this.runParseTest(
- "Foo=function(){}\nbar=function(){}",
- "X.js",
- "Foo = function () {\n};\nbar = function () {\n};\n"
- );
- }
-
-
- public void test044() {
- this.runParseTest(
- "ptr[i]();",
- "X.js",
- "ptr[i]();\n"
- );
- }
-
-
-
- public void test045() {
- // make sure divide not seen as regex
- this.runParseTest(
- "((weight + 1)/2)",
- "X.js",
- "((weight + 1) / 2);\n"
- );
- }
-
- public void test046() {
- // make sure divide not seen as regex
- this.runParseTest(
- "a=1,b=2",
- "X.js",
- "(a = 1), (b = 2);\n"
- );
- }
-
- public void test046b() {
- // make sure divide not seen as regex
- this.runParseTest(
- "a=1,funcall(0),5",
- "X.js",
- "(a = 1), funcall(0), 5;\n"
- );
- }
-
- public void test050() {
- // make sure divide not seen as regex
- this.runParseTest(
- "if (true) var c=1;",
- "X.js",
- "if (true)\n var c = 1;\n"
- );
- }
-
- public void test051() {
- // method on function object
- this.runParseTest(
- "var c=function(){}.bind();",
- "X.js",
- "var c = function () {\n}.bind();\n"
- );
- }
-
- public void test051b() {
- // method on function object
- this.runParseTest(
-
- "transforms = map(function (){\n"+
- "}.bind()).reject(function (){\n"+
- "});",
-
- "X.js",
- "transforms = map(function () {\n"+
- "}.bind()).reject(function () {\n"+
- "});\n"
- );
- }
-
-
- public void test051c() {
- // method on function object
- this.runParseTest(
-
- "map(function(){"+
- "if(true) {"+
- "} else if(true)"+
- "var components = value.match(),"+
- "unit = null;"+
- "}.bind(this));",
-
- "X.js",
- "map(function () {\n"+
- " if (true)\n {\n"+
- " }\n else\n if (true)\n"+
- " var components = value.match(),"+
- " unit = null;"+
- "\n}.bind(this));\n"
- );
- }
-
- public void test051d() {
- this.runParseTest(
-
- "function bb(){"+
- "if(true)"+
- "var components = value.match(),"+
- "unit = null;"+
- "};",
-
- "X.js",
- "function bb() {\n"+
- " if (true)\n"+
- " var components = value.match(),"+
- " unit = null;"+
- "\n}\n;\n"
- );
- }
-
-
- public void testbug254572() {
- this.runParseTest(
-
- "var fields = ["+
- " {name: 'id', type: 'int'},"+
- " abc, userName, , 'forumtitle', 'forumid', 'author',"+
- ""+
- " {name: 'lastpost', mapping: 'lastpost', type: 'date',"+
- "dateFormat: 'timestamp'},"+
- " 'lastposter', 'excerpt'"+
- " ];"+
- ";",
-
- "X.js",
- "var fields = ["+
- "{\n name : \"id\",\n type : \"int\"\n},"+
- " abc, userName, , \"forumtitle\", \"forumid\", \"author\","+
- " {\n name : \"lastpost\",\n mapping : \"lastpost\",\n type : \"date\",\n"+
- " dateFormat : \"timestamp\"\n},"+
- " \"lastposter\", \"excerpt\""+
- "];"+
- "\n;\n"
- );
- }
-
- public void testbug248145() {
- this.runParseTest(
-
- "return \n"+
- "a+b;"+
- "",
-
- "X.js",
- "return ;\n"+
- "(a + b);"+
- "\n"
- );
- }
-
-
-
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicResolveTests.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicResolveTests.java
deleted file mode 100644
index 798168e..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicResolveTests.java
+++ /dev/null
@@ -1,1717 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-
-
-
-public class BasicResolveTests extends AbstractRegressionTest {
-
- public BasicResolveTests(String name) {
- super(name);
-
- }
- public void test002() { // local method
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function foo(){\n" +
- " abc(); \n" +
- "}\n"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " abc(); \n"+
- " ^^^\n"+
- "The function abc() is undefined\n"+
- "----------\n"
- );
-
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function foo(a){\n" +
- " foo(a); \n" +
- "}\n"
- },
- ""
- );
-
- }
-
- public void test003() { // local var
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var i;" +
- "i=1;\n" +
- "\n"
- },
- ""
- );
-
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var i;\n" +
- "i=j;\n"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " i=j;\n"+
- " ^\n"+
- "j cannot be resolved\n"+
- "----------\n"
- );
-
-
- }
-
- public void test004() { // system reference
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var win=debugger;\n" +
- "Object();\n" +
- "\n"
- },
- ""
- );
-
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var i;\n" +
- "i=j;\n"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " i=j;\n"+
- " ^\n"+
- "j cannot be resolved\n"+
- "----------\n"
- );
-
-
- }
-
- public void test005() { // system reference
- this.runNegativeTest(
- new String[] {
- "X.js",
- "Object();\n" +
- "\n"
- },
- ""
- );
-
-
- }
-
-
-// With inferred types
-
- public void test010() { // field reference
- this.runNegativeTest(
- new String[] {
- "X.js",
- "MyClass.prototype.someMethod = MyClass_someMethod;"+
- "function MyClass(){}"+
- "function MyClass_someMethod(){}"+
- "var myClassObj = new MyClass();\n"+
- "myClassObj.someMethod();\n"
- },
- ""
- );
-
-
- }
-
- public void test011() { // field reference
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function MyClass() {\n"+
- " this.url = \"\";\n"+
- " this.activate = function(){}\n"+
- "}\n"+
- "var myClassObj = new MyClass();\n"+
- "var u=myClassObj.url;\n"+
- "\n"
- },
- ""
- );
-
-
- }
-
-
- public void test012() { // field reference
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function Bob(firstname, lastname) {\n" +
- " this.Firstname = firstname;\n" +
- " this.Lastname = lastname;\n" +
- "}\n" +
- "Bob.prototype.name = function () {return this.Firstname + this.Lastname;};\n",
- },
- ""
- );
-
-
- }
-
- public void test013() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var SingleQuote = {\n" +
- " Version: '1.1-beta2' \n" +
- "}\n"
- },
- ""
- );
-
- }
-
- public void test014() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var o = {x:1, y: 2, name: \"print\" };\n" +
- "o.Z = 0; \n"
- },
- ""
- );
-
- }
-
-
-
- public void test020() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function foo() {\n" +
- " var t = new Test();\n" +
- "}\n" +
- " function Test()\n" +
- "{\n" +
- "}\n"
- },
- "----------\n" +
- "1. WARNING in X.js (at line 2)\n" +
- " var t = new Test();\n" +
- " ^\n" +
- "The local variable t is never read\n" +
- "----------\n"
- );
-
- }
- public void test021() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function foo() {\n" +
- " var i=1;\n" +
- " if (2>i )\n" +
- " foo();\n" +
- "}\n"
- },
- ""
- );
-
- }
-
- public void test022() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function foo() {\n" +
- " var ff=function(p) \n" +
- " {var c=p;};\n" +
- " ff(1);\n" +
- "}\n"
- },
- "----------\n" +
- "1. WARNING in X.js (at line 3)\n" +
- " {var c=p;};\n" +
- " ^\n" +
- "The local variable c is never read\n" +
- "----------\n"
- );
-
- }
-
- public void test022b() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " var ff=function(p) \n" +
- " {var c=p;};\n" +
- " ff(1);\n" +
- ""
- },
- "----------\n" +
- "1. WARNING in X.js (at line 2)\n" +
- " {var c=p;};\n" +
- " ^\n" +
- "The local variable c is never read\n" +
- "----------\n"
- );
-
- }
-
-
- public void test023() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " var ff=new String();\n" +
- ""
- },
- ""
- );
-
- }
-
- public void test024() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function bar() {;\n" +
- "return Test.x;\n" +
- "}\n" +
- "Test.prototype=new Object();\n" +
- "Test.x=1;\n" +
- ""
- },
- ""
- );
-
- }
-
- public void test025() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function g() {\n" +
- "return null;\n" +
- "}\n" +
- "function foo() {\n" +
- " g();\n" +
- "}\n" +
- ""
- },
- ""
- );
-
- }
-
- public void test026() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var i=[10];\n" +
- ""
- },
- ""
- );
-
- }
-
-
- public void test027() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function bar(vv) {;\n" +
- "return vv%4;\n" +
- "}\n" +
- ""
- },
- ""
- );
-
- }
-
- public void test028() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var c=false;\n" +
- "var d=!c;\n" +
- ""
- },
- ""
- );
-
- }
-
- public void test029() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var d=new Date(1);\n" +
- ""
- },
- ""
- );
-
- }
-
-
- public void test030() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function foo(e) {\n" +
- "var x= 10, z = null, i, j;\n" +
- "}\n" +
- ""
- },
- "----------\n" +
- "1. WARNING in X.js (at line 2)\n" +
- " var x= 10, z = null, i, j;\n" +
- " ^\n" +
- "The local variable x is never read\n" +
- "----------\n" +
- "2. WARNING in X.js (at line 2)\n" +
- " var x= 10, z = null, i, j;\n" +
- " ^\n" +
- "The local variable z is never read\n" +
- "----------\n" +
- "3. WARNING in X.js (at line 2)\n" +
- " var x= 10, z = null, i, j;\n" +
- " ^\n" +
- "The local variable i is never read\n" +
- "----------\n" +
- "4. WARNING in X.js (at line 2)\n" +
- " var x= 10, z = null, i, j;\n" +
- " ^\n" +
- "The local variable j is never read\n" +
- "----------\n"
- );
-
- }
- public void test031() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function OBJ(){}\n" +
- "var o = new OBJ();\n" +
- ""
- },
- ""
- );
-
- }
-
- public void test032() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var foo = {};\n" +
- " foo.onMouseDown = function () { return 1; };\n" +
- " foo.onMouseDown();\n" +
- ""
- },
- ""
- );
-
- }
-
- public void test032b() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var foo = {};\n" +
- " foo.level1=new Object();\n" +
- " foo.level1.onMouseDown = function () { return 1; };\n" +
- " foo.level1.onMouseDown();\n" +
- ""
- },
- ""
- );
-
- }
-
-
- public void test033() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " if (typeof abc == \"undefined\") {}\n" +
- ""
- },
- ""
- );
-
- }
-
- public void test034() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " if (true) {\n" +
- " var abc=1;}\n" +
- " var d=abc;\n" +
- ""
- },
- ""
- );
-
- }
-
- public void test035() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function foo() {\n" +
- " var vv=arguments;}\n" +
- ""
- },
- "----------\n" +
- "1. WARNING in X.js (at line 2)\n" +
- " var vv=arguments;}\n" +
- " ^^\n" +
- "The local variable vv is never read\n" +
- "----------\n"
- );
-
- }
-
-
- public void test036() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function foo() {\n" +
- " function inner(){}\n" +
- " inner();\n" +
- " }\n" +
- ""
- },
- ""
- );
-
- }
-
-
- public void test037() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " var s = new String();\n" +
- " var sub=s.substring(0,0);\n" +
- " var i=sub.length;\n" +
- ""
- },
- ""
- );
-
- }
-
- public void test038() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " s = new String();\n" +
- " sub=s.substring(0,0);\n" +
- " i=sub.length;\n" +
- ""
- },
- ""
- );
-
- }
-
-
- public void test039() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " var s = \"\";\n" +
- " with (s) {\n" +
- " var i=length;\n" +
- " }\n" +
- ""
- },
- ""
- );
-
- }
-
- public void test040() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " var s = \"\";\n" +
- " with (s) {\n" +
- " var i=charAt(0);\n" +
- " }\n" +
- ""
- },
- ""
- );
-
- }
-
- /*
- * Field reference error testing
- */
- public void test041() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var x = {};\n" +
- "var b=x;\n;"+
- "b.a=\"\";\n;"+
- "x.a = \"\""
- },
- ""
- );
-
- }
-
- public void test042() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var x = {};\n" +
- "x.a.b = \"\""
- },
- "----------\n" +
- "1. WARNING in X.js (at line 2)\n" +
- " x.a.b = \"\"\n"+
- " ^\n"+
- "a cannot be resolved or is not a field\n"+
- "----------\n"
- );
- }
-
- public void test043() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var x = null;\n" +
- "x>3;"+
- "var y;\n" +
- "y=null;\n" +
- "y>3"+
- ""
- },
- ""
- );
-
- }
-
- public void test044() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " if (typeof abc == \"undefined\") { abc=1;}\n" +
- " var c= abc;\n" +
- ""
- },
- ""
- );
-
- }
-
- public void test045() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " var a,b=1;\n" +
- " var c= b;\n" +
- " function abc(){" +
- " var d= 1,e=4;\n" +
- " var f=e;}\n" +
- ""
- },
- "----------\n" +
- "1. WARNING in X.js (at line 3)\n" +
- " function abc(){ var d= 1,e=4;\n" +
- " ^\n" +
- "The local variable d is never read\n" +
- "----------\n" +
- "2. WARNING in X.js (at line 4)\n" +
- " var f=e;}\n" +
- " ^\n" +
- "The local variable f is never read\n" +
- "----------\n"
- );
-
- }
-
-
- public void test046() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function debug2() {\n" +
- " var keyFunct = null;\n" +
- " keyFunct = function () {};\n" +
- " keyFunct();\n" +
- " }\n" +
- ""
- },
- ""
- );
-
- }
-
-
- public void test046b() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function debug2() {\n" +
- " var keyFunct = null;\n" +
- " keyFunct = new function () {};\n" +
- " keyFunct();\n" +
- " }\n" +
- ""
- },
- ""
- );
-
- }
-
-
- public void test047() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function Config() {}\n" +
- "Config.printDocTypes = function() { throw new (\"doctype 1.\"); };\n" +
- "Config.prototype.toString = function () { return \"\"; };\n" +
- "function main() {\n" +
- " Config.printDocTypes();\n" +
- "} \n" +
- ""
- },
- ""
- );
- }
-
-
- public void test048() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function Config2() {};\n" +
- "Config2.INPUT_DIR = \"\";\n" +
- "Config2.OUTPUT_DIR = Config2.INPUT_DIR ;\n" +
- "Config2.getNum = function() { return 1; }\n" +
- "function numberGen() { \n" +
- " return Config2.getNum(); \n" +
- "} \n" +
- ""
- },
- ""
- );
- }
-
- public void test049() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var arr=[];\n" +
- "var ref=arr.length;\n" +
- "var o=arr.pop();\n" +
- ""
- },
- ""
- );
- }
-
-
- public void test050() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function getDateTime() {\n" +
- " this.ctime = new Object();\n" +
- " this.ctime.getDay = new function() { return \"Mon\"; };\n" +
- " return this;\n" +
- " }\n" +
- " function debug3() {\n" +
- " var newObj = getDateTime();\n" +
- " return newObj.ctime.getDay();\n" +
- " }\n" +
- ""
- },
- ""
- );
- }
-
- public void test050b() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function getDateTime() {\n" +
- " this.ctime = new Object();\n" +
- " this.ctime.getDay = new function() { return \"Mon\"; };\n" +
- " return this;\n" +
- " }\n" +
- " function debug3() {\n" +
- " var newObj = new getDateTime();\n" +
- " return newObj.ctime.getDay();\n" +
- " }\n" +
- ""
- },
- ""
- );
- }
-
-
- public void test051() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var ns = {};\n"+
- "ns.foo = function(){\n" +
- "};\n" +
- "ns.foo.prototype.bar = \"\";\n" +
- "ns.foo.prototype.bar2 = function(){\n" +
- " return \"\";\n" +
- "}\n"+
- "c=new ns.foo();\n"+
- "c.bar2();\n"+
- "i=c.bar;\n"+
- ""
- },
- ""
- );
- }
-
-
- public void test052() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var myObject=new Object();\n"+
- "myObject.ctor= function(){\n" +
- "};\n" +
- "myObject.ctor.prototype.bar = \"\";\n" +
- "myObject.ctor.prototype.bar2 = function(){\n" +
- " return \"\";\n" +
- "}\n"+
- "c=new myObject.ctor();\n"+
- "c.bar2();\n"+
- "i=c.bar;\n"+
- ""
- },
- ""
- );
- }
-
-
-
- public void test053() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function funccall(pp){}\n"+
- "funccall({\n"+
- "meth : function(){ \n" +
- " var c=this.i; },\n" +
- " i : 1 \n" +
- "});\n"+
- ""
- },
- "----------\n" +
- "1. WARNING in X.js (at line 4)\n" +
- " var c=this.i; },\n" +
- " ^\n" +
- "The local variable c is never read\n" +
- "----------\n"
- );
- }
-
- /*public void testbug259187() {
-
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var params = \"some?string\".split('?');\n" +
- "var base = params.shift();"
- },
- "----------\n" +
- "1. WARNING in X.js (at line 1)\n" +
- " var params = \"some?string\".split(\'?\');\n" +
- " ^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Wrong number of arguments for the function split (), expecting 2 argument(s), but there was 1 \n" +
- "----------\n"
- );
- }
-
- public void testbug259023() {
- Map custom = new HashMap();
- custom.put("org.eclipse.wst.jsdt.core.compiler.problem.unusedLocal", "error");
-
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var myObject = {\n" +
- "val1: \"test1\",\n" +
- "val2: \"test2\"\n" +
- "};\n" +
- "myObject.val1 = \"test3\";"
- },
- "", null, true, custom
- );
- }
-
- public void testbug259023_2() {
- Map custom = new HashMap();
- custom.put("org.eclipse.wst.jsdt.core.compiler.problem.unusedLocal", "error");
-
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var myObject = \"test3\";\n" +
- "if(myObject == \"test3\") {}"
- },
- "", null, true, custom
- );
- }
-
- public void testbug251374() {
- Map custom = new HashMap();
- custom.put("org.eclipse.wst.jsdt.core.compiler.problem.nullReference", "error");
-
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var a = null;\n" +
- "function foo() { a.toString();}\n" +
- "a = 1; foo();"
- },
- "", null, true, custom
- );
- }
-
- public void testChris() {
- Map custom = new HashMap();
- custom.put("org.eclipse.wst.jsdt.core.compiler.problem.unusedLocal", "error");
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var square = function(x) {return x*x;};" +
- "square(2);",
- },
- "", null, true, custom
- );
- }
-
- public void testChris2() {
- Map custom = new HashMap();
- custom.put("org.eclipse.wst.jsdt.core.compiler.problem.unusedLocal", "error");
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var square = \"chris\";" +
- "square.split(\".\", 1);",
- },
- "", null, true, custom
- );
- }*/
-
- public void test054() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function func1(pp){}\n"+
- "func1();\n"+
- "function obj(){}\n"+
- "var o=new obj(1);\n"+
- ""
- },
- "----------\n" +
- "1. WARNING in X.js (at line 2)\n" +
- " func1();\n" +
- " ^^^^^^^\n" +
- "Wrong number of arguments for the function func1 (), expecting 1 argument(s), but there was 0 \n" +
- "----------\n" +
- "2. WARNING in X.js (at line 4)\n" +
- " var o=new obj(1);\n" +
- " ^^^^^^^^^^\n" +
- "Wrong number of arguments for the function obj (), expecting 0 argument(s), but there was 1 \n" +
- "----------\n"
- );
- }
-
-
- public void test055() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function func1(base,mixin){\n"+
- "var bp = (base||0).prototype;\n"+
- "}\n"+
- ""
- },
- "----------\n" +
- "1. WARNING in X.js (at line 2)\n" +
- " var bp = (base||0).prototype;\n" +
- " ^^\n" +
- "The local variable bp is never read\n" +
- "----------\n"
- );
- }
-
-
- public void test056() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var arr=[];\n"+
- "arr.push(1);\n"+
- ""
- },
- ""
- );
- }
-
- public void test057() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var arr= {\n"+
- " func: function(){ \n"+
- " this.func();\n"+
- " } \n"+
- "};\n"+
- ""
- },
- ""
- );
- }
-
-
- public void test058() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var cls= {};\n"+
- "cls.arr={};\n"+
- "cls.arr[\"ss\"]=1;\n"+
- "var dd=cls.arr[\"ssd\"];\n"+
- ""
- },
- ""
- );
- }
-
-
- public void test059() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "/**\n"
- + " * Valid class javadoc\n"
- + " * @param {String | Number} p1 param def\n"
- + " */\n"
- +"function foo(p1){\n"
- +"p1.length;\n"
- +"p1.toPrecision(1);\n"
- +"}\n"
- +""
- },
- ""
- );
- }
-
-
- public void test060() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function foo(p1){\n"
- +"p1();\n"
- +"}\n"
- +""
- },
- ""
- );
- }
-
- public void test061() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function foo(){\n"
- +"p1=1;\n"
- +"p1();\n"
- +"}\n"
- +""
- },
- "----------\n" +
- "1. WARNING in X.js (at line 3)\n" +
- " p1();\n" +
- " ^^\n" +
- "p1 is not a function \n" +
- "----------\n"
- );
- }
-
-
- public void test062() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var cc=function(){\n"
- +" function inner(){}\n"
- +" var dd=inner;\n"
- +"}\n"
- +""
- },
- "----------\n" +
- "1. WARNING in X.js (at line 3)\n" +
- " var dd=inner;\n" +
- " ^^\n" +
- "The local variable dd is never read\n" +
- "----------\n"
- );
- }
-
-
- public void test063() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var cc=function(){\n"
- +" var ii;\n"
- +" function inner(){\n"
- +" var dd=ii;\n"
- +" }\n"
- +"}\n"
- +""
- },
- "----------\n" +
- "1. WARNING in X.js (at line 4)\n" +
- " var dd=ii;\n" +
- " ^^\n" +
- "The local variable dd is never read\n" +
- "----------\n" +
- "2. WARNING in X.js (at line 4)\n" +
- " var dd=ii;\n" +
- " ^^\n" +
- "The local variable ii may not have been initialized\n" +
- "----------\n"
- );
- }
-
- public void test064() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function inner(){\n"
- +" var ii=0,i2=ii+1;\n"
-// +" var ii=0;\n"
-// +" var i2=ii+1;\n"
- +"}\n"
- +""
- },
- "----------\n" +
- "1. WARNING in X.js (at line 2)\n" +
- " var ii=0,i2=ii+1;\n" +
- " ^^\n" +
- "The local variable i2 is never read\n" +
- "----------\n"
- );
- }
-
- public void test065() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function inner(aArray){\n"
- +" var number = 0;\n"
- +" number -= aArray.length;\n"
- +" number += aArray.length;\n"
- +" return number;\n"
- +"}\n"
- +""
- },
- ""
- );
- }
-
- public void test066() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " TestClass = function() {\n"
- +" }\n"
- +" TestClass.prototype = new Object();\n"
- +" ns=new Object();\n"
- +" ns.TestClass = function() {\n"
- +" }\n"
- +" ns.TestClass.prototype = new Object();\n"
- +""
- },
- ""
- );
- }
-
- public void test067() {
-
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function foo(a){\n" +
- " doo(a); \n" +
- "}\n",
- "Y.js",
- " function doo(a){\n" +
- " foo(a); \n" +
- "}\n"
- },
- ""
- );
-
- }
-
-
- public void test068() {
-
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function foo(param1 , param2){\n" +
- " if(\"\" || 0) {} \n" +
- " var value = param1 || param2; \n" +
- " if(param1 || param2) {} \n" +
- "}\n",
- },
- "----------\n" +
- "1. WARNING in X.js (at line 3)\n" +
- " var value = param1 || param2; \n" +
- " ^^^^^\n" +
- "The local variable value is never read\n" +
- "----------\n"
- );
-
- }
-
- public void test070() {
-
- this.runNegativeTest(
- new String[] {
- "X.js",
- " var s=new String();\n" +
- " s.length=1; \n" +
- "\n",
- },
- ""
- );
- }
-
- public void testbug255428() {
-
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function MyClass(){}\n" +
- " MyClass.prototype = {\n" +
- " a : 0,\n" +
- " myfunc : function(){} \n" +
- " };\n" +
- "function test() { \n" +
- " var lObj = new MyClass();\n" +
- " lObj.a = 2;\n" +
- " lObj.myfunc();\n" +
- "}\n",
- },
- ""
- );
- }
-
- public void testbug259187_String_slice() {
- // String.split() argument count
- this.runNegativeTest(
- new String[] {
- "X.js",
- "var params = \"some?string\".slice('?');\n"
- },
- "----------\n" +
- "1. WARNING in X.js (at line 1)\n" +
- " var params = \"some?string\".slice(\'?\');\n" +
- " ^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Wrong number of arguments for the function slice (), expecting 2 argument(s), but there was 1 \n" +
- "----------\n"
- );
-
- // check return type and argument count
- runBasicTest(new String[] {
- "Yprime.js",
- "var aString = \"some?string\".slice(2, 4);\n" +
- "aString.length;"
- });
- }
-
- public void testbug259187_String_split() {
- // String.split() argument count
- this.runNegativeTest(
- new String[] {
- "Y.js",
- "var params = \"some?string\".split('?');\n" +
- "var base = params.shift();"
- },
- "----------\n" +
- "1. WARNING in Y.js (at line 1)\n" +
- " var params = \"some?string\".split(\'?\');\n" +
- " ^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Wrong number of arguments for the function split (), expecting 2 argument(s), but there was 1 \n" +
- "----------\n"
- );
-
- // check return type and argument count
- runBasicTest(new String[] {
- "Yprime.js",
- "var count = \"some?string\".split(\",\", 3);\n" +
- "count.length;"
- });
- }
-
- public void testbug259187_String_substring() {
- // String.substring() argument count
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "var count = \"some?string\".substring('?');"
- },
- "----------\n" +
- "1. WARNING in Z.js (at line 1)\n" +
- " var count = \"some?string\".substring(\'?\');\n" +
- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Wrong number of arguments for the function substring (), expecting 2 argument(s), but there was 1 \n" +
- "----------\n"
- );
-
- // check return type and argument count
- runBasicTest(new String[] {
- "Zprime.js",
- "var count = \"some?string\".substring(4, 3);\n" +
- "count.substring(4, 3);"
- });
- }
-
- public void Xtestbug196377_1() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "(function() {\n" +
- "hasClass();\n" +
- "function hasClass() {}\n" +
- "})();"
- },
- ""
- );
- }
-
- public void Xtestbug196377_2() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "top();" +
- "function top() {\n" +
- "inner();\n" +
- "function inner() {}\n" +
- "}"
- },
- ""
- );
- }
-
- public void testbug196377_3() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "top();\n" +
- "function top() {}\n"
- },
- ""
- );
- }
-
- public void testbug196377_4() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "top(1);\n" +
- "function top(a) {}\n"
- },
- ""
- );
- }
-
- public void testbug283663() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "var myNum = 3;\n" +
- "if(myNum === undefined){}\n" +
- "if(myNum == undefined){}\n"
- },
- ""
- );
- }
-
- public void testbug262728_A() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "function top() {\n"+
- "var x = function() {};\n"+
- "var x1 = 3;\n"+
- "inner();\n"+
- "function inner() {\n"+
- "var p = x1 + 3;\n"+
- "x();\n"+
- "inner2();\n"+
- "function inner2() {}\n"+
- "inner2();\n"+
- "}\n"+
- "x();\n"+
- "top();\n"+
- "}\n"+
- "top();"
- },
- "----------\n" +
- "1. WARNING in Z.js (at line 6)\n" +
- " var p = x1 + 3;\n" +
- " ^\n" +
- "The local variable p is never read\n" +
- "----------\n"
- );
- }
-
- public void testbug262728_B() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "function class2() {\n"+
- "this.publicFunction = function() {\n"+
- "privateFunction();\n"+
- "};\n"+
- "function privateFunction() {\n"+
- "return null;\n"+
- "};\n"+
- "}\n"+
- "function class1() {\n"+
- "function privateFunction() {\n"+
- "return null;\n"+
- "};\n"+
- "this.publicFunction = function() {\n"+
- "privateFunction();\n"+
- "};\n"+
- "}"
- },
- ""
- );
- }
- public void testbug262728_C() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "inner();\n"+
- "function top() {\n"+
- "inner();\n"+
- "function inner(){};\n"+
- "inner();\n"+
- "}\n"+
- "inner();"
- },
- "----------\n" +
- "1. ERROR in Z.js (at line 1)\n" +
- " inner();\n" +
- " ^^^^^\n" +
- "The function inner() is undefined\n" +
- "----------\n" +
- "2. ERROR in Z.js (at line 7)\n" +
- " inner();\n" +
- " ^^^^^\n" +
- "The function inner() is undefined\n" +
- "----------\n"
- );
- }
-
- public void testbug262728_D() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "(function() {\n"+
- "privateFunction();\n"+
- "var x;\n"+
- "function privateFunction() {\n"+
- "x + 3;\n"+
- "}\n"+
- "})();"
- },
- "----------\n" +
- "1. WARNING in Z.js (at line 5)\n" +
- " x + 3;\n" +
- " ^\n" +
- "The local variable x may not have been initialized\n" +
- "----------\n"
- );
- }
-
- public void testbug269203() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "function Square() {}\n" +
- "var sq = new Square();\n" +
- "sq.area = function() {};"
- },
- ""
- );
- }
-
- public void testbug290414() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "function Test(w) {this.w1 = w;}\n" +
- "var t = new Test(3);\n" +
- "t.area = function() {};\n" +
- "var area = t.area();"
- },
- ""
- );
- }
-
- public void testbug268989_1() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "/**@return {Date}*/function test(w) {return w}\n" +
- "var t = test(3);\n" +
- "t.getTime();"
- },
- ""
- );
- }
-
- public void testbug268989_2() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "/**@returns {Date}*/function test(w) {return w}\n" +
- "var t = test(3);\n" +
- "t.getTime();"
- },
- ""
- );
- }
-
- public void testObject() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "var o = new Object();\n" +
- "var x = o.toString();\n" +
- "x.charAt(0);\n" +
- "var x = o.toLocaleString();\n" +
- "x.charAt(0);\n" +
- "var x = o.valueOf();\n" +
- "x.toLocaleString();\n" +
- "var x = o.hasOwnProperty(1);\n" +
- "var x = o.isPrototypeOf(1);\n" +
- "var x = o.propertyIsEnumerable(1);\n" +
- "var x = o.constructor;\n" +
- "x.call();"
- },
- ""
- );
- }
-
- public void testbug247201() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "function Car() { this.color = 'red'; this.Move = function() {};};\n" +
- "Car.Stop = function() {};\n" +
- "Car.engine = 'diesel';\n" +
- "var o = '';\n" +
- "o += 'color => '+Car.color.prototype+'<br />';\n" +
- "var p = new Car();\n" +
- "o += 'Stop => '+p.Stop()+'<br />';\n" +
- "o += 'engine => '+p.engine+'<br />';\n" +
- "o += 'engine => '+p.engine.prototype+'<br />';\n" +
- "var MyCar = Car;\n" +
- "c = MyCar.Move;\n" +
- "o += 'Move => '+MyCar.Move()+'<br />';\n" +
- "o += 'Stop => '+MyCar.Stop+'<br />';\n" +
- "o += 'engine => '+MyCar.engine+'<br />';"
- },
- "----------\n" +
- "1. ERROR in Z.js (at line 5)\n" +
- " o += \'color => \'+Car.color.prototype+\'<br />\';\n" +
- " ^^^^^\n" +
- "Cannot make a static reference to the non-static field color\n" +
- "----------\n" +
- "2. WARNING in Z.js (at line 7)\n" +
- " o += \'Stop => \'+p.Stop()+\'<br />\';\n" +
- " ^^^^^^^^\n" +
- "The static function Stop() from the type Car should be accessed in a static way\n" +
- "----------\n" +
- "3. WARNING in Z.js (at line 8)\n" +
- " o += \'engine => \'+p.engine+\'<br />\';\n" +
- " ^^^^^^\n" +
- "The static field Car.engine should be accessed in a static way\n" +
- "----------\n" +
- "4. WARNING in Z.js (at line 9)\n" +
- " o += \'engine => \'+p.engine.prototype+\'<br />\';\n" +
- " ^^^^^^\n" +
- "The static field Car.engine should be accessed in a static way\n" +
- "----------\n" +
- "5. ERROR in Z.js (at line 11)\n" +
- " c = MyCar.Move;\n" +
- " ^^^^^^^^^^\n" +
- "Cannot make a static reference to the non-static function Move() from the type Car\n" +
- "----------\n" +
- "6. ERROR in Z.js (at line 12)\n" +
- " o += \'Move => \'+MyCar.Move()+\'<br />\';\n" +
- " ^^^^^^^^^^^^\n" +
- "Cannot make a static reference to the non-static function Move() from the type Car\n" +
- "----------\n"
- );
- }
-
- public void testbug242871() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "TestClassBase = function() {};\n" +
- "TestFunction = function() {};\n" +
- "TestClass = function() {\n" +
- " TestFunction.call(this, 1);\n" +
- " TestClassBase.call(this, 2);\n" +
- "};\n" +
- "TestClass.prototype = new TestClassBase();"
- },
- ""
- );
- }
- public void testbug242871_2() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "function TestClassBase() {};\n" +
- "TestFunction = function() {};\n" +
- "TestClass = function() {\n" +
- " TestFunction.call(this, 1);\n" +
- " TestClassBase.call(this, 2);\n" +
- "};\n" +
- "TestClass.prototype = new TestClassBase();"
- },
- ""
- );
- }
- public void testbug242871_3() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "TestClassBase = function() {};\n" +
- "TestFunction = function() {};\n" +
- "TestClass = function() {\n" +
- " TestFunction.call(this, 1);\n" +
- " TestClassBase.call2(this, 2);\n" +
- "};\n" +
- "TestClass.prototype = new TestClassBase();"
- },
- "----------\n" +
- "1. ERROR in Z.js (at line 5)\n" +
- " TestClassBase.call2(this, 2);\n" +
- " ^^^^^\n" +
- "The function call2(TestClass, Number) is undefined for the type TestClassBase\n" +
- "----------\n"
- );
- }
-
- public void testbug269094() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "function myFunc() {\n" +
- "return myFunc.a++;\n" +
- "}\n" +
- "myFunc.a = 0;"
- },
- ""
- );
- }
-
- public void testbug269094_2() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "function myFunc() {\n" +
- "return 3;\n" +
- "}\n" +
- "myFunc.a = 0;"
- },
- ""
- );
- }
-
- public void testbug269094_3() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "function myFunc() {\n" +
- "return 3;\n" +
- "}"
- },
- ""
- );
- }
-
- public void testbug269094_4() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "/**@returns {String}*/\n" +
- "function myFunc() {\n" +
- "return 3;\n" +
- "}"
- },
- "----------\n" +
- "1. WARNING in Z.js (at line 3)\n" +
- " return 3;\n" +
- " ^\n" +
- "Type mismatch: cannot convert from Number to String\n" +
- "----------\n"
- );
- }
-
- public void testbug269094_5() {
- this.runNegativeTest(
- new String[] {
- "Z.js",
- "/**@returns {Number}*/\n" +
- "function myFunc() {\n" +
- "return 3;\n" +
- "}"
- },
- ""
- );
- }
-
-} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/CharOperationTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/CharOperationTest.java
deleted file mode 100644
index f52a2fe..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/CharOperationTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import org.eclipse.wst.jsdt.core.compiler.CharOperation;
-
-public class CharOperationTest extends AbstractRegressionTest {
-
-public CharOperationTest(String name) {
- super(name);
-}
-
-public void test001() {
- char[] array = { 'a' , 'b', 'b', 'c', 'a', 'b', 'c', 'a' };
- char[] toBeReplaced = { 'b', 'c' };
- char replacementChar = 'a';
- int start = 4;
- int end = 8;
- CharOperation.replace(array, toBeReplaced, replacementChar, start, end);
- char[] result = { 'a' , 'b', 'b', 'c', 'a', 'a', 'a', 'a' };
-
- for (int i = 0, max = array.length; i < max; i++) {
- assertEquals("Wrong value at " + i, result[i], array[i]);
- }
-}
-public void test002() {
- char[] array = { 'a' , 'b', 'b', 'c', 'a', 'b', 'c', 'a' };
- char[] toBeReplaced = { 'b', 'c' };
- char replacementChar = 'a';
- int start = 2;
- int end = 3;
- CharOperation.replace(array, toBeReplaced, replacementChar, start, end);
- char[] result = { 'a' , 'b', 'a', 'c', 'a', 'b', 'c', 'a' };
-
- for (int i = 0, max = array.length; i < max; i++) {
- assertEquals("Wrong value at " + i, result[i], array[i]);
- }
-}
-public void test003() {
- char[] second = { 'a' , 'b', 'b', 'c', 'a', 'b', 'c', 'a' };
- char[] first = { 'b', 'c', 'a' };
- int start = 2;
- int end = 5;
- assertTrue(CharOperation.equals(first, second, start, end, true));
-}
-public void test004() {
- char[] second = { 'A' };
- char[] first = { 'a' };
- int start = 0;
- int end = 1;
- assertTrue(CharOperation.equals(first, second, start, end, false));
-}
-public void test005() {
- char[] array = { 'a' , 'b', 'b', 'c', 'a', 'b', 'c', 'a' };
- char[] toBeReplaced = { 'b', 'c' };
- char replacementChar = 'a';
- CharOperation.replace(array, toBeReplaced, replacementChar);
- char[] result = { 'a' , 'a', 'a', 'a', 'a', 'a', 'a', 'a' };
-
- for (int i = 0, max = array.length; i < max; i++) {
- assertEquals("Wrong value at " + i, result[i], array[i]);
- }
-}
-public void test006() {
- char[] array = { 'a' , 'a', 'a', 'a', 'a', 'b', 'c', 'a' };
- char[] toBeReplaced = { 'a', 'a' };
- char[] replacementChar = { 'a' };
- char[] result = CharOperation.replace(array, toBeReplaced, replacementChar);
- char[] expectedValue = { 'a' , 'a', 'a', 'b', 'c', 'a' };
- assertEquals("Wrong size", expectedValue.length, result.length);
- for (int i = 0, max = expectedValue.length; i < max; i++) {
- assertEquals("Wrong value at " + i, result[i], expectedValue[i]);
- }
-}
-// test compareTo(char[], char[])
-public void test007() {
- char[] array = { 'a' , 'a', 'a', 'a', 'a', 'b', 'c', 'a' };
- char[] array2 = { 'a', 'a' };
- assertTrue(CharOperation.compareTo(array, array2) > 0);
-
- array2 = new char[] { 'a', 'a' };
- array = new char[] { 'a' , 'a', 'a', 'a', 'a', 'b', 'c', 'a' };
- assertTrue(CharOperation.compareTo(array2, array) < 0);
-
- array = new char[] { 'a' , 'a', 'a', 'a', 'a', 'b', 'c', 'a' };
- array2 = new char[] { 'a' , 'a', 'a', 'a', 'a', 'b', 'c', 'a' };
- assertTrue(CharOperation.compareTo(array, array2) == 0);
- assertTrue(CharOperation.compareTo(array2, array) == 0);
-
- array = new char[] { 'a' , 'b', 'c' };
- array2 = new char[] { 'a' , 'b', 'c', 'a', 'a'};
- assertTrue(CharOperation.compareTo(array, array2) < 0);
-
- array = new char[] { 'a' , 'b', 'c' };
- array2 = new char[] { 'a' , 'b', 'd'};
- assertTrue(CharOperation.compareTo(array, array2) < 0);
-}
-public static Class testClass() {
- return CharOperationTest.class;
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/CompilerInvocationTests.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/CompilerInvocationTests.java
deleted file mode 100644
index 6b3aa3d..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/CompilerInvocationTests.java
+++ /dev/null
@@ -1,791 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import java.lang.reflect.Field;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.wst.jsdt.core.JavaScriptCore;
-import org.eclipse.wst.jsdt.core.compiler.CategorizedProblem;
-import org.eclipse.wst.jsdt.core.compiler.IProblem;
-import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
-import org.eclipse.wst.jsdt.internal.compiler.ICompilerRequestor;
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
-import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemSeverities;
-
-import junit.framework.Test;
-
-/**
- * This class is meant to gather test cases related to the invocation of the
- * compiler, be it at an API or non API level.
- */
-public class CompilerInvocationTests extends AbstractRegressionTest {
-
-public CompilerInvocationTests(String name) {
- super(name);
-}
-
- // Static initializer to specify tests subset using TESTS_* static variables
- // All specified tests which does not belong to the class are skipped...
- // Only the highest compliance level is run; add the VM argument
- // -Dcompliance=1.4 (for example) to lower it if needed
- static {
-// TESTS_NAMES = new String[] { "test001" };
-// TESTS_NUMBERS = new int[] { 1 };
-// TESTS_RANGE = new int[] { 1, -1 };
-// TESTS_RANGE = new int[] { 1, 2049 };
-// TESTS_RANGE = new int[] { 449, 451 };
-// TESTS_RANGE = new int[] { 900, 999 };
- }
-
-public static Test suite() {
- return buildAllCompliancesTestSuite(testClass());
-}
-
-public static Class testClass() {
- return CompilerInvocationTests.class;
-}
-
-// irritant vs warning token
-public void test001_irritant_warning_token() {
- String [] tokens = new String[64];
- Map matcher = new HashMap();
- long irritant;
- String token;
- for (int i = 0; i < 64; i++) {
- if ((token = tokens[i] = CompilerOptions.warningTokenFromIrritant(irritant = 1L << i)) != null) {
- matcher.put(token, token);
- assertTrue((irritant & CompilerOptions.warningTokenToIrritant(token)) != 0);
- }
- }
- String [] allTokens = CompilerOptions.warningTokens;
- int length = allTokens.length;
- matcher.put("all", "all"); // all gets undetected in the From/To loop
- assertEquals(allTokens.length, matcher.size());
- for (int i = 0; i < length; i++) {
- assertNotNull(matcher.get(allTokens[i]));
- }
-}
-
-// problem categories - check that none is left unspecified
-public void test002_problem_categories() {
- try {
- Class iProblemClass;
- Map excludedProblems = new HashMap();
- // categories
- excludedProblems.put("ObjectHasNoSuperclass", null);
- excludedProblems.put("UndefinedType", null);
- excludedProblems.put("NotVisibleType", null);
- excludedProblems.put("AmbiguousType", null);
- excludedProblems.put("UsingDeprecatedType", null);
- excludedProblems.put("InternalTypeNameProvided", null);
- excludedProblems.put("UnusedPrivateType", null);
- excludedProblems.put("IncompatibleTypesInEqualityOperator", null);
- excludedProblems.put("IncompatibleTypesInConditionalOperator", null);
- excludedProblems.put("TypeMismatch", null);
- excludedProblems.put("IndirectAccessToStaticType", null);
- excludedProblems.put("MissingEnclosingInstanceForConstructorCall", null);
- excludedProblems.put("MissingEnclosingInstance", null);
- excludedProblems.put("IncorrectEnclosingInstanceReference", null);
- excludedProblems.put("IllegalEnclosingInstanceSpecification", null);
- excludedProblems.put("CannotDefineStaticInitializerInLocalType", null);
- excludedProblems.put("OuterLocalMustBeFinal", null);
- excludedProblems.put("CannotDefineInterfaceInLocalType", null);
- excludedProblems.put("IllegalPrimitiveOrArrayTypeForEnclosingInstance", null);
- excludedProblems.put("EnclosingInstanceInConstructorCall", null);
- excludedProblems.put("AnonymousClassCannotExtendFinalClass", null);
- excludedProblems.put("CannotDefineAnnotationInLocalType", null);
- excludedProblems.put("CannotDefineEnumInLocalType", null);
- excludedProblems.put("NonStaticContextForEnumMemberType", null);
- excludedProblems.put("UndefinedName", null);
- excludedProblems.put("UninitializedLocalVariable", null);
- excludedProblems.put("VariableTypeCannotBeVoid", null);
- excludedProblems.put("VariableTypeCannotBeVoidArray", null);
- excludedProblems.put("CannotAllocateVoidArray", null);
- excludedProblems.put("RedefinedLocal", null);
- excludedProblems.put("RedefinedArgument", null);
- excludedProblems.put("DuplicateFinalLocalInitialization", null);
- excludedProblems.put("NonBlankFinalLocalAssignment", null);
- excludedProblems.put("ParameterAssignment", null);
- excludedProblems.put("FinalOuterLocalAssignment", null);
- excludedProblems.put("LocalVariableIsNeverUsed", null);
- excludedProblems.put("ArgumentIsNeverUsed", null);
- excludedProblems.put("BytecodeExceeds64KLimit", null);
- excludedProblems.put("BytecodeExceeds64KLimitForClinit", null);
- excludedProblems.put("TooManyArgumentSlots", null);
- excludedProblems.put("TooManyLocalVariableSlots", null);
- excludedProblems.put("TooManySyntheticArgumentSlots", null);
- excludedProblems.put("TooManyArrayDimensions", null);
- excludedProblems.put("BytecodeExceeds64KLimitForConstructor", null);
- excludedProblems.put("UndefinedField", null);
- excludedProblems.put("NotVisibleField", null);
- excludedProblems.put("AmbiguousField", null);
- excludedProblems.put("UsingDeprecatedField", null);
- excludedProblems.put("NonStaticFieldFromStaticInvocation", null);
- excludedProblems.put("ReferenceToForwardField", null);
- excludedProblems.put("NonStaticAccessToStaticField", null);
- excludedProblems.put("UnusedPrivateField", null);
- excludedProblems.put("IndirectAccessToStaticField", null);
- excludedProblems.put("UnqualifiedFieldAccess", null);
- excludedProblems.put("FinalFieldAssignment", null);
- excludedProblems.put("UninitializedBlankFinalField", null);
- excludedProblems.put("DuplicateBlankFinalFieldInitialization", null);
- excludedProblems.put("LocalVariableHidingLocalVariable", null);
- excludedProblems.put("LocalVariableHidingField", null);
- excludedProblems.put("FieldHidingLocalVariable", null);
- excludedProblems.put("FieldHidingField", null);
- excludedProblems.put("ArgumentHidingLocalVariable", null);
- excludedProblems.put("ArgumentHidingField", null);
- excludedProblems.put("MissingSerialVersion", null);
- excludedProblems.put("UndefinedMethod", null);
- excludedProblems.put("NotVisibleMethod", null);
- excludedProblems.put("AmbiguousMethod", null);
- excludedProblems.put("UsingDeprecatedMethod", null);
- excludedProblems.put("DirectInvocationOfAbstractMethod", null);
- excludedProblems.put("VoidMethodReturnsValue", null);
- excludedProblems.put("MethodReturnsVoid", null);
- excludedProblems.put("MethodRequiresBody", null);
- excludedProblems.put("ShouldReturnValue", null);
- excludedProblems.put("MethodButWithConstructorName", null);
- excludedProblems.put("MissingReturnType", null);
- excludedProblems.put("BodyForNativeMethod", null);
- excludedProblems.put("BodyForAbstractMethod", null);
- excludedProblems.put("NoMessageSendOnBaseType", null);
- excludedProblems.put("ParameterMismatch", null);
- excludedProblems.put("NoMessageSendOnArrayType", null);
- excludedProblems.put("NonStaticAccessToStaticMethod", null);
- excludedProblems.put("UnusedPrivateMethod", null);
- excludedProblems.put("IndirectAccessToStaticMethod", null);
- excludedProblems.put("UndefinedConstructor", null);
- excludedProblems.put("NotVisibleConstructor", null);
- excludedProblems.put("AmbiguousConstructor", null);
- excludedProblems.put("UsingDeprecatedConstructor", null);
- excludedProblems.put("UnusedPrivateConstructor", null);
- excludedProblems.put("InstanceFieldDuringConstructorInvocation", null);
- excludedProblems.put("InstanceMethodDuringConstructorInvocation", null);
- excludedProblems.put("RecursiveConstructorInvocation", null);
- excludedProblems.put("ThisSuperDuringConstructorInvocation", null);
- excludedProblems.put("InvalidExplicitConstructorCall", null);
- excludedProblems.put("UndefinedConstructorInDefaultConstructor", null);
- excludedProblems.put("NotVisibleConstructorInDefaultConstructor", null);
- excludedProblems.put("AmbiguousConstructorInDefaultConstructor", null);
- excludedProblems.put("UndefinedConstructorInImplicitConstructorCall", null);
- excludedProblems.put("NotVisibleConstructorInImplicitConstructorCall", null);
- excludedProblems.put("AmbiguousConstructorInImplicitConstructorCall", null);
- excludedProblems.put("UnhandledExceptionInDefaultConstructor", null);
- excludedProblems.put("UnhandledExceptionInImplicitConstructorCall", null);
- excludedProblems.put("ArrayReferenceRequired", null);
- excludedProblems.put("NoImplicitStringConversionForCharArrayExpression", null);
- excludedProblems.put("StringConstantIsExceedingUtf8Limit", null);
- excludedProblems.put("NonConstantExpression", null);
- excludedProblems.put("NumericValueOutOfRange", null);
- excludedProblems.put("IllegalCast", null);
- excludedProblems.put("InvalidClassInstantiation", null);
- excludedProblems.put("CannotDefineDimensionExpressionsWithInit", null);
- excludedProblems.put("MustDefineEitherDimensionExpressionsOrInitializer", null);
- excludedProblems.put("InvalidOperator", null);
- excludedProblems.put("CodeCannotBeReached", null);
- excludedProblems.put("CannotReturnInInitializer", null);
- excludedProblems.put("InitializerMustCompleteNormally", null);
- excludedProblems.put("InvalidVoidExpression", null);
- excludedProblems.put("MaskedCatch", null);
- excludedProblems.put("DuplicateDefaultCase", null);
- excludedProblems.put("UnreachableCatch", null);
- excludedProblems.put("UnhandledException", null);
- excludedProblems.put("IncorrectSwitchType", null);
- excludedProblems.put("DuplicateCase", null);
- excludedProblems.put("DuplicateLabel", null);
- excludedProblems.put("InvalidBreak", null);
- excludedProblems.put("InvalidContinue", null);
- excludedProblems.put("UndefinedLabel", null);
- excludedProblems.put("InvalidTypeToSynchronized", null);
- excludedProblems.put("InvalidNullToSynchronized", null);
- excludedProblems.put("CannotThrowNull", null);
- excludedProblems.put("AssignmentHasNoEffect", null);
- excludedProblems.put("PossibleAccidentalBooleanAssignment", null);
- excludedProblems.put("SuperfluousSemicolon", null);
- excludedProblems.put("UnnecessaryCast", null);
- excludedProblems.put("UnnecessaryArgumentCast", null);
- excludedProblems.put("UnnecessaryInstanceof", null);
- excludedProblems.put("FinallyMustCompleteNormally", null);
- excludedProblems.put("UnusedMethodDeclaredThrownException", null);
- excludedProblems.put("UnusedConstructorDeclaredThrownException", null);
- excludedProblems.put("InvalidCatchBlockSequence", null);
- excludedProblems.put("EmptyControlFlowStatement", null);
- excludedProblems.put("UnnecessaryElse", null);
- excludedProblems.put("NeedToEmulateFieldReadAccess", null);
- excludedProblems.put("NeedToEmulateFieldWriteAccess", null);
- excludedProblems.put("NeedToEmulateMethodAccess", null);
- excludedProblems.put("NeedToEmulateConstructorAccess", null);
- excludedProblems.put("FallthroughCase", null);
- excludedProblems.put("InheritedMethodHidesEnclosingName", null);
- excludedProblems.put("InheritedFieldHidesEnclosingName", null);
- excludedProblems.put("InheritedTypeHidesEnclosingName", null);
- excludedProblems.put("IllegalUsageOfQualifiedTypeReference", null);
- excludedProblems.put("UnusedLabel", null);
- excludedProblems.put("ThisInStaticContext", null);
- excludedProblems.put("StaticMethodRequested", null);
- excludedProblems.put("IllegalDimension", null);
- excludedProblems.put("InvalidTypeExpression", null);
- excludedProblems.put("ParsingError", null);
- excludedProblems.put("ParsingErrorNoSuggestion", null);
- excludedProblems.put("InvalidUnaryExpression", null);
- excludedProblems.put("InterfaceCannotHaveConstructors", null);
- excludedProblems.put("ArrayConstantsOnlyInArrayInitializers", null);
- excludedProblems.put("ParsingErrorOnKeyword", null);
- excludedProblems.put("ParsingErrorOnKeywordNoSuggestion", null);
- excludedProblems.put("UnmatchedBracket", null);
- excludedProblems.put("NoFieldOnBaseType", null);
- excludedProblems.put("InvalidExpressionAsStatement", null);
- excludedProblems.put("ExpressionShouldBeAVariable", null);
- excludedProblems.put("MissingSemiColon", null);
- excludedProblems.put("InvalidParenthesizedExpression", null);
- excludedProblems.put("ParsingErrorInsertTokenBefore", null);
- excludedProblems.put("ParsingErrorInsertTokenAfter", null);
- excludedProblems.put("ParsingErrorDeleteToken", null);
- excludedProblems.put("ParsingErrorDeleteTokens", null);
- excludedProblems.put("ParsingErrorMergeTokens", null);
- excludedProblems.put("ParsingErrorInvalidToken", null);
- excludedProblems.put("ParsingErrorMisplacedConstruct", null);
- excludedProblems.put("ParsingErrorReplaceTokens", null);
- excludedProblems.put("ParsingErrorNoSuggestionForTokens", null);
- excludedProblems.put("ParsingErrorUnexpectedEOF", null);
- excludedProblems.put("ParsingErrorInsertToComplete", null);
- excludedProblems.put("ParsingErrorInsertToCompleteScope", null);
- excludedProblems.put("ParsingErrorInsertToCompletePhrase", null);
- excludedProblems.put("EndOfSource", null);
- excludedProblems.put("InvalidHexa", null);
- excludedProblems.put("InvalidOctal", null);
- excludedProblems.put("InvalidCharacterConstant", null);
- excludedProblems.put("InvalidEscape", null);
- excludedProblems.put("InvalidInput", null);
- excludedProblems.put("InvalidUnicodeEscape", null);
- excludedProblems.put("InvalidFloat", null);
- excludedProblems.put("NullSourceString", null);
- excludedProblems.put("UnterminatedString", null);
- excludedProblems.put("UnterminatedComment", null);
- excludedProblems.put("NonExternalizedStringLiteral", null);
- excludedProblems.put("InvalidDigit", null);
- excludedProblems.put("InvalidLowSurrogate", null);
- excludedProblems.put("InvalidHighSurrogate", null);
- excludedProblems.put("UnnecessaryNLSTag", null);
- excludedProblems.put("DiscouragedReference", null);
- excludedProblems.put("InterfaceCannotHaveInitializers", null);
- excludedProblems.put("DuplicateModifierForType", null);
- excludedProblems.put("IllegalModifierForClass", null);
- excludedProblems.put("IllegalModifierForInterface", null);
- excludedProblems.put("IllegalModifierForMemberClass", null);
- excludedProblems.put("IllegalModifierForMemberInterface", null);
- excludedProblems.put("IllegalModifierForLocalClass", null);
- excludedProblems.put("ForbiddenReference", null);
- excludedProblems.put("IllegalModifierCombinationFinalAbstractForClass", null);
- excludedProblems.put("IllegalVisibilityModifierForInterfaceMemberType", null);
- excludedProblems.put("IllegalVisibilityModifierCombinationForMemberType", null);
- excludedProblems.put("IllegalStaticModifierForMemberType", null);
- excludedProblems.put("SuperclassMustBeAClass", null);
- excludedProblems.put("ClassExtendFinalClass", null);
- excludedProblems.put("DuplicateSuperInterface", null);
- excludedProblems.put("SuperInterfaceMustBeAnInterface", null);
- excludedProblems.put("HierarchyCircularitySelfReference", null);
- excludedProblems.put("HierarchyCircularity", null);
- excludedProblems.put("HidingEnclosingType", null);
- excludedProblems.put("DuplicateNestedType", null);
- excludedProblems.put("CannotThrowType", null);
- excludedProblems.put("PackageCollidesWithType", null);
- excludedProblems.put("TypeCollidesWithPackage", null);
- excludedProblems.put("DuplicateTypes", null);
- excludedProblems.put("IsClassPathCorrect", null);
- excludedProblems.put("PublicClassMustMatchFileName", null);
- excludedProblems.put("MustSpecifyPackage", null);
- excludedProblems.put("HierarchyHasProblems", null);
- excludedProblems.put("PackageIsNotExpectedPackage", null);
- excludedProblems.put("ObjectCannotHaveSuperTypes", null);
- excludedProblems.put("ObjectMustBeClass", null);
- excludedProblems.put("SuperclassNotFound", null);
- excludedProblems.put("SuperclassNotVisible", null);
- excludedProblems.put("SuperclassAmbiguous", null);
- excludedProblems.put("SuperclassInternalNameProvided", null);
- excludedProblems.put("SuperclassInheritedNameHidesEnclosingName", null);
- excludedProblems.put("InterfaceNotFound", null);
- excludedProblems.put("InterfaceNotVisible", null);
- excludedProblems.put("InterfaceAmbiguous", null);
- excludedProblems.put("InterfaceInternalNameProvided", null);
- excludedProblems.put("InterfaceInheritedNameHidesEnclosingName", null);
- excludedProblems.put("DuplicateField", null);
- excludedProblems.put("DuplicateModifierForField", null);
- excludedProblems.put("IllegalModifierForField", null);
- excludedProblems.put("IllegalModifierForInterfaceField", null);
- excludedProblems.put("IllegalVisibilityModifierCombinationForField", null);
- excludedProblems.put("IllegalModifierCombinationFinalVolatileForField", null);
- excludedProblems.put("UnexpectedStaticModifierForField", null);
- excludedProblems.put("FieldTypeNotFound", null);
- excludedProblems.put("FieldTypeNotVisible", null);
- excludedProblems.put("FieldTypeAmbiguous", null);
- excludedProblems.put("FieldTypeInternalNameProvided", null);
- excludedProblems.put("FieldTypeInheritedNameHidesEnclosingName", null);
- excludedProblems.put("DuplicateMethod", null);
- excludedProblems.put("IllegalModifierForArgument", null);
- excludedProblems.put("DuplicateModifierForMethod", null);
- excludedProblems.put("IllegalModifierForMethod", null);
- excludedProblems.put("IllegalModifierForInterfaceMethod", null);
- excludedProblems.put("IllegalVisibilityModifierCombinationForMethod", null);
- excludedProblems.put("UnexpectedStaticModifierForMethod", null);
- excludedProblems.put("IllegalAbstractModifierCombinationForMethod", null);
- excludedProblems.put("AbstractMethodInAbstractClass", null);
- excludedProblems.put("ArgumentTypeCannotBeVoid", null);
- excludedProblems.put("ArgumentTypeCannotBeVoidArray", null);
- excludedProblems.put("ReturnTypeCannotBeVoidArray", null);
- excludedProblems.put("NativeMethodsCannotBeStrictfp", null);
- excludedProblems.put("DuplicateModifierForArgument", null);
- excludedProblems.put("ArgumentTypeNotFound", null);
- excludedProblems.put("ArgumentTypeNotVisible", null);
- excludedProblems.put("ArgumentTypeAmbiguous", null);
- excludedProblems.put("ArgumentTypeInternalNameProvided", null);
- excludedProblems.put("ArgumentTypeInheritedNameHidesEnclosingName", null);
- excludedProblems.put("ExceptionTypeNotFound", null);
- excludedProblems.put("ExceptionTypeNotVisible", null);
- excludedProblems.put("ExceptionTypeAmbiguous", null);
- excludedProblems.put("ExceptionTypeInternalNameProvided", null);
- excludedProblems.put("ExceptionTypeInheritedNameHidesEnclosingName", null);
- excludedProblems.put("ReturnTypeNotFound", null);
- excludedProblems.put("ReturnTypeNotVisible", null);
- excludedProblems.put("ReturnTypeAmbiguous", null);
- excludedProblems.put("ReturnTypeInternalNameProvided", null);
- excludedProblems.put("ReturnTypeInheritedNameHidesEnclosingName", null);
- excludedProblems.put("ConflictingImport", null);
- excludedProblems.put("DuplicateImport", null);
- excludedProblems.put("CannotImportPackage", null);
- excludedProblems.put("UnusedImport", null);
- excludedProblems.put("ImportNotFound", null);
- excludedProblems.put("ImportNotVisible", null);
- excludedProblems.put("ImportAmbiguous", null);
- excludedProblems.put("ImportInternalNameProvided", null);
- excludedProblems.put("ImportInheritedNameHidesEnclosingName", null);
- excludedProblems.put("InvalidTypeForStaticImport", null);
- excludedProblems.put("DuplicateModifierForVariable", null);
- excludedProblems.put("IllegalModifierForVariable", null);
- excludedProblems.put("LocalVariableCannotBeNull", null);
- excludedProblems.put("LocalVariableCanOnlyBeNull", null);
- excludedProblems.put("LocalVariableMayBeNull", null);
- excludedProblems.put("AbstractMethodMustBeImplemented", null);
- excludedProblems.put("FinalMethodCannotBeOverridden", null);
- excludedProblems.put("IncompatibleExceptionInThrowsClause", null);
- excludedProblems.put("IncompatibleExceptionInInheritedMethodThrowsClause", null);
- excludedProblems.put("IncompatibleReturnType", null);
- excludedProblems.put("InheritedMethodReducesVisibility", null);
- excludedProblems.put("CannotOverrideAStaticMethodWithAnInstanceMethod", null);
- excludedProblems.put("CannotHideAnInstanceMethodWithAStaticMethod", null);
- excludedProblems.put("StaticInheritedMethodConflicts", null);
- excludedProblems.put("MethodReducesVisibility", null);
- excludedProblems.put("OverridingNonVisibleMethod", null);
- excludedProblems.put("AbstractMethodCannotBeOverridden", null);
- excludedProblems.put("OverridingDeprecatedMethod", null);
- excludedProblems.put("IncompatibleReturnTypeForNonInheritedInterfaceMethod", null);
- excludedProblems.put("IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod", null);
- excludedProblems.put("IllegalVararg", null);
- excludedProblems.put("CodeSnippetMissingClass", null);
- excludedProblems.put("CodeSnippetMissingMethod", null);
- excludedProblems.put("CannotUseSuperInCodeSnippet", null);
- excludedProblems.put("TooManyConstantsInConstantPool", null);
- excludedProblems.put("TooManyBytesForStringConstant", null);
- excludedProblems.put("TooManyFields", null);
- excludedProblems.put("TooManyMethods", null);
- excludedProblems.put("UseAssertAsAnIdentifier", null);
- excludedProblems.put("UseEnumAsAnIdentifier", null);
- excludedProblems.put("EnumConstantsCannotBeSurroundedByParenthesis", null);
- excludedProblems.put("Task", null);
- excludedProblems.put("UndocumentedEmptyBlock", null);
- excludedProblems.put("JavadocMissingIdentifier", null);
- excludedProblems.put("JavadocNonStaticTypeFromStaticInvocation", null);
- excludedProblems.put("JavadocInvalidParamTagTypeParameter", null);
- excludedProblems.put("JavadocUnexpectedTag", null);
- excludedProblems.put("JavadocMissingParamTag", null);
- excludedProblems.put("JavadocMissingParamName", null);
- excludedProblems.put("JavadocDuplicateParamName", null);
- excludedProblems.put("JavadocInvalidParamName", null);
- excludedProblems.put("JavadocMissingReturnTag", null);
- excludedProblems.put("JavadocDuplicateReturnTag", null);
- excludedProblems.put("JavadocMissingThrowsTag", null);
- excludedProblems.put("JavadocMissingThrowsClassName", null);
- excludedProblems.put("JavadocInvalidThrowsClass", null);
- excludedProblems.put("JavadocDuplicateThrowsClassName", null);
- excludedProblems.put("JavadocInvalidThrowsClassName", null);
- excludedProblems.put("JavadocMissingSeeReference", null);
- excludedProblems.put("JavadocInvalidSeeReference", null);
- excludedProblems.put("JavadocInvalidSeeHref", null);
- excludedProblems.put("JavadocInvalidSeeArgs", null);
- excludedProblems.put("JavadocMissing", null);
- excludedProblems.put("JavadocInvalidTag", null);
- excludedProblems.put("JavadocUndefinedField", null);
- excludedProblems.put("JavadocNotVisibleField", null);
- excludedProblems.put("JavadocAmbiguousField", null);
- excludedProblems.put("JavadocUsingDeprecatedField", null);
- excludedProblems.put("JavadocUndefinedConstructor", null);
- excludedProblems.put("JavadocNotVisibleConstructor", null);
- excludedProblems.put("JavadocAmbiguousConstructor", null);
- excludedProblems.put("JavadocUsingDeprecatedConstructor", null);
- excludedProblems.put("JavadocUndefinedMethod", null);
- excludedProblems.put("JavadocNotVisibleMethod", null);
- excludedProblems.put("JavadocAmbiguousMethod", null);
- excludedProblems.put("JavadocUsingDeprecatedMethod", null);
- excludedProblems.put("JavadocNoMessageSendOnBaseType", null);
- excludedProblems.put("JavadocParameterMismatch", null);
- excludedProblems.put("JavadocNoMessageSendOnArrayType", null);
- excludedProblems.put("JavadocUndefinedType", null);
- excludedProblems.put("JavadocNotVisibleType", null);
- excludedProblems.put("JavadocAmbiguousType", null);
- excludedProblems.put("JavadocUsingDeprecatedType", null);
- excludedProblems.put("JavadocInternalTypeNameProvided", null);
- excludedProblems.put("JavadocInheritedMethodHidesEnclosingName", null);
- excludedProblems.put("JavadocInheritedFieldHidesEnclosingName", null);
- excludedProblems.put("JavadocInheritedNameHidesEnclosingTypeName", null);
- excludedProblems.put("JavadocAmbiguousMethodReference", null);
- excludedProblems.put("JavadocUnterminatedInlineTag", null);
- excludedProblems.put("JavadocMalformedSeeReference", null);
- excludedProblems.put("JavadocMessagePrefix", null);
- excludedProblems.put("JavadocMissingHashCharacter", null);
- excludedProblems.put("JavadocEmptyReturnTag", null);
- excludedProblems.put("JavadocInvalidValueReference", null);
- excludedProblems.put("JavadocUnexpectedText", null);
- excludedProblems.put("JavadocInvalidParamTagName", null);
- excludedProblems.put("DuplicateTypeVariable", null);
- excludedProblems.put("IllegalTypeVariableSuperReference", null);
- excludedProblems.put("NonStaticTypeFromStaticInvocation", null);
- excludedProblems.put("ObjectCannotBeGeneric", null);
- excludedProblems.put("NonGenericType", null);
- excludedProblems.put("IncorrectArityForParameterizedType", null);
- excludedProblems.put("TypeArgumentMismatch", null);
- excludedProblems.put("DuplicateMethodErasure", null);
- excludedProblems.put("ReferenceToForwardTypeVariable", null);
- excludedProblems.put("BoundMustBeAnInterface", null);
- excludedProblems.put("UnsafeRawConstructorInvocation", null);
- excludedProblems.put("UnsafeRawMethodInvocation", null);
- excludedProblems.put("UnsafeTypeConversion", null);
- excludedProblems.put("InvalidTypeVariableExceptionType", null);
- excludedProblems.put("InvalidParameterizedExceptionType", null);
- excludedProblems.put("IllegalGenericArray", null);
- excludedProblems.put("UnsafeRawFieldAssignment", null);
- excludedProblems.put("FinalBoundForTypeVariable", null);
- excludedProblems.put("UndefinedTypeVariable", null);
- excludedProblems.put("SuperInterfacesCollide", null);
- excludedProblems.put("WildcardConstructorInvocation", null);
- excludedProblems.put("WildcardMethodInvocation", null);
- excludedProblems.put("WildcardFieldAssignment", null);
- excludedProblems.put("GenericMethodTypeArgumentMismatch", null);
- excludedProblems.put("GenericConstructorTypeArgumentMismatch", null);
- excludedProblems.put("UnsafeGenericCast", null);
- excludedProblems.put("IllegalInstanceofParameterizedType", null);
- excludedProblems.put("IllegalInstanceofTypeParameter", null);
- excludedProblems.put("NonGenericMethod", null);
- excludedProblems.put("IncorrectArityForParameterizedMethod", null);
- excludedProblems.put("ParameterizedMethodArgumentTypeMismatch", null);
- excludedProblems.put("NonGenericConstructor", null);
- excludedProblems.put("IncorrectArityForParameterizedConstructor", null);
- excludedProblems.put("ParameterizedConstructorArgumentTypeMismatch", null);
- excludedProblems.put("TypeArgumentsForRawGenericMethod", null);
- excludedProblems.put("TypeArgumentsForRawGenericConstructor", null);
- excludedProblems.put("SuperTypeUsingWildcard", null);
- excludedProblems.put("GenericTypeCannotExtendThrowable", null);
- excludedProblems.put("IllegalClassLiteralForTypeVariable", null);
- excludedProblems.put("UnsafeReturnTypeOverride", null);
- excludedProblems.put("MethodNameClash", null);
- excludedProblems.put("RawMemberTypeCannotBeParameterized", null);
- excludedProblems.put("MissingArgumentsForParameterizedMemberType", null);
- excludedProblems.put("StaticMemberOfParameterizedType", null);
- excludedProblems.put("BoundHasConflictingArguments", null);
- excludedProblems.put("DuplicateParameterizedMethods", null);
- excludedProblems.put("IllegalQualifiedParameterizedTypeAllocation", null);
- excludedProblems.put("DuplicateBounds", null);
- excludedProblems.put("BoundCannotBeArray", null);
- excludedProblems.put("UnsafeRawGenericConstructorInvocation", null);
- excludedProblems.put("UnsafeRawGenericMethodInvocation", null);
- excludedProblems.put("TypeParameterHidingType", null);
- excludedProblems.put("RawTypeReference", null);
- excludedProblems.put("NoAdditionalBoundAfterTypeVariable", null);
- excludedProblems.put("IncompatibleTypesInForeach", null);
- excludedProblems.put("InvalidTypeForCollection", null);
- excludedProblems.put("InvalidUsageOfTypeParameters", null);
- excludedProblems.put("InvalidUsageOfStaticImports", null);
- excludedProblems.put("InvalidUsageOfForeachStatements", null);
- excludedProblems.put("InvalidUsageOfTypeArguments", null);
- excludedProblems.put("InvalidUsageOfEnumDeclarations", null);
- excludedProblems.put("InvalidUsageOfVarargs", null);
- excludedProblems.put("InvalidUsageOfAnnotations", null);
- excludedProblems.put("InvalidUsageOfAnnotationDeclarations", null);
- excludedProblems.put("IllegalModifierForAnnotationMethod", null);
- excludedProblems.put("IllegalExtendedDimensions", null);
- excludedProblems.put("InvalidFileNameForPackageAnnotations", null);
- excludedProblems.put("IllegalModifierForAnnotationType", null);
- excludedProblems.put("IllegalModifierForAnnotationMemberType", null);
- excludedProblems.put("InvalidAnnotationMemberType", null);
- excludedProblems.put("AnnotationCircularitySelfReference", null);
- excludedProblems.put("AnnotationCircularity", null);
- excludedProblems.put("DuplicateAnnotation", null);
- excludedProblems.put("MissingValueForAnnotationMember", null);
- excludedProblems.put("DuplicateAnnotationMember", null);
- excludedProblems.put("UndefinedAnnotationMember", null);
- excludedProblems.put("AnnotationValueMustBeClassLiteral", null);
- excludedProblems.put("AnnotationValueMustBeConstant", null);
- excludedProblems.put("AnnotationFieldNeedConstantInitialization", null);
- excludedProblems.put("IllegalModifierForAnnotationField", null);
- excludedProblems.put("AnnotationCannotOverrideMethod", null);
- excludedProblems.put("AnnotationMembersCannotHaveParameters", null);
- excludedProblems.put("AnnotationMembersCannotHaveTypeParameters", null);
- excludedProblems.put("AnnotationTypeDeclarationCannotHaveSuperclass", null);
- excludedProblems.put("AnnotationTypeDeclarationCannotHaveSuperinterfaces", null);
- excludedProblems.put("DuplicateTargetInTargetAnnotation", null);
- excludedProblems.put("DisallowedTargetForAnnotation", null);
- excludedProblems.put("MethodMustOverride", null);
- excludedProblems.put("AnnotationTypeDeclarationCannotHaveConstructor", null);
- excludedProblems.put("AnnotationValueMustBeAnnotation", null);
- excludedProblems.put("AnnotationTypeUsedAsSuperInterface", null);
- excludedProblems.put("MissingOverrideAnnotation", null);
- excludedProblems.put("FieldMissingDeprecatedAnnotation", null);
- excludedProblems.put("MethodMissingDeprecatedAnnotation", null);
- excludedProblems.put("TypeMissingDeprecatedAnnotation", null);
- excludedProblems.put("UnhandledWarningToken", null);
- excludedProblems.put("AnnotationValueMustBeArrayInitializer", null);
- excludedProblems.put("CorruptedSignature", null);
- excludedProblems.put("BoxingConversion", null);
- excludedProblems.put("UnboxingConversion", null);
- excludedProblems.put("IllegalModifierForEnum", null);
- excludedProblems.put("IllegalModifierForEnumConstant", null);
- excludedProblems.put("IllegalModifierForLocalEnum", null);
- excludedProblems.put("IllegalModifierForMemberEnum", null);
- excludedProblems.put("CannotDeclareEnumSpecialMethod", null);
- excludedProblems.put("IllegalQualifiedEnumConstantLabel", null);
- excludedProblems.put("CannotExtendEnum", null);
- excludedProblems.put("CannotInvokeSuperConstructorInEnum", null);
- excludedProblems.put("EnumAbstractMethodMustBeImplemented", null);
- excludedProblems.put("EnumSwitchCannotTargetField", null);
- excludedProblems.put("IllegalModifierForEnumConstructor", null);
- excludedProblems.put("MissingEnumConstantCase", null);
- excludedProblems.put("EnumStaticFieldInInInitializerContext", null);
- excludedProblems.put("IllegalExtendedDimensionsForVarArgs", null);
- excludedProblems.put("MethodVarargsArgumentNeedCast", null);
- excludedProblems.put("ConstructorVarargsArgumentNeedCast", null);
- excludedProblems.put("VarargsConflict", null);
- excludedProblems.put("JavadocGenericMethodTypeArgumentMismatch", null);
- excludedProblems.put("JavadocNonGenericMethod", null);
- excludedProblems.put("JavadocIncorrectArityForParameterizedMethod", null);
- excludedProblems.put("JavadocParameterizedMethodArgumentTypeMismatch", null);
- excludedProblems.put("JavadocTypeArgumentsForRawGenericMethod", null);
- excludedProblems.put("JavadocGenericConstructorTypeArgumentMismatch", null);
- excludedProblems.put("JavadocNonGenericConstructor", null);
- excludedProblems.put("JavadocIncorrectArityForParameterizedConstructor", null);
- excludedProblems.put("JavadocParameterizedConstructorArgumentTypeMismatch", null);
- excludedProblems.put("JavadocTypeArgumentsForRawGenericConstructor", null);
- excludedProblems.put("ExternalProblemNotFixable", null);
- excludedProblems.put("ExternalProblemFixable", null);
- // TODO (maxime) there are obviously too many exclusions here...
-
- Field[] fields = (iProblemClass = IProblem.class).getFields();
- for (int i = 0, length = fields.length; i < length; i++) {
- Field field = fields[i];
- int pureProblemId;
- if (field.getType() == Integer.TYPE) {
- if ((pureProblemId = field.getInt(iProblemClass) & IProblem.IgnoreCategoriesMask) != 0
- && pureProblemId != IProblem.IgnoreCategoriesMask
- && ProblemReporter.getProblemCategory(ProblemSeverities.Error, pureProblemId)
- == CategorizedProblem.CAT_UNSPECIFIED
- && !excludedProblems.containsKey(field.getName())) {
- fail("unspecified category for problem " + field.getName());
-// System.out.println("excludedProblems.put(\"" + field.getName() + "\", null);");
- }
- }
- }
- }
- catch (IllegalAccessException e) {
- fail("could not access members");
- }
-}
-class TasksReader implements ICompilerRequestor {
- CompilationResult result;
- public void acceptResult(CompilationResult compilationResult) {
- this.result = compilationResult;
- }
-}
-static String taskTagsAsCutAndPaste(CategorizedProblem tasks[]) {
- StringBuffer result = new StringBuffer();
- String arguments[];
- for (int i = 0; i < tasks.length - 1; i++) {
- arguments = tasks[i].getArguments();
- System.out.print("\t\t\"[");
- System.out.print(arguments[0]);
- System.out.print(',');
- System.out.print(arguments[1]);
- System.out.print(',');
- System.out.print(arguments[2]);
- System.out.println("]\\n\" +");
- }
- arguments = tasks[tasks.length - 1].getArguments();
- System.out.print("\t\t\"[");
- System.out.print(arguments[0]);
- System.out.print(',');
- System.out.print(arguments[1]);
- System.out.print(',');
- System.out.print(arguments[2]);
- System.out.println("]\\n\"");
- return result.toString();
-}
-static String taskTagsAsStrings(CategorizedProblem tasks[]) {
- StringBuffer result = new StringBuffer();
- String arguments[];
- for (int i = 0; i < tasks.length; i++) {
- arguments = tasks[i].getArguments();
- result.append('[');
- result.append(arguments[0]);
- result.append(',');
- result.append(arguments[1]);
- result.append(',');
- result.append(arguments[2]);
- result.append(']');
- result.append("\n");
- }
- return result.toString();
-}
-public void runTaskTagsOptionsTest(
- String[] testFiles,
- Map customOptions,
- String expectedTags) {
- TasksReader reader = new TasksReader();
- Map options = JavaScriptCore.getDefaultOptions();
- if (customOptions != null) {
- options.putAll(customOptions);
- }
- this.runConformTest(
- testFiles,
- "",
- null /* no extra class libraries */,
- true /* flush output directory */,
- null, /* no VM args */
- options,
- reader,
- true /* skip javac */);
- String tags = taskTagsAsStrings(reader.result.tasks);
- if (! tags.equals(expectedTags)) {
- System.out.println(getClass().getName() + '#' + getName());
- System.out.println("Effective results:");
- System.out.println(tags);
- System.out.println("Cut and paste:");
- taskTagsAsCutAndPaste(reader.result.tasks);
- assertEquals(expectedTags, tags);
- }
-}
-// Basic test on task tags: watch default behavior
-public void test003_task_tags_options() {
- this.runTaskTagsOptionsTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(X x) {\n" +
- " // FIXME TODO XXX message contents\n" +
- " }\n" +
- "}\n"},
- null,
- "[FIXME,message contents,HIGH]\n" +
- "[TODO,message contents,NORMAL]\n" +
- "[XXX,message contents,NORMAL]\n");
-}
-// effect of cancelling priorities
-// reactivate when bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=143402 is fixed
-public void _test004_task_tags_options() {
- Map customOptions = new HashMap();
- customOptions.put(JavaScriptCore.COMPILER_TASK_PRIORITIES, "");
- this.runTaskTagsOptionsTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(X x) {\n" +
- " // FIXME TODO XXX message contents\n" +
- " }\n" +
- "}\n"},
- customOptions,
- "[FIXME,message contents,NORMAL]\n" +
- "[TODO,message contents,NORMAL]\n" +
- "[XXX,message contents,NORMAL]\n");
-}
-// effect of cancelling priorities
-// reactivate when bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=143402 is fixed
-public void _test005_task_tags_options() {
- Map customOptions = new HashMap();
- customOptions.put(JavaScriptCore.COMPILER_TASK_PRIORITIES, ",,");
- this.runTaskTagsOptionsTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(X x) {\n" +
- " // FIXME TODO XXX message contents\n" +
- " }\n" +
- "}\n"},
- customOptions,
- "[FIXME,message contents,NORMAL]\n" +
- "[TODO,message contents,NORMAL]\n" +
- "[XXX,message contents,NORMAL]\n");
- // would expect an exception of some sort
-}
-// effect of changing priorities
-// reactivate when bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=143402 is fixed
-public void _test006_task_tags_options() {
- Map customOptions = new HashMap();
- customOptions.put(JavaScriptCore.COMPILER_TASK_PRIORITIES, "A,B,C,D,E");
- this.runTaskTagsOptionsTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(X x) {\n" +
- " // FIXME TODO XXX message contents\n" +
- " }\n" +
- "}\n"},
- customOptions,
- "[FIXME,message contents,NORMAL]\n" +
- "[TODO,message contents,NORMAL]\n" +
- "[XXX,message contents,NORMAL]\n");
- // would expect an exception of some sort
-}
-// effect of changing priorities
-public void test007_task_tags_options() {
- Map customOptions = new HashMap();
- customOptions.put(JavaScriptCore.COMPILER_TASK_PRIORITIES, "NORMAL,NORMAL,NORMAL");
- this.runTaskTagsOptionsTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(X x) {\n" +
- " // FIXME TODO XXX message contents\n" +
- " }\n" +
- "}\n"},
- customOptions,
- "[FIXME,message contents,NORMAL]\n" +
- "[TODO,message contents,NORMAL]\n" +
- "[XXX,message contents,NORMAL]\n");
-}
-// effect of changing priorities
-// reactivate when bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=143402 is fixed
-public void _test008_task_tags_options() {
- Map customOptions = new HashMap();
- customOptions.put(JavaScriptCore.COMPILER_TASK_PRIORITIES, "NORMAL,NORMAL"); // one less than the number of tags
- this.runTaskTagsOptionsTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " void foo(X x) {\n" +
- " // FIXME TODO XXX message contents\n" +
- " }\n" +
- "}\n"},
- customOptions,
- "[FIXME,message contents,NORMAL]\n" +
- "[TODO,message contents,NORMAL]\n" +
- "[XXX,message contents,NORMAL]\n");
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/Compliance_1_3.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/Compliance_1_3.java
deleted file mode 100644
index 6423214..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/Compliance_1_3.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import java.util.Map;
-
-import junit.framework.Test;
-
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-
-public class Compliance_1_3 extends AbstractRegressionTest {
-boolean docSupport = false;
-
-public Compliance_1_3(String name) {
- super(name);
-}
-
-/*
- * Toggle compiler in mode -1.3
- */
-protected Map getCompilerOptions() {
- Map options = super.getCompilerOptions();
- if (docSupport) {
- options.put(CompilerOptions.OPTION_DocCommentSupport, CompilerOptions.ENABLED);
- options.put(CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.ERROR);
- options.put(CompilerOptions.OPTION_ReportInvalidJavadocTags, CompilerOptions.ENABLED);
- }
- return options;
-}
-public static Test suite() {
- return buildUniqueComplianceTestSuite(testClass(), COMPLIANCE_1_3);
-}
-public static Class testClass() {
- return Compliance_1_3.class;
-}
-// Use this static initializer to specify subset for tests
-// All specified tests which does not belong to the class are skipped...
-static {
-// TESTS_NAMES = new String[] { "Bug58069" };
-// TESTS_NUMBERS = new int[] { 104 };
-// TESTS_RANGE = new int[] { 76, -1 };
-}
-/* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
-protected void setUp() throws Exception {
- super.setUp();
- // Javadoc disabled by default
- docSupport = false;
-}
-
-// test001 - moved to SuperTypeTest#test002
-// test002 - moved to SuperTypeTest#test003
-// test003 - moved to SuperTypeTest#test004
-// test004 - moved to SuperTypeTest#test005
-// test005 - moved to SuperTypeTest#test006
-// test006 - moved to SuperTypeTest#test007
-// test007 - moved to TryStatementTest#test057
-// test008 - moved to LookupTest#test074
-// test009 - moved to RuntimeTests#test1004
-
-// check actualReceiverType when array type
-// test unreachable code complaints
-public void test011() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " void foo() { \n"+
- " while (false); \n" +
- " while (false) println(\"unreachable\"); \n" +
- " do ; while (false); \n" +
- " do println(\"unreachable\"); while (false); \n" +
- " for (;false;); \n" +
- " for (;false;) println(\"unreachable\"); \n" +
- " if (false); \n" +
- " if (false) println(\"unreachable\"); \n" +
- " } \n" +
- " function println(s){} \n" +
- " \n"
- },
- "----------\n" +
- "1. ERROR in p1\\X.js (at line 3)\n" +
- " while (false) System.out.println(\"unreachable\"); \n" +
- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Unreachable code\n" +
- "----------\n" +
- "2. ERROR in p1\\X.js (at line 7)\n" +
- " for (;false;) System.out.println(\"unreachable\"); \n" +
- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Unreachable code\n" +
- "----------\n"
- );
-}
-// binary compatibility
-
-
-/*
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=24744
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=23096
- */
-public void test037() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_TaskTags, "TODO:");
- this.runNegativeTest(
- new String[] {
- "X.js",
- "function X() {\n"+
- "}\n"+
- "// TODO: something"
- },
- "----------\n" +
- "1. WARNING in p\\X.js (at line 4)\n" +
- " // TODO: something\n" +
- " ^^^^^^^^^^^^^^^\n" +
- "TODO: something\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-
-/*
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=24833
- * http://dev.eclipse.org/bugs/show_bug.cgi?id=23096
- */
-public void test038() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_TaskTags, "TODO:");
- this.runNegativeTest(
- new String[] {
- "X.js",
- "// TODO: something"
- },
- "----------\n" +
- "1. WARNING in X.js (at line 1)\n" +
- " // TODO: something\n" +
- " ^^^^^^^^^^^^^^^\n" +
- "TODO: something\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-
-
-public void test072() {
-
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function main( args) {\n" +
- " try {\n" +
- " f();\n" +
- " } catch(e) {\n" +
- " println(\"SUCCESS\");\n" +
- " }\n" +
- " }\n" +
- " function f() {\n" +
- " function ff ()\n" +
- " // {\n" +
- " if (true) throw null;\n" +
- " }\n" +
- " // };\n" +
- " }\n" +
- " function println(s){}",
- },
- "----------\n" +
- "1. ERROR in X.js (at line 12)\n" +
- " if (true) throw null;\n" +
- " ^^^^\n" +
- "Cannot throw null as an exception\n" +
- "----------\n");
-}
-
-
-// checking for captured outer local initialization status
-// NOTE: only complain against non-inlinable outer locals
-// http://bugs.eclipse.org/bugs/show_bug.cgi?id=26134
-public void test074() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function main(args) { \n" +
- " var nonInlinedString = \"[Local]\"; \n" +
- " var i = 2; \n" +
- " switch(i){ \n" +
- " case 1: \n" +
- " var displayString = nonInlinedString;\n" +
- " var inlinedString = \"a\"; \n" +
- "// class Local { \n" +
- " function toString() { \n" +
- " return inlinedString + displayString; \n" +
- " } \n" +
- "// } \n" +
- " case 2: \n" +
- "// print(new Local()); \n" +
- "// print(\"-\"); \n" +
-// " println(new Local(){ \n" +
-// " public String toString() { \n" +
-// " return super.toString()+\": anonymous\"; \n" +
-// " } \n" +
-// " }); \n" +
- " } \n" +
- " } \n" +
- " function println(s){}\n",
- },
- "----------\n" +
- "1. ERROR in X.js (at line 14)\n" +
- " System.out.print(new Local()); \n" +
- " ^^^^^^^^^^^\n" +
- "The local variable displayString may not have been initialized\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 16)\n" +
- " System.out.println(new Local(){ \n" +
- " public String toString() { \n" +
- " return super.toString()+\": anonymous\"; \n" +
- " } \n" +
- " }); \n" +
- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "The local variable displayString may not have been initialized\n" +
- "----------\n");
-}
-/*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=66533
- */
-public void test084() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " void foo() {\n" +
- " Object enum = null;\n" +
- " }\n" +
- "\n"
- },
- "----------\n" +
- "1. WARNING in X.js (at line 2)\n" +
- " Object enum = null;\n" +
- " ^^^^\n" +
- "\'enum\' should not be used as an identifier, since it is a reserved keyword from source level 5.0 on\n" +
- "----------\n");
-}
-public void test100() {
- this.runNegativeTest(
- new String[] {
- "X.js",
- " var \\ud800\\udc05\\ud800\\udc04\\ud800\\udc03\\ud800\\udc02\\ud800\\udc01\\ud800\\udc00;\n" +
- " function foo() {\n" +
- " var \\ud800\\udc05\\ud800\\udc04\\ud800\\udc03\\ud800\\udc02\\ud800\\udc01\\ud800\\udc00;\n" +
- " }\n" +
- "\n"
- },
- "----------\n" +
- "1. ERROR in X.js (at line 1)\n" +
- " int \\ud800\\udc05\\ud800\\udc04\\ud800\\udc03\\ud800\\udc02\\ud800\\udc01\\ud800\\udc00;\n" +
- " ^^^^^^\n" +
- "Invalid unicode\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 3)\n" +
- " int \\ud800\\udc05\\ud800\\udc04\\ud800\\udc03\\ud800\\udc02\\ud800\\udc01\\ud800\\udc00;\n" +
- " ^^^^^^\n" +
- "Invalid unicode\n" +
- "----------\n"
- );
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/DeprecatedTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/DeprecatedTest.java
deleted file mode 100644
index 0888dde..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/DeprecatedTest.java
+++ /dev/null
@@ -1,737 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-
-import junit.framework.Test;
-
-public class DeprecatedTest extends AbstractRegressionTest {
-public DeprecatedTest(String name) {
- super(name);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(testClass());
-}
-public void test001() {
- this.runNegativeTest(new String[] {
- "p/B.java",
- "package p;\n" +
- "class B extends A {\n" +
- " float x = super.x;\n" +
- "}\n",
-
- "p/A.java",
- "package p;\n" +
- "class A {\n" +
- " /** @deprecated */\n" +
- " int x = 1;\n" +
- "}\n",
- },
- "----------\n" +
- "1. WARNING in p\\B.java (at line 3)\n" +
- " float x = super.x;\n" +
- " ^\n" +
- "The field B.x is hiding a field from type A\n" +
- "----------\n" +
- "2. WARNING in p\\B.java (at line 3)\n" +
- " float x = super.x;\n" +
- " ^\n" +
- "The field A.x is deprecated\n" +
- "----------\n"
- );
-}
-public void test002() {
- this.runNegativeTest(new String[] {
- "p/C.java",
- "package p;\n" +
- "class C {\n" +
- " static int x = new A().x;\n" +
- "}\n",
-
- "p/A.java",
- "package p;\n" +
- "class A {\n" +
- " /** @deprecated */\n" +
- " int x = 1;\n" +
- "}\n",
-
- },
- "----------\n" +
- "1. WARNING in p\\C.java (at line 3)\n" +
- " static int x = new A().x;\n" +
- " ^\n" +
- "The field A.x is deprecated\n" +
- "----------\n"
- );
-}
-public void test003() {
- this.runNegativeTest(new String[] {
- "p/Top.java",
- "package p;\n" +
- "public class Top {\n" +
- " \n" +
- " class M1 {\n" +
- " class M2 {}\n" +
- " };\n" +
- " \n" +
- " static class StaticM1 {\n" +
- " static class StaticM2 {\n" +
- " class NonStaticM3{}};\n" +
- " };\n" +
- " \n" +
- "public static void main(String argv[]){\n" +
- " Top tip = new Top();\n" +
- " System.out.println(\"Still alive 0\");\n" +
- " tip.testStaticMember();\n" +
- " System.out.println(\"Still alive 1\");\n" +
- " tip.testStaticMember1();\n" +
- " System.out.println(\"Still alive 2\");\n" +
- " tip.testStaticMember2();\n" +
- " System.out.println(\"Still alive 3\");\n" +
- " tip.testStaticMember3();\n" +
- " System.out.println(\"Still alive 4\");\n" +
- " tip.testStaticMember4();\n" +
- " System.out.println(\"Completed\");\n" +
- "}\n" +
- " void testMember(){\n" +
- " new M1().new M2();}\n" +
- " void testStaticMember(){\n" +
- " new StaticM1().new StaticM2();}\n" +
- " void testStaticMember1(){\n" +
- " new StaticM1.StaticM2();}\n" +
- " void testStaticMember2(){\n" +
- " new StaticM1.StaticM2().new NonStaticM3();}\n" +
- " void testStaticMember3(){\n" +
- " // define an anonymous subclass of the non-static M3\n" +
- " new StaticM1.StaticM2().new NonStaticM3(){};\n" +
- " } \n" +
- " void testStaticMember4(){\n" +
- " // define an anonymous subclass of the non-static M3\n" +
- " new StaticM1.StaticM2().new NonStaticM3(){\n" +
- " Object hello(){\n" +
- " return new StaticM1.StaticM2().new NonStaticM3();\n" +
- " }};\n" +
- " \n" +
- " } \n" +
- "}\n",
- },
- "----------\n" +
- "1. ERROR in p\\Top.java (at line 30)\n" +
- " new StaticM1().new StaticM2();}\n" +
- " ^^^^^^^^^^^^^^\n" +
- "Illegal enclosing instance specification for type Top.StaticM1.StaticM2\n" +
- "----------\n" +
- "2. WARNING in p\\Top.java (at line 42)\n" +
- " Object hello(){\n" +
- " ^^^^^^^\n" +
- "The method hello() from the type new Top.StaticM1.StaticM2.NonStaticM3(){} is never used locally\n" +
- "----------\n");
-}
-/**
- * Regression test for PR #1G9ES9B
- */
-public void test004() {
- this.runNegativeTest(new String[] {
- "p/Warning.java",
- "package p;\n" +
- "import java.util.Date;\n" +
- "public class Warning {\n" +
- "public Warning() {\n" +
- " super();\n" +
- " Date dateObj = new Date();\n" +
- " dateObj.UTC(1,2,3,4,5,6);\n" +
- "}\n" +
- "}\n",
- },
- "----------\n" +
- "1. WARNING in p\\Warning.java (at line 7)\n" +
- " dateObj.UTC(1,2,3,4,5,6);\n" +
- " ^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "The static method UTC(int, int, int, int, int, int) from the type Date should be accessed in a static way\n" +
- "----------\n" +
- "2. WARNING in p\\Warning.java (at line 7)\n" +
- " dateObj.UTC(1,2,3,4,5,6);\n" +
- " ^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "The method UTC(int, int, int, int, int, int) from the type Date is deprecated\n" +
- "----------\n");
-}
-public void test005() {
- this.runConformTest(
- new String[] {
- "X.java",
- "public class X {\n"
- + "/**\n"
- + " * @deprecated\n"
- + " */\n"
- + " public static class Y {\n"
- + " }\n" +
- " public static void main(String[] args) { \n" +
- " System.out.print(\"SUCCESS\"); \n" +
- " } \n"
- + "}"
- },
- "SUCCESS", // expected output
- null,
- true, // flush previous output dir content
- null, // special vm args
- null, // custom options
- null); // custom requestor
- this.runNegativeTest(
- new String[] {
- "A.java",
- "public class A extends X.Y {}"
- },
- "----------\n" +
- "1. WARNING in A.java (at line 1)\n" +
- " public class A extends X.Y {}\n" +
- " ^^^\n" +
- "The type X.Y is deprecated\n" +
- "----------\n",// expected output
- null,
- false, // flush previous output dir content
- null); // custom options
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=40839
-public void test006() {
- this.runConformTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " /**\n" +
- " @deprecated\n" +
- " */\n" +
- " ; // line comment\n" +
- " static int i;\n" +
- " public static void main(String[] args) { \n" +
- " System.out.print(\"SUCCESS\"); \n" +
- " } \n" +
- "}"
- },
- "SUCCESS", // expected output
- null,
- true, // flush previous output dir content
- null, // special vm args
- null, // custom options
- null); // custom requestor
- this.runNegativeTest(
- new String[] {
- "A.java",
- "public class A {\n" +
- " public static void main(String[] args) { \n" +
- " System.out.print(X.i); \n" +
- " } \n" +
- "}"
- },
- "",// expected output
- null,
- false, // flush previous output dir content
- null); // custom options
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=88124
-public void test007() {
- this.runNegativeTest(
- new String[] {
- "X.java",
- "/**\n" +
- " * @deprecated\n" +
- " */\n" +
- "public class X {\n" +
- "}\n",
-
- "Y.java",
- "/**\n" +
- " * @deprecated\n" +
- " */\n" +
- "public class Y {\n" +
- " Zork z;\n" +
- " X x;\n" +
- " X foo() {\n" +
- " X x; // unexpected deprecated warning here\n" +
- " }\n" +
- "}\n",
- },
- "----------\n" +
- "1. ERROR in Y.java (at line 5)\n" +
- " Zork z;\n" +
- " ^^^^\n" +
- "Zork cannot be resolved to a type\n" +
- "----------\n" +
- "2. WARNING in Y.java (at line 8)\n" +
- " X x; // unexpected deprecated warning here\n" +
- " ^\n" +
- "The local variable x is hiding a field from type Y\n" +
- "----------\n");
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=88124 - variation
-public void test008() {
- this.runConformTest(
- new String[] {
- "X.java",
- "/**\n" +
- " * @deprecated\n" +
- " */\n" +
- "public class X {\n" +
- "}\n",
- },
- "");
- this.runNegativeTest(
- new String[] {
- "Y.java",
- "/**\n" +
- " * @deprecated\n" +
- " */\n" +
- "public class Y {\n" +
- " Zork z;\n" +
- " void foo() {\n" +
- " X x; // unexpected deprecated warning here\n" +
- " }\n" +
- "}\n",
- },
- "----------\n" +
- "1. ERROR in Y.java (at line 5)\n" +
- " Zork z;\n" +
- " ^^^^\n" +
- "Zork cannot be resolved to a type\n" +
- "----------\n",// expected output
- null,
- false, // flush previous output dir content
- null); // custom options
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=88124 - variation
-public void test009() {
- this.runNegativeTest(
- new String[] {
- "X.java",
- "/**\n" +
- " * @deprecated\n" +
- " */\n" +
- "public class X {\n" +
- "}\n",
-
- "Y.java",
- "/**\n" +
- " * @deprecated\n" +
- " */\n" +
- "public class Y {\n" +
- " Zork z;\n" +
- " void foo() {\n" +
- " X x; // unexpected deprecated warning here\n" +
- " }\n" +
- "}\n",
- },
- "----------\n" +
- "1. ERROR in Y.java (at line 5)\n" +
- " Zork z;\n" +
- " ^^^^\n" +
- "Zork cannot be resolved to a type\n" +
- "----------\n");
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=88187
-public void test010() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_DocCommentSupport, CompilerOptions.ENABLED);
- customOptions.put(CompilerOptions.OPTION_ReportInvalidAnnotation, CompilerOptions.WARNING);
- this.runNegativeTest(
- new String[] {
- "X.java",
- "/**\n" +
- " * @deprecated\n" +
- " */\n" +
- "public class X {\n" +
- " /**\n" +
- " * @see I2#foo()\n" +
- " */\n" +
- " I1 foo() {\n" +
- " return null;\n" +
- " }\n" +
- " Zork z;\n" +
- "}\n",
- "I1.java",
- "/**\n" +
- " * @deprecated\n" +
- " */\n" +
- "public interface I1 {\n" +
- " // empty block\n" +
- "}\n",
- "I2.java",
- "/**\n" +
- " * @deprecated\n" +
- " */\n" +
- "public interface I2 {\n" +
- " I1 foo(); // unexpected warning here\n" +
- "}\n",
- },
- "----------\n" +
- "1. ERROR in X.java (at line 11)\n" +
- " Zork z;\n" +
- " ^^^^\n" +
- "Zork cannot be resolved to a type\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=123522
-public void test011() {
- this.runNegativeTest(
- new String[] {
- "p1/X.java", // =================
- "package p1;\n" +
- "import p2.I;\n" +
- "/** @deprecated */\n" +
- "public class X {\n" +
- " Zork z;\n" +
- "}\n", // =================
- "p2/I.java", // =================
- "package p2;\n" +
- "/** @deprecated */\n" +
- "public interface I {\n" +
- "}\n", // =================
- },
- "----------\n" +
- "1. ERROR in p1\\X.java (at line 5)\n" +
- " Zork z;\n" +
- " ^^^^\n" +
- "Zork cannot be resolved to a type\n" +
- "----------\n");
-}
-
-// @deprecated upon locals do not influence the deprecation diagnostic
-// JLS3 9.6
-public void test012() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportDeprecation,
- CompilerOptions.ERROR);
- customOptions.put(CompilerOptions.OPTION_ReportDeprecationInDeprecatedCode,
- CompilerOptions.IGNORE);
- this.runNegativeTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " void foo() {\n" +
- " /** @deprecated */\n" +
- " int i1 = Y.m;\n" +
- " }\n" +
- " /** @deprecated */\n" +
- " void bar() {\n" +
- " int i1 = Y.m;\n" +
- " }\n" +
- "}\n",
- "Y.java",
- "public class Y {\n" +
- " /** @deprecated */\n" +
- " static int m;\n" +
- "}\n",
- },
- "----------\n" +
- "1. ERROR in X.java (at line 4)\n" +
- " int i1 = Y.m;\n" +
- " ^\n" +
- "The field Y.m is deprecated\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-
-// @deprecated upon locals do not influence the deprecation diagnostic
-// JLS3 9.6
-// @Deprecated variant
-public void test013() {
- if (COMPLIANCE_1_5.compareTo(this.complianceLevel) <= 0) {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportDeprecation,
- CompilerOptions.ERROR);
- customOptions.put(CompilerOptions.OPTION_ReportDeprecationInDeprecatedCode,
- CompilerOptions.IGNORE);
- this.runNegativeTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " void foo() {\n" +
- " @Deprecated\n" +
- " int i1 = Y.m;\n" +
- " }\n" +
- " @Deprecated\n" +
- " void bar() {\n" +
- " int i1 = Y.m;\n" +
- " }\n" +
- "}\n",
- "Y.java",
- "public class Y {\n" +
- " @Deprecated\n" +
- " static int m;\n" +
- "}\n",
- },
- "----------\n" +
- "1. ERROR in X.java (at line 4)\n" +
- " int i1 = Y.m;\n" +
- " ^\n" +
- "The field Y.m is deprecated\n" +
- "----------\n",
- null,
- true,
- customOptions);
- }
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=159243
-public void test014() {
- this.runNegativeTest(
- new String[] {
- "p/X.java",
- "package p;\n" +
- "/**\n" +
- " * @deprecated\n" +
- " */\n" +
- "public class X {\n" +
- "}\n",
- "Y.java",
- "import p.X;\n" +
- "public class Y {\n" +
- " Zork z;\n" +
- " void foo() {\n" +
- " X x;\n" +
- " X[] xs = { x };\n" +
- " }\n" +
- " void bar() {\n" +
- " p.X x;\n" +
- " p.X[] xs = { x };\n" +
- " }\n" +
- "}\n",
- },
- "----------\n" +
- "1. WARNING in Y.java (at line 1)\n" +
- " import p.X;\n" +
- " ^^^\n" +
- "The type X is deprecated\n" +
- "----------\n" +
- "2. ERROR in Y.java (at line 3)\n" +
- " Zork z;\n" +
- " ^^^^\n" +
- "Zork cannot be resolved to a type\n" +
- "----------\n" +
- "3. WARNING in Y.java (at line 5)\n" +
- " X x;\n" +
- " ^\n" +
- "The type X is deprecated\n" +
- "----------\n" +
- "4. WARNING in Y.java (at line 6)\n" +
- " X[] xs = { x };\n" +
- " ^\n" +
- "The type X is deprecated\n" +
- "----------\n" +
- "5. WARNING in Y.java (at line 9)\n" +
- " p.X x;\n" +
- " ^^^\n" +
- "The type X is deprecated\n" +
- "----------\n" +
- "6. WARNING in Y.java (at line 10)\n" +
- " p.X[] xs = { x };\n" +
- " ^^^\n" +
- "The type X is deprecated\n" +
- "----------\n");
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=159709
-// the order of the CUs must not modify the behavior, see also test016
-public void test015() {
- Map customOptions = new HashMap();
- customOptions.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "p/M1.java",
- "package p;\n" +
- "public class M1 {\n" +
- " void bar() {\n" +
- " a.N1.N2.N3 m = null;\n" +
- " m.foo();\n" +
- " }\n" +
- "}\n",
- "a/N1.java",
- "package a;\n" +
- "public class N1 {\n" +
- " /** @deprecated */\n" +
- " public class N2 {" +
- " public class N3 {" +
- " public void foo() {}" +
- " }" +
- " }" +
- "}\n",
- },
- "----------\n" +
- "1. ERROR in p\\M1.java (at line 4)\n" +
- " a.N1.N2.N3 m = null;\n" +
- " ^^^^^^^^^^\n" +
- "The type N1.N2 is deprecated\n" +
- "----------\n" +
- "2. ERROR in p\\M1.java (at line 4)\n" +
- " a.N1.N2.N3 m = null;\n" +
- " ^^^^^^^^^^\n" +
- "The type N1.N2.N3 is deprecated\n" +
- "----------\n" +
- "3. ERROR in p\\M1.java (at line 5)\n" +
- " m.foo();\n" +
- " ^^^^^^^\n" +
- "The method foo() from the type N1.N2.N3 is deprecated\n" +
- "----------\n",
- null,
- true,
- customOptions,
- true,
- false,
- false);
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=159709
-public void test016() {
- Map customOptions = new HashMap();
- customOptions.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "a/N1.java",
- "package a;\n" +
- "public class N1 {\n" +
- " /** @deprecated */\n" +
- " public class N2 {" +
- " public class N3 {" +
- " public void foo() {}" +
- " }" +
- " }" +
- "}\n",
- "p/M1.java",
- "package p;\n" +
- "public class M1 {\n" +
- " void bar() {\n" +
- " a.N1.N2.N3 m = null;\n" +
- " m.foo();\n" +
- " }\n" +
- "}\n",
- },
- "----------\n" +
- "1. ERROR in p\\M1.java (at line 4)\n" +
- " a.N1.N2.N3 m = null;\n" +
- " ^^^^^^^^^^\n" +
- "The type N1.N2 is deprecated\n" +
- "----------\n" +
- "2. ERROR in p\\M1.java (at line 4)\n" +
- " a.N1.N2.N3 m = null;\n" +
- " ^^^^^^^^^^\n" +
- "The type N1.N2.N3 is deprecated\n" +
- "----------\n" +
- "3. ERROR in p\\M1.java (at line 5)\n" +
- " m.foo();\n" +
- " ^^^^^^^\n" +
- "The method foo() from the type N1.N2.N3 is deprecated\n" +
- "----------\n",
- null,
- true,
- customOptions,
- true,
- false,
- false);
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=159709
-// variant: self-contained case, hence no report
-public void test017() {
- Map customOptions = new HashMap();
- customOptions.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR);
- customOptions.put(CompilerOptions.OPTION_ReportDeprecationInDeprecatedCode, CompilerOptions.ERROR);
- this.runConformTest(
- new String[] {
- "a/N1.java",
- "package a;\n" +
- "public class N1 {\n" +
- " /** @deprecated */\n" +
- " public class N2 {" +
- " public class N3 {" +
- " public void foo() {}" +
- " }" +
- " }" +
- " void bar() {\n" +
- " a.N1.N2.N3 m = null;\n" +
- " m.foo();\n" +
- " }\n" +
- "}\n"
- },
- "",
- null,
- true,
- null,
- customOptions,
- null,
- false);
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=159709
-// variant: using a binary class
-public void test018() {
- Map customOptions = new HashMap();
- customOptions.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR);
- customOptions.put(CompilerOptions.OPTION_ReportDeprecationInDeprecatedCode, CompilerOptions.ERROR);
- this.runConformTest(
- new String[] {
- "a/N1.java",
- "package a;\n" +
- "public class N1 {\n" +
- " /** @deprecated */\n" +
- " public class N2 {" +
- " public class N3 {" +
- " public void foo() {}" +
- " }" +
- " }" +
- "}\n"
- },
- "",
- null,
- true,
- null,
- customOptions,
- null,
- false);
- this.runNegativeTest(
- new String[] {
- "p/M1.java",
- "package p;\n" +
- "public class M1 {\n" +
- " void bar() {\n" +
- " a.N1.N2.N3 m = null;\n" +
- " m.foo();\n" +
- " }\n" +
- "}\n"
- },
- "----------\n" +
- "1. ERROR in p\\M1.java (at line 4)\n" +
- " a.N1.N2.N3 m = null;\n" +
- " ^^^^^^^^^^\n" +
- "The type N1.N2 is deprecated\n" +
- "----------\n" +
- "2. ERROR in p\\M1.java (at line 4)\n" +
- " a.N1.N2.N3 m = null;\n" +
- " ^^^^^^^^^^\n" +
- "The type N1.N2.N3 is deprecated\n" +
- "----------\n" +
- "3. ERROR in p\\M1.java (at line 5)\n" +
- " m.foo();\n" +
- " ^^^^^^^\n" +
- "The method foo() from the type N1.N2.N3 is deprecated\n" +
- "----------\n",
- null,
- false /* do not flush */,
- customOptions,
- true,
- false,
- false);
-}
-public static Class testClass() {
- return DeprecatedTest.class;
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ExternalizeStringLiterals15Test.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ExternalizeStringLiterals15Test.java
deleted file mode 100644
index df6a6df..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ExternalizeStringLiterals15Test.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import java.util.Map;
-
-import junit.framework.Test;
-
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-
-public class ExternalizeStringLiterals15Test extends AbstractRegressionTest {
-
-static {
-// TESTS_NAMES = new String[] { "test000" };
-// TESTS_NUMBERS = new int[] { 6 };
-// TESTS_RANGE = new int[] { 11, -1 };
-}
-public ExternalizeStringLiterals15Test(String name) {
- super(name);
-}
-public static Test suite() {
- return buildUniqueComplianceTestSuite(testClass(), COMPLIANCE_1_5);
-}
-
-public void test001() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runConformTest(
- new String[] {
- "X.java",
- "import static java.lang.annotation.ElementType.*;\n" +
- "import static java.lang.annotation.RetentionPolicy.*;\n" +
- "import java.lang.annotation.Retention;\n" +
- "import java.lang.annotation.Target;\n" +
- "@Target({TYPE, FIELD, METHOD,\r\n" +
- " PARAMETER, CONSTRUCTOR,\r\n" +
- " LOCAL_VARIABLE, PACKAGE})\r\n" +
- "@Retention(CLASS)\r\n" +
- "public @interface X\r\n" +
- "{\r\n" +
- " String[] value() default {};\r\n" +
- " String justification() default \"\";\r\n" +
- "}"
- },
- "",
- null,
- true,
- null,
- customOptions,
- null);
-}
-public void test002() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.java",
- "class X {\n" +
- " String s2 = \"test1\"; //$NON-NLS-1$\n" +
- " String s3 = \"test2\"; //$NON-NLS-1$//$NON-NLS-2$\n" +
- " \n" +
- " @SuppressWarnings(\"nls\")\n" +
- " void foo() {\n" +
- " String s4 = null;\n" +
- " String s5 = \"test3\";\n" +
- " String s6 = \"test4\";\n" +
- " System.out.println(\"test5\");\n" +
- " }\n" +
- "}",
- },
- "----------\n" +
- "1. ERROR in X.java (at line 3)\n" +
- " String s3 = \"test2\"; //$NON-NLS-1$//$NON-NLS-2$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 8)\n" +
- " String s5 = \"test3\";\n" +
- " ^^^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 9)\n" +
- " String s6 = \"test4\";\n" +
- " ^^^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n" +
- "4. ERROR in X.java (at line 10)\n" +
- " System.out.println(\"test5\");\n" +
- " ^^^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-public void test003() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.java",
- "class X {\n" +
- " String s2 = \"test1\"; //$NON-NLS-1$\n" +
- " String s3 = \"test2\"; //$NON-NLS-1$//$NON-NLS-2$\n" +
- " \n" +
- " @SuppressWarnings(\"nls\")\n" +
- " void foo() {\n" +
- " String s4 = null;\n" +
- " String s5 = null;//$NON-NLS-1$\n" +
- " String s6 = \"test4\";\n" +
- " System.out.println(\"test5\");\n" +
- " }\n" +
- "}",
- },
- "----------\n" +
- "1. ERROR in X.java (at line 3)\n" +
- " String s3 = \"test2\"; //$NON-NLS-1$//$NON-NLS-2$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 8)\n" +
- " String s5 = null;//$NON-NLS-1$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "3. ERROR in X.java (at line 9)\n" +
- " String s6 = \"test4\";\n" +
- " ^^^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n" +
- "4. ERROR in X.java (at line 10)\n" +
- " System.out.println(\"test5\");\n" +
- " ^^^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-public void test004() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.WARNING);
- this.runNegativeTest(
- new String[] {
- "X.java",
- "class X {\n" +
- " String s2 = \"test1\"; //$NON-NLS-1$\n" +
- " String s3 = \"test2\"; //$NON-NLS-1$//$NON-NLS-2$\n" +
- " \n" +
- " @SuppressWarnings(\"nls\")\n" +
- " void foo() {\n" +
- " String s4 = null;\n" +
- " String s5 = null;//$NON-NLS-1$\n" +
- " String s6 = \"test4\";\n" +
- " System.out.println(\"test5\");\n" +
- " }\n" +
- "}",
- },
- "----------\n" +
- "1. WARNING in X.java (at line 3)\n" +
- " String s3 = \"test2\"; //$NON-NLS-1$//$NON-NLS-2$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=162903
-public void test005() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.java",
- "class X {\n" +
- " @SuppressWarnings(\"nls\")\n" +
- " void foo() {\n" +
- " String s6 = \"SUCCESS\";\n" +
- " System.out.println(s6);\n" +
- " }\n" +
- "}",
- },
- "----------\n" +
- "1. ERROR in X.java (at line 4)\n" +
- " String s6 = \"SUCCESS\";\n" +
- " ^^^^^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=162903
-public void test006() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.WARNING);
- this.runConformTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " @SuppressWarnings(\"nls\")\n" +
- " public static void main(String[] args) {\n" +
- " String s6 = \"SUCCESS\";\n" +
- " System.out.println(s6);\n" +
- " }\n" +
- "}",
- },
- "SUCCESS",
- null,
- true,
- null,
- customOptions,
- null);
-}
-public static Class testClass() {
- return ExternalizeStringLiterals15Test.class;
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java
deleted file mode 100644
index e00ae3f..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java
+++ /dev/null
@@ -1,515 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import java.util.Map;
-
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-
-import junit.framework.Test;
-
-public class ExternalizeStringLiteralsTest extends AbstractRegressionTest {
-
-static {
-// TESTS_NAMES = new String[] { "test000" };
-// TESTS_NUMBERS = new int[] { 16 };
-// TESTS_RANGE = new int[] { 11, -1 };
-}
-public ExternalizeStringLiteralsTest(String name) {
- super(name);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(testClass());
-}
-
-public void test001() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "A.js",
- " function foo() {\n" +
- " println(\"a\");\n" +
- " } //$NON-NLS-1$ \n" +
- ""
- },
- "----------\n" +
- "1. ERROR in A.js (at line 2)\n" +
- " println(\"a\");\n" +
- " ^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n" +
- "2. ERROR in A.js (at line 3)\n" +
- " } //$NON-NLS-1$ \n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-
-public void test002() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " var s = null; //$NON-NLS-1$\n" +
- " var s2 = \"\"; //$NON-NLS-1$\n" +
- " var s3 = \"\"; //$NON-NLS-1$//$NON-NLS-2$\n" +
- " \n" +
- " function foo() {\n" +
- " var s4 = null; //$NON-NLS-1$\n" +
- " var s5 = \"\"; //$NON-NLS-1$\n" +
- " var s6 = \"\"; //$NON-NLS-2$//$NON-NLS-1$\n" +
- " println(\"foo\");//$NON-NLS-1$//$NON-NLS-2$\n" +
- " } //$NON-NLS-1$\n" +
- " //$NON-NLS-1$\n" +
- "",
- },
- "----------\n" +
- "1. ERROR in X.js (at line 1)\n" +
- " var s = null; //$NON-NLS-1$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 3)\n" +
- " var s3 = \"\"; //$NON-NLS-1$//$NON-NLS-2$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "3. ERROR in X.js (at line 6)\n" +
- " var s4 = null; //$NON-NLS-1$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "4. ERROR in X.js (at line 8)\n" +
- " var s6 = \"\"; //$NON-NLS-2$//$NON-NLS-1$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "5. ERROR in X.js (at line 9)\n" +
- " println(\"foo\");//$NON-NLS-1$//$NON-NLS-2$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "6. ERROR in X.js (at line 10)\n" +
- " } //$NON-NLS-1$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-public void test003() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "Foo.js",
- " function foo() {\n" +
- " println(\"string1\" + \"string2\" //$NON-NLS-1$\n" +
- " );\n" +
- "",
- },
- "----------\n" +
- "1. ERROR in Foo.js (at line 2)\n" +
- " println(\"string1\" + \"string2\" //$NON-NLS-1$\n" +
- " ^^^^^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n" +
- "2. ERROR in p\\Foo.js (at line 4)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-public void test004() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runConformTest(
- new String[] {
- "Foo.js",
- " function foo() {\n" +
- " //$NON-NLS-1$\n" +
- " };\n" +
- "",
- },
- "",
- null,
- true,
- null,
- customOptions,
- null);
-}
-public void test005() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function main( args) {\r\n" +
- " var s = \"\"; //$NON-NLS-1$//$NON-NLS-1$\r\n" +
- " }\r\n" +
- "",
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " var s = \"\"; //$NON-NLS-1$//$NON-NLS-1$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-public void test006() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " public static function main(String[] args) {\r\n" +
- " var s = \"\"; //$NON-NLS-1$//$NON-NLS-1$\r\n" +
- " \r\n" +
- "",
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " var s = \"\"; //$NON-NLS-1$//$NON-NLS-1$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 3)\n" +
- " }\n" +
- " ^\n" +
- "Syntax error, insert \"}\" to complete ClassBody\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-public void test007() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function main(args) {\r\n" +
- " var s = null; //$NON-NLS-1$//$NON-NLS-1$\r\n" +
- " }\r\n" +
- "",
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " var s = null; //$NON-NLS-1$//$NON-NLS-1$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 2)\n" +
- " var s = null; //$NON-NLS-1$//$NON-NLS-1$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-public void test008() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function main(args) {\r\n" +
- " var s = \"test\"; //$NON-NLS-2$//$NON-NLS-3$\r\n" +
- " }\r\n" +
- "",
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " var s = \"test\"; //$NON-NLS-2$//$NON-NLS-3$\n" +
- " ^^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 2)\n" +
- " var s = \"test\"; //$NON-NLS-2$//$NON-NLS-3$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "3. ERROR in X.js (at line 2)\n" +
- " var s = \"test\"; //$NON-NLS-2$//$NON-NLS-3$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-public void test009() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runConformTest(
- new String[] {
- "Foo.js",
- " function foo(i) {\n" +
- " println(\"test1\" + i + \"test2\"); //$NON-NLS-2$//$NON-NLS-1$\r\n" +
- " };\n" +
- "",
- },
- "",
- null,
- true,
- null,
- customOptions,
- null);
-}
-public void test010() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function main(args) {\n" +
- " var s = \"test\"; //$NON-NLS-2$//$NON-NLS-3$\n" +
- " var i = s;\n" +
- " println(s);\n" +
- " }\n" +
- "",
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " var s = \"test\"; //$NON-NLS-2$//$NON-NLS-3$\n" +
- " ^^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 2)\n" +
- " var s = \"test\"; //$NON-NLS-2$//$NON-NLS-3$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "3. ERROR in X.js (at line 2)\n" +
- " var s = \"test\"; //$NON-NLS-2$//$NON-NLS-3$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-public void test011() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function main(args) {\n" +
- " var i = null;\n" +
- " var s = \"test\"; //$NON-NLS-2$//$NON-NLS-3$\n" +
- " println(s + i);\n" +
- " }\n" +
- "",
- },
- "----------\n" +
- "2. ERROR in X.js (at line 3)\n" +
- " var s = \"test\"; //$NON-NLS-2$//$NON-NLS-3$\n" +
- " ^^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n" +
- "3. ERROR in X.js (at line 3)\n" +
- " var s = \"test\"; //$NON-NLS-2$//$NON-NLS-3$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "4. ERROR in X.js (at line 3)\n" +
- " var s = \"test\"; //$NON-NLS-2$//$NON-NLS-3$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-public void test012() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function main(args) {\n" +
- " var i = null;\n" +
- " var s = null; //$NON-NLS-2$//$NON-NLS-3$\n" +
- " println(s + i);\n" +
- " }\n" +
- "",
- },
- "----------\n" +
- "2. ERROR in X.js (at line 3)\n" +
- " var s = null; //$NON-NLS-2$//$NON-NLS-3$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "3. ERROR in X.js (at line 3)\n" +
- " var s = null; //$NON-NLS-2$//$NON-NLS-3$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-public void test013() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function main(args) {\n" +
- " var s = \"test1\";\n" +
- " println(s);\n" +
- " }\n" +
- "",
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " var s = \"test1\";\n" +
- " ^^^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=112973
-public void test014() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function main(args) {\n" +
- " var s = \"test1\"; //$NON-NLS-?$\n" +
- " println(s);\n" +
- " }\n" +
- "",
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " var s = \"test1\"; //$NON-NLS-?$\n" +
- " ^^^^^^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 2)\n" +
- " var s = \"test1\"; //$NON-NLS-?$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=114077
-public void test015() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " public function foo() {\n" +
- " var s1= null; //$NON-NLS-1$\n" +
- " var s2= \"\";\n" +
- " }\n" +
- "",
- },
- "----------\n" +
- "1. ERROR in X.js (at line 2)\n" +
- " var s1= null; //$NON-NLS-1$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 3)\n" +
- " var s2= \"\";\n" +
- " ^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=114077
-public void test016() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " var s1= null; //$NON-NLS-1$\n" +
- " \n" +
- " function foo() {\n" +
- " var s2= \"\";\n" +
- " }\n" +
- "}",
- },
- "----------\n" +
- "1. ERROR in X.js (at line 1)\n" +
- " private var s1= null; //$NON-NLS-1$\n" +
- " ^^^^^^^^^^^^^\n" +
- "Unnecessary $NON-NLS$ tag\n" +
- "----------\n" +
- "2. ERROR in X.js (at line 4)\n" +
- " var s2= \"\";\n" +
- " ^^\n" +
- "Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" +
- "----------\n",
- null,
- true,
- customOptions);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=148352
-public void test017() {
- Map customOptions = getCompilerOptions();
- customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.js",
- " function foo(locationInAST) {\n" +
- " var enclosingType= \"\"; //$NON-NLS-1$\n" +
- " if (locationInAST != null) {\n" +
- " enclosingType.toString()\n" +
- " }\n" +
- " }\n" +
- "",
- },
- "----------\n" +
- "1. ERROR in X.js (at line 5)\n" +
- " enclosingType.toString()\n" +
- " ^\n" +
- "Syntax error, insert \";\" to complete BlockStatements\n" +
- "----------\n",
- null,
- true,
- customOptions,
- false,
- false,
- false,
- false,
- true,
- null);
-}
-public static Class testClass() {
- return ExternalizeStringLiteralsTest.class;
-}
-}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/FieldAccessTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/FieldAccessTest.java
deleted file mode 100644
index 81e689b..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/FieldAccessTest.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import java.util.Map;
-
-import junit.framework.Test;
-
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-
-public class FieldAccessTest extends AbstractRegressionTest {
- static {
-// TESTS_NAMES = new String[] { "test000" };
-// TESTS_NUMBERS = new int[] { 5, 6 };
-// TESTS_RANGE = new int[] { 21, 50 };
- }
-
-public FieldAccessTest(String name) {
- super(name);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(testClass());
-}
-protected Map getCompilerOptions() {
- Map options = super.getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportIndirectStaticAccess, CompilerOptions.ERROR);
- return options;
-}
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=149004
-public void test001() {
- this.runConformTest(
- new String[] {
- "foo/BaseFoo.java",
- "package foo;\n" +
- "class BaseFoo {\n" +
- " public static final int VAL = 0;\n" +
- "}",
- "foo/NextFoo.java",
- "package foo;\n" +
- "public class NextFoo extends BaseFoo {\n" +
- "}",
- "bar/Bar.java",
- "package bar;\n" +
- "public class Bar {\n" +
- " int v = foo.NextFoo.VAL;\n" +
- "}"
- },
- "");
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=149004
-public void test002() {
- this.runNegativeTest(
- new String[] {
- "foo/BaseFoo.java",
- "package foo;\n" +
- "public class BaseFoo {\n" +
- " public static final int VAL = 0;\n" +
- "}",
- "foo/NextFoo.java",
- "package foo;\n" +
- "public class NextFoo extends BaseFoo {\n" +
- "}",
- "bar/Bar.java",
- "package bar;\n" +
- "public class Bar {\n" +
- " int v = foo.NextFoo.VAL;\n" +
- "}"
- },
- "----------\n" +
- "1. ERROR in bar\\Bar.java (at line 3)\n" +
- " int v = foo.NextFoo.VAL;\n" +
- " ^^^\n" +
- "The static field BaseFoo.VAL should be accessed directly\n" +
- "----------\n");
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=149004
-public void test003() {
- Map options = getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportNonStaticAccessToStatic, CompilerOptions.IGNORE);
- this.runConformTest(
- new String[] {
- "foo/BaseFoo.java",
- "package foo;\n" +
- "class BaseFoo {\n" +
- " public static final int VAL = 0;\n" +
- "}",
- "foo/NextFoo.java",
- "package foo;\n" +
- "public class NextFoo extends BaseFoo {\n" +
- "}",
- "bar/Bar.java",
- "package bar;\n" +
- "import foo.NextFoo;\n" +
- "public class Bar {\n" +
- " NextFoo[] tab = new NextFoo[] { new NextFoo() };\n" +
- " int v = tab[0].VAL;\n" +
- "}"
- },
- "",
- null,
- true,
- null,
- options,
- null);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=149004
-public void test004() {
- Map options = getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportNonStaticAccessToStatic, CompilerOptions.IGNORE);
- this.runNegativeTest(
- new String[] {
- "foo/BaseFoo.java",
- "package foo;\n" +
- "public class BaseFoo {\n" +
- " public static final int VAL = 0;\n" +
- "}",
- "foo/NextFoo.java",
- "package foo;\n" +
- "public class NextFoo extends BaseFoo {\n" +
- "}",
- "bar/Bar.java",
- "package bar;\n" +
- "import foo.NextFoo;\n" +
- "public class Bar {\n" +
- " NextFoo[] tab = new NextFoo[] { new NextFoo() };\n" +
- " int v = tab[0].VAL;\n" +
- "}"
- },
- "----------\n" +
- "1. ERROR in bar\\Bar.java (at line 5)\n" +
- " int v = tab[0].VAL;\n" +
- " ^^^\n" +
- "The static field BaseFoo.VAL should be accessed directly\n" +
- "----------\n",
- null,
- true,
- options);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=142234
-public void test005() {
- Map options = getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportUnqualifiedFieldAccess, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " private String memberVariable;\n" +
- " public String getMemberVariable() {\n" +
- " return (memberVariable);\n" +
- " }\n" +
- "}"
- },
- "----------\n" +
- "1. ERROR in X.java (at line 4)\n" +
- " return (memberVariable);\n" +
- " ^^^^^^^^^^^^^^\n" +
- "Unqualified access to the field X.memberVariable \n" +
- "----------\n",
- null,
- true,
- options);
-}
-//https://bugs.eclipse.org/bugs/show_bug.cgi?id=142234
-public void test006() {
- Map options = getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportUnqualifiedFieldAccess, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " private String memberVariable;\n" +
- " public String getMemberVariable() {\n" +
- " return \\u0028memberVariable\\u0029;\n" +
- " }\n" +
- "}"
- },
- "----------\n" +
- "1. ERROR in X.java (at line 4)\n" +
- " return \\u0028memberVariable\\u0029;\n" +
- " ^^^^^^^^^^^^^^\n" +
- "Unqualified access to the field X.memberVariable \n" +
- "----------\n",
- null,
- true,
- options);
-}
-public static Class testClass() {
- return FieldAccessTest.class;
-}
-}
-
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/FlowAnalysisTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/FlowAnalysisTest.java
deleted file mode 100644
index 5c6e0c6..0000000
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/FlowAnalysisTest.java
+++ /dev/null
@@ -1,1242 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.jsdt.core.tests.compiler.regression;
-
-import java.util.Map;
-
-import junit.framework.Test;
-
-import org.eclipse.wst.jsdt.core.compiler.CategorizedProblem;
-import org.eclipse.wst.jsdt.core.compiler.IProblem;
-import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
-import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemSeverities;
-
-public class FlowAnalysisTest extends AbstractRegressionTest {
-
-public FlowAnalysisTest(String name) {
- super(name);
-}
-public static Test suite() {
- return buildAllCompliancesTestSuite(testClass());
-}
-
-public void test001() {
- this.runNegativeTest(new String[] {
- "X.java", // =================
- "public class X {\n" +
- " public String foo(int i) {\n" +
- " if (true) {\n" +
- " return null;\n" +
- " }\n" +
- " if (i > 0) {\n" +
- " return null;\n" +
- " }\n" +
- " } \n" +
- "}\n",
- },
- "----------\n" +
- "1. ERROR in X.java (at line 2)\n" +
- " public String foo(int i) {\n" +
- " ^^^^^^^^^^\n" +
- "This method must return a result of type String\n" +
- "----------\n");
-}
-
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=127255
-// Compiler incorrectly reports "variable may not have been initialized"
-public void test002() {
- Map options = getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportParameterAssignment, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " public void test() {\n" +
- " int c1, c2;\n" +
- " while ((char) (c1 = 0) == 1) {}\n" +
- " if (c1 == 0) {} // silent\n" +
- " if (c2 == 0) {} // complain\n" +
- " }\n" +
- "}"
- },
- "----------\n" +
- "1. ERROR in X.java (at line 6)\n" +
- " if (c2 == 0) {} // complain\n" +
- " ^^\n" +
- "The local variable c2 may not have been initialized\n" +
- "----------\n",
- null, true, options);
-}
-
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=127255
-// Compiler incorrectly reports "variable may not have been initialized"
-public void test003() {
- Map options = getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportParameterAssignment, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " public void test() {\n" +
- " int c1, c2;\n" +
- " while ((char) (c1 = 0) == 1) ;\n" +
- " if (c1 == 0) {} // silent\n" +
- " if (c2 == 0) {} // complain\n" +
- " }\n" +
- "}"
- },
- "----------\n" +
- "1. ERROR in X.java (at line 6)\n" +
- " if (c2 == 0) {} // complain\n" +
- " ^^\n" +
- "The local variable c2 may not have been initialized\n" +
- "----------\n",
- null, true, options);
-}
-
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=127255
-// Compiler incorrectly reports "variable may not have been initialized"
-public void test004() {
- Map options = getCompilerOptions();
- options.put(CompilerOptions.OPTION_ReportParameterAssignment, CompilerOptions.ERROR);
- this.runNegativeTest(
- new String[] {
- "X.java",