Lines 122-128
Link Here
|
122 |
static { |
122 |
static { |
123 |
// TESTS_NAMES = new String[] {"test0602"}; |
123 |
// TESTS_NAMES = new String[] {"test0602"}; |
124 |
// TESTS_RANGE = new int[] { 713, -1 }; |
124 |
// TESTS_RANGE = new int[] { 713, -1 }; |
125 |
// TESTS_NUMBERS = new int[] { 653 }; |
125 |
TESTS_NUMBERS = new int[] { 719 }; |
126 |
} |
126 |
} |
127 |
public static Test suite() { |
127 |
public static Test suite() { |
128 |
return buildModelTestSuite(ASTConverterTestAST3_2.class); |
128 |
return buildModelTestSuite(ASTConverterTestAST3_2.class); |
Lines 10497-10500
Link Here
|
10497 |
} |
10497 |
} |
10498 |
} |
10498 |
} |
10499 |
} |
10499 |
} |
|
|
10500 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=258905 |
10501 |
public void test0719() throws JavaModelException { |
10502 |
ICompilationUnit workingCopy = null; |
10503 |
try { |
10504 |
workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/); |
10505 |
String contents = |
10506 |
"public class X {}"; |
10507 |
|
10508 |
CompilationUnit unit = (CompilationUnit) buildAST( |
10509 |
contents, |
10510 |
workingCopy, |
10511 |
true); |
10512 |
final AST currentAst = unit.getAST(); |
10513 |
// well known bindings |
10514 |
String[] wkbs = { |
10515 |
"byte", "char", "short", "int", "long", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ |
10516 |
"boolean", "float", "double", "void", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
10517 |
"java.lang.AssertionError", //$NON-NLS-1$ |
10518 |
"java.lang.Class", //$NON-NLS-1$ |
10519 |
"java.lang.Cloneable", //$NON-NLS-1$ |
10520 |
"java.lang.Error", //$NON-NLS-1$ |
10521 |
"java.lang.Exception", //$NON-NLS-1$ |
10522 |
"java.lang.Object", //$NON-NLS-1$ |
10523 |
"java.lang.RuntimeException", //$NON-NLS-1$ |
10524 |
"java.lang.String", //$NON-NLS-1$ |
10525 |
"java.lang.StringBuffer", //$NON-NLS-1$ |
10526 |
"java.lang.Throwable", //$NON-NLS-1$ |
10527 |
"java.io.Serializable", //$NON-NLS-1$ |
10528 |
"java.lang.Boolean", //$NON-NLS-1$ |
10529 |
"java.lang.Byte", //$NON-NLS-1$ |
10530 |
"java.lang.Character", //$NON-NLS-1$ |
10531 |
"java.lang.Double", //$NON-NLS-1$ |
10532 |
"java.lang.Float", //$NON-NLS-1$ |
10533 |
"java.lang.Integer", //$NON-NLS-1$ |
10534 |
"java.lang.Long", //$NON-NLS-1$ |
10535 |
"java.lang.Short", //$NON-NLS-1$ |
10536 |
"java.lang.Void", //$NON-NLS-1$ |
10537 |
}; |
10538 |
|
10539 |
// no-so-well-known bindings |
10540 |
String[] nwkbs = { |
10541 |
"verylong", //$NON-NLS-1$ |
10542 |
"java.lang.Math", //$NON-NLS-1$ |
10543 |
"com.example.MyCode", //$NON-NLS-1$ |
10544 |
}; |
10545 |
|
10546 |
// none of the well known bindings resolve in a plain AST |
10547 |
for (int i = 0; i<wkbs.length; i++) { |
10548 |
assertNotNull("No binding for " + wkbs[i], currentAst.resolveWellKnownType(wkbs[i])); |
10549 |
} |
10550 |
|
10551 |
// none of the no so well known bindings resolve either |
10552 |
for (int i = 0; i<nwkbs.length; i++) { |
10553 |
assertNull("Binding for " + nwkbs[i], currentAst.resolveWellKnownType(nwkbs[i])); |
10554 |
} |
10555 |
} finally { |
10556 |
if (workingCopy != null) { |
10557 |
workingCopy.discardWorkingCopy(); |
10558 |
} |
10559 |
} |
10560 |
} |
10500 |
} |
10561 |
} |