Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

This commit was manufactured by cvs2svn to create tag 'v201108102002'.

  • Loading branch information...
commit 22e35de4c9191e43d5219122876233d507ff97a8 1 parent 16f0928
nitind authored

Showing 4,171 changed files with 0 additions and 83,101 deletions. Show diff stats Hide diff stats

  1. +0 7 tests/org.eclipse.wst.jsdt.core.tests.compiler/.classpath
  2. +0 2  tests/org.eclipse.wst.jsdt.core.tests.compiler/.cvsignore
  3. +0 28 tests/org.eclipse.wst.jsdt.core.tests.compiler/.project
  4. +0 3  tests/org.eclipse.wst.jsdt.core.tests.compiler/.settings/org.eclipse.core.resources.prefs
  5. +0 12 tests/org.eclipse.wst.jsdt.core.tests.compiler/.settings/org.eclipse.jdt.core.prefs
  6. +0 22 tests/org.eclipse.wst.jsdt.core.tests.compiler/META-INF/MANIFEST.MF
  7. +0 28 tests/org.eclipse.wst.jsdt.core.tests.compiler/about.html
  8. +0 18 tests/org.eclipse.wst.jsdt.core.tests.compiler/build.properties
  9. +0 16 tests/org.eclipse.wst.jsdt.core.tests.compiler/plugin.properties
  10. +0 150 ...rg.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/JSDTCompilerTests.java
  11. +0 481 ...st.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AbstractCompletionTest.java
  12. +0 333 ...wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AbstractSelectionTest.java
  13. +0 194 ....tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AllocationExpressionCompletionTest.java
  14. +0 214 ...re.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ClassLiteralAccessCompletionTest.java
  15. +0 8,713 ....wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionParserTest.java
  16. +0 9,671 ...wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionParserTest2.java
  17. +0 15,538 ...dt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionParserTestKeyword.java
  18. +0 1,031 ...st.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/CompletionRecoveryTest.java
  19. +0 2,375 ...st.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
  20. +0 2,033 ...se.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/DietCompletionTest.java
  21. +0 7,680 ...ipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/DietRecoveryTest.java
  22. +0 359 ....jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/DualParseSyntaxErrorTest.java
  23. +0 385 ...mpiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ExplicitConstructorInvocationCompletionTest.java
  24. +0 229 ...ompiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ExplicitConstructorInvocationSelectionTest.java
  25. +0 2,424 ...jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/FieldAccessCompletionTest.java
  26. +0 102 ...t.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/InMemoryNameEnvironment.java
  27. +0 456 ...t.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/InnerTypeCompletionTest.java
  28. +0 545 ...dt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/JavadocCompletionParserTest.java
  29. +0 492 ...t.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/LabelStatementCompletionTest.java
  30. +0 863 ...core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/MethodInvocationCompletionTest.java
  31. +0 923 ...dt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/NameReferenceCompletionTest.java
  32. +0 693 ...rg.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ParserTest.java
  33. +0 1,553 ...dt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/ReferenceTypeCompletionTest.java
  34. +0 108 ....jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/RunCompletionParserTests.java
  35. +0 865 ....wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SelectionJavadocTest.java
  36. +0 2,579 ...eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SelectionTest.java
  37. +0 229 ...clipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SelectionTest2.java
  38. +0 57 ....wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SingleCompletionTest.java
  39. +0 5,261 ...t.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceElementParserTest.java
  40. +0 122 ...g.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceField.java
  41. +0 52 ....eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceImport.java
  42. +0 32 ...pse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceInitializer.java
  43. +0 192 ....eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceMethod.java
  44. +0 49 ...eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourcePackage.java
  45. +0 271 ...rg.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceType.java
  46. +0 268 ...rg.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SourceUnit.java
  47. +0 3,734 ...wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/StatementRecoveryTest.java
  48. +0 327 ...lipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SyntaxErrorTest.java
  49. +0 120 ...s/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/TestAll.java
  50. +0 120 ...sdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/TestSourceElementRequestor.java
  51. +0 995 ...ipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ASTImplTests.java
  52. +0 49 ...sdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AbstractComparableTest.java
  53. +0 1,871 ...sdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AbstractRegressionTest.java
  54. +0 614 ...se.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AssignmentTest.java
  55. +0 200 ...wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicAnalyseTests.java
  56. +0 57 ...e.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicErrorTests.java
  57. +0 210 ...e.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicJsdocTests.java
  58. +0 1,017 ....wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicParserTests.java
  59. +0 1,832 ...wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicResolveTests.java
  60. +0 121 ...wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/CharOperationTest.java
  61. +0 791 ...dt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/CompilerInvocationTests.java
  62. +0 273 ...se.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/Compliance_1_3.java
  63. +0 737 ...se.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/DeprecatedTest.java
  64. +0 227 ...tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ExternalizeStringLiterals15Test.java
  65. +0 515 ...e.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java
  66. +0 199 ...e.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/FieldAccessTest.java
  67. +0 1,242 ....wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/FlowAnalysisTest.java
  68. +0 77 ....wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/ForStatementTest.java
  69. +0 115 ...dt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/InMemoryNameEnvironment.java
Sorry, we could not display the entire diff because too many files (4,171) changed.
7 tests/org.eclipse.wst.jsdt.core.tests.compiler/.classpath
... ... @@ -1,7 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<classpath>
3   - <classpathentry kind="src" path="src"/>
4   - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
5   - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
6   - <classpathentry kind="output" path="bin"/>
7   -</classpath>
2  tests/org.eclipse.wst.jsdt.core.tests.compiler/.cvsignore
... ... @@ -1,2 +0,0 @@
1   -build.xml
2   -javaCompiler...args
28 tests/org.eclipse.wst.jsdt.core.tests.compiler/.project
... ... @@ -1,28 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<projectDescription>
3   - <name>org.eclipse.wst.jsdt.core.tests.compiler</name>
4   - <comment></comment>
5   - <projects>
6   - </projects>
7   - <buildSpec>
8   - <buildCommand>
9   - <name>org.eclipse.jdt.core.javabuilder</name>
10   - <arguments>
11   - </arguments>
12   - </buildCommand>
13   - <buildCommand>
14   - <name>org.eclipse.pde.ManifestBuilder</name>
15   - <arguments>
16   - </arguments>
17   - </buildCommand>
18   - <buildCommand>
19   - <name>org.eclipse.pde.SchemaBuilder</name>
20   - <arguments>
21   - </arguments>
22   - </buildCommand>
23   - </buildSpec>
24   - <natures>
25   - <nature>org.eclipse.pde.PluginNature</nature>
26   - <nature>org.eclipse.jdt.core.javanature</nature>
27   - </natures>
28   -</projectDescription>
3  tests/org.eclipse.wst.jsdt.core.tests.compiler/.settings/org.eclipse.core.resources.prefs
... ... @@ -1,3 +0,0 @@
1   -#Wed Dec 12 03:20:36 EST 2007
2   -eclipse.preferences.version=1
3   -encoding/<project>=ISO-8859-1
12 tests/org.eclipse.wst.jsdt.core.tests.compiler/.settings/org.eclipse.jdt.core.prefs
... ... @@ -1,12 +0,0 @@
1   -#Mon Dec 07 03:40:31 EST 2009
2   -eclipse.preferences.version=1
3   -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4   -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
5   -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6   -org.eclipse.jdt.core.compiler.compliance=1.4
7   -org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8   -org.eclipse.jdt.core.compiler.debug.localVariable=generate
9   -org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10   -org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
11   -org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
12   -org.eclipse.jdt.core.compiler.source=1.3
22 tests/org.eclipse.wst.jsdt.core.tests.compiler/META-INF/MANIFEST.MF
... ... @@ -1,22 +0,0 @@
1   -Manifest-Version: 1.0
2   -Bundle-ManifestVersion: 2
3   -Bundle-Name: %pluginName
4   -Bundle-SymbolicName: org.eclipse.wst.jsdt.core.tests.compiler; singleton:=true
5   -Bundle-Version: 1.0.400.qualifier
6   -Bundle-Vendor: %providerName
7   -Bundle-Localization: plugin
8   -Require-Bundle: org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
9   - org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
10   - org.eclipse.wst.jsdt.core;bundle-version="[1.1.0,2.0.0)",
11   - org.junit;bundle-version=3.8.2
12   -Export-Package: org.eclipse.wst.jsdt.core.tests.compiler,
13   - org.eclipse.wst.jsdt.core.tests.compiler.parser,
14   - org.eclipse.wst.jsdt.core.tests.compiler.regression,
15   - org.eclipse.wst.jsdt.core.tests.eval.target,
16   - org.eclipse.wst.jsdt.core.tests.future.compiler.regression,
17   - org.eclipse.wst.jsdt.core.tests.interpret,
18   - org.eclipse.wst.jsdt.core.tests.junit.extension,
19   - org.eclipse.wst.jsdt.core.tests.runtime,
20   - org.eclipse.wst.jsdt.core.tests.util
21   -Bundle-RequiredExecutionEnvironment: J2SE-1.4
22   -Bundle-ActivationPolicy: lazy
28 tests/org.eclipse.wst.jsdt.core.tests.compiler/about.html
... ... @@ -1,28 +0,0 @@
1   -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2   - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3   -<html xmlns="http://www.w3.org/1999/xhtml">
4   -<head>
5   -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
6   -<title>About</title>
7   -</head>
8   -<body lang="EN-US">
9   -<h2>About This Content</h2>
10   -
11   -<p>June 2, 2006</p>
12   -<h3>License</h3>
13   -
14   -<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
15   -indicated below, the Content is provided to you under the terms and conditions of the
16   -Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
17   -at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
18   -For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
19   -
20   -<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
21   -being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
22   -apply to your use of any object code in the Content. Check the Redistributor's license that was
23   -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
24   -indicated below, the terms and conditions of the EPL still apply to any source code in the Content
25   -and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
26   -
27   -</body>
28   -</html>
18 tests/org.eclipse.wst.jsdt.core.tests.compiler/build.properties
... ... @@ -1,18 +0,0 @@
1   -###############################################################################
2   -# Copyright (c) 2005, 2007 IBM Corporation and others.
3   -# All rights reserved. This program and the accompanying materials
4   -# are made available under the terms of the Eclipse Public License v1.0
5   -# which accompanies this distribution, and is available at
6   -# http://www.eclipse.org/legal/epl-v10.html
7   -#
8   -# Contributors:
9   -# IBM Corporation - initial API and implementation
10   -###############################################################################
11   -bin.includes = test.xml,\
12   - .,\
13   - plugin.properties,\
14   - META-INF/,\
15   - about.html
16   -src.includes = test.xml
17   -source.. = src/
18   -jars.compile.order = .
16 tests/org.eclipse.wst.jsdt.core.tests.compiler/plugin.properties
... ... @@ -1,16 +0,0 @@
1   -###############################################################################
2   -# Copyright (c) 2007, 2010 IBM Corporation and others.
3   -# All rights reserved. This program and the accompanying materials
4   -# are made available under the terms of the Eclipse Public License v1.0
5   -# which accompanies this distribution, and is available at
6   -# http://www.eclipse.org/legal/epl-v10.html
7   -#
8   -# Contributors:
9   -# IBM Corporation - initial API and implementation
10   -###############################################################################
11   -
12   -#
13   -# Messages in plugin.xml.
14   -#
15   -pluginName=JSDT Core Compiler Tests
16   -providerName=Eclipse Web Tools Platform
150 ...eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/JSDTCompilerTests.java
... ... @@ -1,150 +0,0 @@
1   -/*******************************************************************************
2   - * Copyright (c) 2000, 2009 IBM Corporation and others.
3   - * All rights reserved. This program and the accompanying materials
4   - * are made available under the terms of the Eclipse Public License v1.0
5   - * which accompanies this distribution, and is available at
6   - * http://www.eclipse.org/legal/epl-v10.html
7   - *
8   - * Contributors:
9   - * IBM Corporation - initial API and implementation
10   - *******************************************************************************/
11   -package org.eclipse.wst.jsdt.core.tests.compiler;
12   -
13   -import java.util.ArrayList;
14   -import java.util.Iterator;
15   -
16   -import junit.framework.Test;
17   -import junit.framework.TestSuite;
18   -
19   -import org.eclipse.wst.jsdt.core.JavaScriptCore;
20   -import org.eclipse.wst.jsdt.core.tests.compiler.parser.SyntaxErrorTest;
21   -import org.eclipse.wst.jsdt.core.tests.compiler.regression.BasicAnalyseTests;
22   -import org.eclipse.wst.jsdt.core.tests.compiler.regression.BasicParserTests;
23   -import org.eclipse.wst.jsdt.core.tests.compiler.regression.BasicResolveTests;
24   -import org.eclipse.wst.jsdt.core.tests.compiler.regression.CharOperationTest;
25   -import org.eclipse.wst.jsdt.core.tests.compiler.regression.InferTypesTests;
26   -import org.eclipse.wst.jsdt.core.tests.compiler.regression.UtilTest;
27   -import org.eclipse.wst.jsdt.core.tests.compiler.util.ExclusionTests;
28   -import org.eclipse.wst.jsdt.core.tests.interpret.BasicInterpretTest;
29   -
30   -/**
31   - * Run all compiler regression tests
32   - */
33   -public class JSDTCompilerTests extends TestSuite {
34   -
35   -static {
36   - JavaScriptCore.getPlugin().getPluginPreferences().setValue("semanticValidation", true);
37   -}
38   -
39   -public JSDTCompilerTests() {
40   - this("JavaScript Model Tests");
41   -}
42   -
43   -public JSDTCompilerTests(String testName) {
44   - super(testName);
45   -}
46   -public static Test suite() {
47   -
48   - ArrayList standardTests = new ArrayList();
49   -
50   - // regression tests
51   - standardTests.add(BasicParserTests.class);
52   - standardTests.add(InferTypesTests.class);
53   - standardTests.add(BasicResolveTests.class);
54   - standardTests.add(BasicAnalyseTests.class);
55   - standardTests.add(CharOperationTest.class);
56   - standardTests.add(UtilTest.class);
57   -
58   - // parser tests
59   - standardTests.add(SyntaxErrorTest.class);
60   -
61   - // interpret tests
62   - standardTests.add(BasicInterpretTest.class);
63   -
64   -
65   -
66   -
67   -// standardTests.addAll(JavadocTest.allTestClasses);
68   -
69   -// standardTests.add(BasicErrorTests.class);
70   -
71   - // // add all javadoc tests
72   -// for (int i=0, l=JavadocTest.ALL_CLASSES.size(); i<l; i++) {
73   -// standardTests.add(JavadocTest.ALL_CLASSES.get(i));
74   -// }
75   -//
76   - TestSuite all = new TestSuite("JSDT 'Compiler' Tests");
77   - all.addTest(ExclusionTests.suite());
78   -
79   -
80   -// int possibleComplianceLevels = AbstractCompilerTest.getPossibleComplianceLevels();
81   -// if ((possibleComplianceLevels & AbstractCompilerTest.F_1_3) != 0) {
82   -// ArrayList tests_1_3 = (ArrayList)standardTests.clone();
83   -// tests_1_3.add(Compliance_1_3.class);
84   -// tests_1_3.add(JavadocTest_1_3.class);
85   -// // Reset forgotten subsets tests
86   -// TestCase.TESTS_PREFIX = null;
87   -// TestCase.TESTS_NAMES = null;
88   -// TestCase.TESTS_NUMBERS= null;
89   -// TestCase.TESTS_RANGE = null;
90   -// TestCase.RUN_ONLY_ID = null;
91   -// all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_3, tests_1_3));
92   -// }
93   -// if ((possibleComplianceLevels & AbstractCompilerTest.F_1_4) != 0) {
94   -// ArrayList tests_1_4 = (ArrayList)standardTests.clone();
95   -// tests_1_4.add(AssertionTest.class);
96   -// tests_1_4.add(Compliance_1_4.class);
97   -// tests_1_4.add(ClassFileReaderTest_1_4.class);
98   -// tests_1_4.add(JavadocTest_1_4.class);
99   -// // Reset forgotten subsets tests
100   -// TestCase.TESTS_PREFIX = null;
101   -// TestCase.TESTS_NAMES = null;
102   -// TestCase.TESTS_NUMBERS= null;
103   -// TestCase.TESTS_RANGE = null;
104   -// TestCase.RUN_ONLY_ID = null;
105   -// all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_4, tests_1_4));
106   -// }
107   -// if ((possibleComplianceLevels & AbstractCompilerTest.F_1_5) != 0) {
108   -// ArrayList tests_1_5 = (ArrayList)standardTests.clone();
109   -// tests_1_5.addAll(RunComparableTests.ALL_CLASSES);
110   -// tests_1_5.add(AssertionTest.class);
111   -// tests_1_5.add(ClassFileReaderTest_1_5.class);
112   -// tests_1_5.add(GenericTypeSignatureTest.class);
113   -// tests_1_5.add(InternalHexFloatTest.class);
114   -// tests_1_5.add(JavadocTest_1_5.class);
115   -// tests_1_5.add(BatchCompilerTest.class);
116   -// tests_1_5.add(ExternalizeStringLiterals15Test.class);
117   -// // Reset forgotten subsets tests
118   -// TestCase.TESTS_PREFIX = null;
119   -// TestCase.TESTS_NAMES = null;
120   -// TestCase.TESTS_NUMBERS= null;
121   -// TestCase.TESTS_RANGE = null;
122   -// TestCase.RUN_ONLY_ID = null;
123   -// all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_5, tests_1_5));
124   -// }
125   -// if ((possibleComplianceLevels & AbstractCompilerTest.F_1_6) != 0) {
126   -// ArrayList tests_1_6 = (ArrayList)standardTests.clone();
127   -// tests_1_6.addAll(RunComparableTests.ALL_CLASSES);
128   -// tests_1_6.add(AssertionTest.class);
129   -// tests_1_6.add(ClassFileReaderTest_1_5.class);
130   -// tests_1_6.add(GenericTypeSignatureTest.class);
131   -// tests_1_6.add(InternalHexFloatTest.class);
132   -// tests_1_6.add(JavadocTest_1_5.class);
133   -// tests_1_6.add(BatchCompilerTest.class);
134   -// tests_1_6.add(ExternalizeStringLiterals15Test.class);
135   -// tests_1_6.add(StackMapAttributeTest.class);
136   -// // Reset forgotten subsets tests
137   -// TestCase.TESTS_PREFIX = null;
138   -// TestCase.TESTS_NAMES = null;
139   -// TestCase.TESTS_NUMBERS= null;
140   -// TestCase.TESTS_RANGE = null;
141   -// TestCase.RUN_ONLY_ID = null;
142   -// all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_6, tests_1_6));
143   -// }
144   - for (Iterator iter = standardTests.iterator(); iter.hasNext();) {
145   - Class test = (Class) iter.next();
146   - all.addTestSuite(test);
147   - }
148   - return all;
149   -}
150   -}
481 ...jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AbstractCompletionTest.java
... ... @@ -1,481 +0,0 @@
1   -/*******************************************************************************
2   - * Copyright (c) 2000, 2007 IBM Corporation and others.
3   - * All rights reserved. This program and the accompanying materials
4   - * are made available under the terms of the Eclipse Public License v1.0
5   - * which accompanies this distribution, and is available at
6   - * http://www.eclipse.org/legal/epl-v10.html
7   - *
8   - * Contributors:
9   - * IBM Corporation - initial API and implementation
10   - *******************************************************************************/
11   -package org.eclipse.wst.jsdt.core.tests.compiler.parser;
12   -
13   -import java.util.Locale;
14   -
15   -import org.eclipse.wst.jsdt.internal.codeassist.complete.CompletionParser;
16   -import org.eclipse.wst.jsdt.internal.codeassist.complete.CompletionScanner;
17   -import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
18   -import org.eclipse.wst.jsdt.internal.compiler.DefaultErrorHandlingPolicies;
19   -import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
20   -import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
21   -import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
22   -import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
23   -import org.eclipse.wst.jsdt.internal.compiler.ast.Initializer;
24   -import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
25   -import org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit;
26   -import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
27   -import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
28   -import org.eclipse.wst.jsdt.internal.compiler.parser.Parser;
29   -import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblemFactory;
30   -import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
31   -import org.eclipse.wst.jsdt.core.compiler.CharOperation;
32   -import org.eclipse.wst.jsdt.core.tests.util.AbstractCompilerTest;
33   -import org.eclipse.wst.jsdt.core.tests.util.Util;
34   -
35   -public abstract class AbstractCompletionTest extends AbstractCompilerTest {
36   -
37   - public final static String NONE = "<NONE>";
38   -public AbstractCompletionTest(String testName){
39   - super(testName);
40   -}
41   -/*
42   - * DietParse with completionNode check
43   - */
44   -public void checkDietParse(
45   - char[] source,
46   - int cursorLocation,
47   - String expectedCompletion,
48   - String expectedUnitToString,
49   - String expectedCompletionIdentifier,
50   - String expectedReplacedSource,
51   - String testName) {
52   - this.checkDietParse(
53   - source,
54   - cursorLocation,
55   - expectedCompletion,
56   - null,
57   - expectedUnitToString,
58   - expectedCompletionIdentifier,
59   - expectedReplacedSource,
60   - testName);
61   -}
62   -/*
63   - * DietParse with completionNode check
64   - */
65   -public void checkDietParse(
66   - char[] source,
67   - int cursorLocation,
68   - String expectedCompletion,
69   - String expectedParentCompletion,
70   - String expectedUnitToString,
71   - String expectedCompletionIdentifier,
72   - String expectedReplacedSource,
73   - String testName) {
74   -
75   - CompilerOptions options = new CompilerOptions(getCompilerOptions());
76   - CompletionParser parser =
77   - new CompletionParser(
78   - new ProblemReporter(
79   - DefaultErrorHandlingPolicies.proceedWithAllProblems(),
80   - options,
81   - new DefaultProblemFactory(Locale.getDefault())));
82   -
83   - ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
84   - CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
85   -
86   - CompilationUnitDeclaration unit = parser.dietParse(sourceUnit, compilationResult, cursorLocation);
87   -
88   - String computedCompletion = parser.assistNode == null
89   - ? NONE
90   - : parser.assistNode.toString();
91   - String computedParentCompletion = parser.assistNodeParent == null
92   - ? NONE
93   - : parser.assistNodeParent.toString();
94   - String computedUnitToString = unit.toString();
95   - //System.out.println(computedUnitToString);
96   - //System.out.println(Util.displayString(computedUnitToString));
97   - //System.out.println(expectedUnitToString);
98   -
99   - if (!expectedCompletion.equals(computedCompletion)) {
100   - System.out.println(Util.displayString(computedCompletion));
101   - }
102   - assertEquals(
103   - "invalid completion node-" + testName,
104   - expectedCompletion,
105   - computedCompletion);
106   -
107   - if(expectedParentCompletion != null) {
108   - if (!expectedParentCompletion.equals(computedParentCompletion)) {
109   - System.out.println(Util.displayString(computedParentCompletion));
110   - }
111   - assertEquals(
112   - "invalid completion parent node-" + testName,
113   - expectedParentCompletion,
114   - computedParentCompletion);
115   - }
116   -
117   - if (!expectedUnitToString.equals(computedUnitToString)) {
118   - System.out.println(Util.displayString(computedUnitToString));
119   - }
120   - assertEquals(
121   - "invalid completion tree-" + testName,
122   - expectedUnitToString,
123   - computedUnitToString);
124   -
125   - if (expectedCompletionIdentifier != null){
126   - char[] chars = ((CompletionScanner)parser.scanner).completionIdentifier;
127   - String computedCompletionIdentifier = chars == null ? NONE : new String(chars);
128   - assertEquals(
129   - "invalid completion identifier-" + testName,
130   - expectedCompletionIdentifier,
131   - computedCompletionIdentifier);
132   - }
133   -
134   - if (expectedReplacedSource != null){
135   - char[] chars = null;
136   - if (parser.assistNode != null){
137   - chars = CharOperation.subarray(
138   - parser.scanner.source,
139   - parser.assistNode.sourceStart,
140   - parser.assistNode.sourceEnd + 1);
141   - } else {
142   - if (parser.assistIdentifier() != null){
143   - if (((CompletionScanner)parser.scanner).completedIdentifierEnd
144   - >= ((CompletionScanner)parser.scanner).completedIdentifierStart){
145   - chars = CharOperation.subarray(
146   - parser.scanner.source,
147   - ((CompletionScanner)parser.scanner).completedIdentifierStart,
148   - ((CompletionScanner)parser.scanner).completedIdentifierEnd + 1);
149   - }
150   - }
151   - }
152   - String computedReplacedSource = chars == null ? NONE : new String(chars);
153   - assertEquals(
154   - "invalid replaced source-" + testName,
155   - expectedReplacedSource,
156   - computedReplacedSource);
157   - }
158   -}
159   -/*
160   - * Parse a method with completionNode check
161   - */
162   -public void checkMethodParse(
163   - char[] source,
164   - int cursorLocation,
165   - String expectedCompletion,
166   - String expectedParentCompletion,
167   - String expectedUnitToString,
168   - String expectedCompletionIdentifier,
169   - String expectedReplacedSource,
170   - String[] expectedLabels,
171   - String testName) {
172   -
173   - assertTrue("bad cursor location",cursorLocation>=0);
174   - CompilerOptions options = new CompilerOptions(getCompilerOptions());
175   - CompletionParser parser =
176   - new CompletionParser(
177   - new ProblemReporter(
178   - DefaultErrorHandlingPolicies.proceedWithAllProblems(),
179   - options,
180   - new DefaultProblemFactory(Locale.getDefault())));
181   -
182   - ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
183   - CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
184   -
185   - CompilationUnitDeclaration unit = parser.dietParse(sourceUnit, compilationResult, cursorLocation);
186   -
187   - if (Parser.DO_DIET_PARSE)
188   - {
189   - ASTNode foundMethod = null;
190   - if (unit.types != null) {
191   - for (int i = 0; i < unit.types.length; i++) {
192   - TypeDeclaration type = unit.types[i];
193   - ASTNode method = findMethod(type, cursorLocation);
194   - if (method != null) {
195   - foundMethod = method;
196   - break;
197   - }
198   - }
199   - }
200   - assertTrue("no method found at cursor location", foundMethod != null);
201   - if (foundMethod instanceof AbstractMethodDeclaration) {
202   - parser.parseBlockStatements((AbstractMethodDeclaration)foundMethod, unit);
203   - } else {
204   - TypeDeclaration type = (TypeDeclaration)foundMethod;
205   - if (type.fields != null) {
206   - for (int i = 0; i < type.fields.length; i++) {
207   - FieldDeclaration field = type.fields[i];
208   - if (field.declarationSourceStart <= cursorLocation && (cursorLocation <= field.declarationSourceEnd || field.declarationSourceEnd == 0)) {
209   - if (field instanceof Initializer) {
210   - parser.parseBlockStatements((Initializer)field, type, unit);
211   - break;
212   - }
213   - assertTrue("TBD", false); // field initializer
214   - }
215   - }
216   - }
217   - }
218   - }
219   -
220   - String computedCompletion = parser.assistNode == null
221   - ? NONE
222   - : parser.assistNode.toString();
223   - String computedParentCompletion = parser.assistNodeParent == null
224   - ? NONE
225   - : parser.assistNodeParent.toString();
226   - String computedUnitToString = unit.toString();
227   -
228   - if (!expectedCompletion.equals(computedCompletion)) {
229   - System.out.println(Util.displayString(computedCompletion));
230   - }
231   - assertEquals(
232   - "invalid completion node-" + testName,
233   - expectedCompletion,
234   - computedCompletion);
235   -
236   - if(expectedParentCompletion != null) {
237   - if (!expectedParentCompletion.equals(computedParentCompletion)) {
238   - System.out.println(Util.displayString(computedParentCompletion));
239   - }
240   - assertEquals(
241   - "invalid completion parent node-" + testName,
242   - expectedParentCompletion,
243   - computedParentCompletion);
244   - }
245   -
246   - if (!expectedUnitToString.equals(computedUnitToString)) {
247   - System.out.println(Util.displayString(computedUnitToString));
248   - }
249   - assertEquals(
250   - "invalid completion location-"+testName,
251   - expectedUnitToString,
252   - computedUnitToString);
253   -
254   - if (expectedCompletionIdentifier != null){
255   - char[] chars = ((CompletionScanner)parser.scanner).completionIdentifier;
256   - String computedCompletionIdentifier = chars == null ? NONE : new String(chars);
257   - if (!expectedCompletionIdentifier.equals(computedCompletionIdentifier)) {
258   - System.out.println(Util.displayString(computedCompletionIdentifier));
259   - }
260   - assertEquals(
261   - "invalid completion identifier-" + testName,
262   - expectedCompletionIdentifier,
263   - computedCompletionIdentifier);
264   - }
265   - if (expectedReplacedSource != null){
266   - char[] chars = null;
267   - if (parser.assistNode != null){
268   - chars = CharOperation.subarray(
269   - parser.scanner.source,
270   - parser.assistNode.sourceStart,
271   - parser.assistNode.sourceEnd + 1);
272   - } else {
273   - if (parser.assistIdentifier() != null){
274   - if (((CompletionScanner)parser.scanner).completedIdentifierEnd
275   - >= ((CompletionScanner)parser.scanner).completedIdentifierStart){
276   - chars = CharOperation.subarray(
277   - parser.scanner.source,
278   - ((CompletionScanner)parser.scanner).completedIdentifierStart,
279   - ((CompletionScanner)parser.scanner).completedIdentifierEnd + 1);
280   - }
281   - }
282   - }
283   - String computedReplacedSource = chars == null ? NONE : new String(chars);
284   - if (!expectedReplacedSource.equals(computedReplacedSource)) {
285   - System.out.println(Util.displayString(computedReplacedSource));
286   - }
287   - assertEquals(
288   - "invalid replaced source-" + testName,
289   - expectedReplacedSource,
290   - computedReplacedSource);
291   - if (expectedReplacedSource.length() == 0) {
292   - assertEquals(
293   - "invalid insertion point-" + testName,
294   - cursorLocation + 1,
295   - parser.assistNode.sourceStart);
296   - }
297   - }
298   - if (expectedLabels != null) {
299   -// int length = (parser.labels == null) ? 0 : parser.labels.length;
300   -// assertEquals("invalid number of labels-" + testName, expectedLabels.length, length);
301   -// for (int i = 0; i < length; i++) {
302   -// String label = new String(parser.labels[i]);
303   -// assertEquals("invalid label-" + testName, expectedLabels[i], label);
304   -// }
305   - }
306   -}
307   -/*
308   - * Parse a method with completionNode check
309   - */
310   -public void checkMethodParse(
311   - char[] source,
312   - int cursorLocation,
313   - String expectedCompletion,
314   - String expectedUnitToString,
315   - String expectedCompletionIdentifier,
316   - String expectedReplacedSource,
317   - String testName) {
318   -
319   - this.checkMethodParse(
320   - source,
321   - cursorLocation,
322   - expectedCompletion,
323   - null,
324   - expectedUnitToString,
325   - expectedCompletionIdentifier,
326   - expectedReplacedSource,
327   - null,
328   - testName);
329   -}
330   -/*
331   - * Parse a method with completionNode check
332   - */
333   -public void checkMethodParse(
334   - char[] source,
335   - int cursorLocation,
336   - String expectedCompletion,
337   - String expectedParentCompletion,
338   - String expectedUnitToString,
339   - String expectedCompletionIdentifier,
340   - String expectedReplacedSource,
341   - String testName) {
342   -
343   - this.checkMethodParse(
344   - source,
345   - cursorLocation,
346   - expectedCompletion,
347   - expectedParentCompletion,
348   - expectedUnitToString,
349   - expectedCompletionIdentifier,
350   - expectedReplacedSource,
351   - null,
352   - testName);
353   -}
354   -/*
355   - * Parse a method with completionNode check
356   - */
357   -public void checkMethodParse(
358   - char[] source,
359   - int cursorLocation,
360   - String expectedCompletion,
361   - String expectedUnitToString,
362   - String expectedCompletionIdentifier,
363   - String expectedReplacedSource,
364   - String[] expectedLabels,
365   - String testName) {
366   -
367   - this.checkMethodParse(
368   - source,
369   - cursorLocation,
370   - expectedCompletion,
371   - null,
372   - expectedUnitToString,
373   - expectedCompletionIdentifier,
374   - expectedReplacedSource,
375   - expectedLabels,
376   - testName);
377   -}
378   -/*
379   - * Returns the method, the constructor or the type declaring the initializer
380   - * at the cursor location in the given type.
381   - * Returns null if not found.
382   - */
383   -private ASTNode findMethod(TypeDeclaration type, int cursorLocation) {
384   - if (type.methods != null) {
385   - for (int i = 0; i < type.methods.length; i++) {
386   - AbstractMethodDeclaration method = type.methods[i];
387   - if (method.declarationSourceStart <= cursorLocation && (cursorLocation <= method.declarationSourceEnd || method.declarationSourceEnd == 0)) {
388   - return method;
389   - }
390   - }
391   - }
392   - if (type.memberTypes != null) {
393   - for (int i = 0; i < type.memberTypes.length; i++) {
394   - TypeDeclaration memberType = type.memberTypes[i];
395   - ASTNode method = findMethod(memberType, cursorLocation);
396   - if (method != null) {
397   - return method;
398   - }
399   - }
400   - }
401   - if (type.fields != null) {
402   - for (int i = 0; i < type.fields.length; i++) {
403   - FieldDeclaration field = type.fields[i];
404   - if (field instanceof Initializer && field.declarationSourceStart <= cursorLocation && (cursorLocation <= field.declarationSourceEnd || field.declarationSourceEnd == 0)) {
405   - return type;
406   - }
407   - }
408   - }
409   - return null;
410   -}
411   -/**
412   - * Runs the given test that checks that diet completion parsing returns the given completion.
413   - */
414   -protected void runTestCheckDietParse(
415   - String compilationUnit,
416   - String completeBehind,
417   - String expectedCompletionNodeToString,
418   - String expectedUnitDisplayString,
419   - String expectedCompletionIdentifier,
420   - String expectedReplacedSource,
421   - String testName) {
422   -
423   - int cursorLocation = compilationUnit.indexOf(completeBehind) + completeBehind.length() - 1;
424   - this.checkDietParse(
425   - compilationUnit.toCharArray(),
426   - cursorLocation,
427   - expectedCompletionNodeToString,
428   - expectedUnitDisplayString,
429   - expectedCompletionIdentifier,
430   - expectedReplacedSource,
431   - testName);
432   -}
433   -/**
434   - * Runs the given test that checks that method completion parsing returns the given completion.
435   - */
436   -protected void runTestCheckMethodParse(
437   - String compilationUnit,
438   - String completeBehind,
439   - String expectedCompletionNodeToString,
440   - String expectedUnitDisplayString,
441   - String expectedCompletionIdentifier,
442   - String expectedReplacedSource,
443   - String[] expectedLabels,
444   - String testName) {
445   -
446   - int completeBehindStart = compilationUnit.indexOf(completeBehind);
447   - assertTrue("completeBehind string not found", completeBehindStart >= 0);
448   - int cursorLocation = completeBehindStart + completeBehind.length() - 1;
449   - this.checkMethodParse(
450   - compilationUnit.toCharArray(),
451   - cursorLocation,
452   - expectedCompletionNodeToString,
453   - expectedUnitDisplayString,
454   - expectedCompletionIdentifier,
455   - expectedReplacedSource,
456   - expectedLabels,
457   - testName);
458   -}
459   -/**
460   - * Runs the given test that checks that method completion parsing returns the given completion.
461   - */
462   -protected void runTestCheckMethodParse(
463   - String compilationUnit,
464   - String completeBehind,
465   - String expectedCompletionNodeToString,
466   - String expectedUnitDisplayString,
467   - String expectedCompletionIdentifier,
468   - String expectedReplacedSource,
469   - String testName) {
470   -
471   - this.runTestCheckMethodParse(
472   - compilationUnit,
473   - completeBehind,
474   - expectedCompletionNodeToString,
475   - expectedUnitDisplayString,
476   - expectedCompletionIdentifier,
477   - expectedReplacedSource,
478   - null,
479   - testName);
480   -}
481   -}
333 ....jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/AbstractSelectionTest.java
... ... @@ -1,333 +0,0 @@
1   -/*******************************************************************************
2   - * Copyright (c) 2000, 2007 IBM Corporation and others.
3   - * All rights reserved. This program and the accompanying materials
4   - * are made available under the terms of the Eclipse Public License v1.0
5   - * which accompanies this distribution, and is available at
6   - * http://www.eclipse.org/legal/epl-v10.html
7   - *
8   - * Contributors:
9   - * IBM Corporation - initial API and implementation
10   - *******************************************************************************/
11   -package org.eclipse.wst.jsdt.core.tests.compiler.parser;
12   -
13   -import java.util.Locale;
14   -
15   -import org.eclipse.wst.jsdt.internal.codeassist.select.SelectionParser;
16   -import org.eclipse.wst.jsdt.internal.codeassist.select.SelectionScanner;
17   -import org.eclipse.wst.jsdt.internal.compiler.CompilationResult;
18   -import org.eclipse.wst.jsdt.internal.compiler.DefaultErrorHandlingPolicies;
19   -import org.eclipse.wst.jsdt.internal.compiler.ast.AbstractMethodDeclaration;
20   -import org.eclipse.wst.jsdt.internal.compiler.ast.ASTNode;
21   -import org.eclipse.wst.jsdt.internal.compiler.ast.Block;
22   -import org.eclipse.wst.jsdt.internal.compiler.ast.CompilationUnitDeclaration;
23   -import org.eclipse.wst.jsdt.internal.compiler.ast.FieldDeclaration;
24   -import org.eclipse.wst.jsdt.internal.compiler.ast.Initializer;
25   -import org.eclipse.wst.jsdt.internal.compiler.ast.TypeDeclaration;
26   -import org.eclipse.wst.jsdt.internal.compiler.batch.CompilationUnit;
27   -import org.eclipse.wst.jsdt.internal.compiler.env.ICompilationUnit;
28   -import org.eclipse.wst.jsdt.internal.compiler.impl.CompilerOptions;
29   -import org.eclipse.wst.jsdt.internal.compiler.parser.Parser;
30   -import org.eclipse.wst.jsdt.internal.compiler.problem.DefaultProblemFactory;
31   -import org.eclipse.wst.jsdt.internal.compiler.problem.ProblemReporter;
32   -import org.eclipse.wst.jsdt.core.compiler.CharOperation;
33   -import org.eclipse.wst.jsdt.core.tests.util.AbstractCompilerTest;
34   -import org.eclipse.wst.jsdt.core.tests.util.Util;
35   -
36   -public abstract class AbstractSelectionTest extends AbstractCompilerTest {
37   -
38   - public final static String NONE = "<NONE>";
39   -public AbstractSelectionTest(String testName){
40   - super(testName);
41   -}
42   -/*
43   - * DietParse with selectionNode check
44   - */
45   -public void checkDietParse(
46   - char[] source,
47   - int selectionStart,
48   - int selectionEnd,
49   - String expectedSelection,
50   - String expectedUnitToString,
51   - String expectedSelectionIdentifier,
52   - String expectedSelectedSource,
53   - String testName) {
54   -
55   - CompilerOptions options = new CompilerOptions(getCompilerOptions());
56   - SelectionParser parser =
57   - new SelectionParser(
58   - new ProblemReporter(
59   - DefaultErrorHandlingPolicies.proceedWithAllProblems(),
60   - options,
61   - new DefaultProblemFactory(Locale.getDefault())));
62   -
63   - ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
64   - CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
65   -
66   - CompilationUnitDeclaration unit = parser.dietParse(sourceUnit, compilationResult, selectionStart, selectionEnd);
67   -
68   - String computedUnitToString = unit.toString();
69   - //System.out.println(computedUnitToString);
70   - //System.out.println(Util.displayString(computedUnitToString));
71   - //System.out.println(expectedUnitToString);
72   -
73   - String computedSelection = parser.assistNode == null
74   - ? NONE
75   - : parser.assistNode.toString();