Lines 8305-8311
Link Here
|
8305 |
|
8305 |
|
8306 |
/** |
8306 |
/** |
8307 |
* http://dev.eclipse.org/bugs/show_bug.cgi?id=144858 |
8307 |
* http://dev.eclipse.org/bugs/show_bug.cgi?id=144858 |
8308 |
* TODO (frederic) check that keys are different (PR 149590) |
|
|
8309 |
*/ |
8308 |
*/ |
8310 |
public void test0660() throws JavaModelException { |
8309 |
public void test0660() throws JavaModelException { |
8311 |
ICompilationUnit workingCopy = null; |
8310 |
ICompilationUnit workingCopy = null; |
Lines 8336-8344
Link Here
|
8336 |
assertNotNull("No binding", variableBinding); |
8335 |
assertNotNull("No binding", variableBinding); |
8337 |
assertEquals("Wrong name", "x", variableBinding.getName()); |
8336 |
assertEquals("Wrong name", "x", variableBinding.getName()); |
8338 |
// (PR 149590) |
8337 |
// (PR 149590) |
8339 |
// String key = variableBinding.getKey(); |
8338 |
String key = variableBinding.getKey(); |
8340 |
|
8339 |
|
8341 |
node = getASTNode(unit, 0, 0, 0); |
8340 |
node = getASTNode(unit, 0, 0, 1); |
8342 |
assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType()); |
8341 |
assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType()); |
8343 |
statement = (VariableDeclarationStatement) node; |
8342 |
statement = (VariableDeclarationStatement) node; |
8344 |
fragments = statement.fragments(); |
8343 |
fragments = statement.fragments(); |
Lines 8348-8355
Link Here
|
8348 |
assertNotNull("No binding", variableBinding); |
8347 |
assertNotNull("No binding", variableBinding); |
8349 |
assertEquals("Wrong name", "x", variableBinding.getName()); |
8348 |
assertEquals("Wrong name", "x", variableBinding.getName()); |
8350 |
// (PR 149590) |
8349 |
// (PR 149590) |
8351 |
// String key2 = variableBinding.getKey(); |
8350 |
String key2 = variableBinding.getKey(); |
8352 |
//assertFalse("Keys should not be equals", key2.equals(key)); |
8351 |
assertFalse("Keys should not be equals", key2.equals(key)); |
8353 |
} finally { |
8352 |
} finally { |
8354 |
if (workingCopy != null) |
8353 |
if (workingCopy != null) |
8355 |
workingCopy.discardWorkingCopy(); |
8354 |
workingCopy.discardWorkingCopy(); |
Lines 8358-8364
Link Here
|
8358 |
|
8357 |
|
8359 |
/** |
8358 |
/** |
8360 |
* http://dev.eclipse.org/bugs/show_bug.cgi?id=144858 |
8359 |
* http://dev.eclipse.org/bugs/show_bug.cgi?id=144858 |
8361 |
* TODO (frederic) check that keys are different (PR 149590) |
|
|
8362 |
*/ |
8360 |
*/ |
8363 |
public void test0661() throws JavaModelException { |
8361 |
public void test0661() throws JavaModelException { |
8364 |
ICompilationUnit workingCopy = null; |
8362 |
ICompilationUnit workingCopy = null; |
Lines 8392-8398
Link Here
|
8392 |
assertNotNull("No binding", variableBinding); |
8390 |
assertNotNull("No binding", variableBinding); |
8393 |
assertEquals("Wrong name", "x", variableBinding.getName()); |
8391 |
assertEquals("Wrong name", "x", variableBinding.getName()); |
8394 |
// (PR 149590) |
8392 |
// (PR 149590) |
8395 |
// String key = variableBinding.getKey(); |
8393 |
String key = variableBinding.getKey(); |
8396 |
|
8394 |
|
8397 |
node = getASTNode(unit, 0, 0, 1); |
8395 |
node = getASTNode(unit, 0, 0, 1); |
8398 |
assertEquals("Not a try statement", ASTNode.TRY_STATEMENT, node.getNodeType()); |
8396 |
assertEquals("Not a try statement", ASTNode.TRY_STATEMENT, node.getNodeType()); |
Lines 8405-8412
Link Here
|
8405 |
assertNotNull("No binding", variableBinding); |
8403 |
assertNotNull("No binding", variableBinding); |
8406 |
assertEquals("Wrong name", "x", variableBinding.getName()); |
8404 |
assertEquals("Wrong name", "x", variableBinding.getName()); |
8407 |
// (PR 149590) |
8405 |
// (PR 149590) |
8408 |
// String key2 = variableBinding.getKey(); |
8406 |
String key2 = variableBinding.getKey(); |
8409 |
//assertFalse("Keys should not be equals", key2.equals(key)); |
8407 |
assertFalse("Keys should not be equals", key2.equals(key)); |
8410 |
} finally { |
8408 |
} finally { |
8411 |
if (workingCopy != null) |
8409 |
if (workingCopy != null) |
8412 |
workingCopy.discardWorkingCopy(); |
8410 |
workingCopy.discardWorkingCopy(); |
Lines 8415-8421
Link Here
|
8415 |
|
8413 |
|
8416 |
/** |
8414 |
/** |
8417 |
* http://dev.eclipse.org/bugs/show_bug.cgi?id=144858 |
8415 |
* http://dev.eclipse.org/bugs/show_bug.cgi?id=144858 |
8418 |
* TODO (frederic) check that keys are different (PR 149590) |
|
|
8419 |
*/ |
8416 |
*/ |
8420 |
public void test0662() throws JavaModelException { |
8417 |
public void test0662() throws JavaModelException { |
8421 |
ICompilationUnit workingCopy = null; |
8418 |
ICompilationUnit workingCopy = null; |
Lines 8451-8457
Link Here
|
8451 |
assertNotNull("No binding", variableBinding); |
8448 |
assertNotNull("No binding", variableBinding); |
8452 |
assertEquals("Wrong name", "x", variableBinding.getName()); |
8449 |
assertEquals("Wrong name", "x", variableBinding.getName()); |
8453 |
// (PR 149590) |
8450 |
// (PR 149590) |
8454 |
// String key = variableBinding.getKey(); |
8451 |
String key = variableBinding.getKey(); |
8455 |
|
8452 |
|
8456 |
node = getASTNode(unit, 0, 0, 1); |
8453 |
node = getASTNode(unit, 0, 0, 1); |
8457 |
assertEquals("Not an if statement", ASTNode.IF_STATEMENT, node.getNodeType()); |
8454 |
assertEquals("Not an if statement", ASTNode.IF_STATEMENT, node.getNodeType()); |
Lines 8470-8477
Link Here
|
8470 |
assertEquals("Wrong name", "x", variableBinding.getName()); |
8467 |
assertEquals("Wrong name", "x", variableBinding.getName()); |
8471 |
|
8468 |
|
8472 |
// (PR 149590) |
8469 |
// (PR 149590) |
8473 |
// String key2 = variableBinding.getKey(); |
8470 |
String key2 = variableBinding.getKey(); |
8474 |
//assertFalse("Keys should not be equals", key2.equals(key)); |
8471 |
assertFalse("Keys should not be equals", key2.equals(key)); |
8475 |
} finally { |
8472 |
} finally { |
8476 |
if (workingCopy != null) |
8473 |
if (workingCopy != null) |
8477 |
workingCopy.discardWorkingCopy(); |
8474 |
workingCopy.discardWorkingCopy(); |
Lines 8480-8486
Link Here
|
8480 |
|
8477 |
|
8481 |
/** |
8478 |
/** |
8482 |
* http://dev.eclipse.org/bugs/show_bug.cgi?id=144858 |
8479 |
* http://dev.eclipse.org/bugs/show_bug.cgi?id=144858 |
8483 |
* TODO (frederic) check that keys are different (PR 149590) |
|
|
8484 |
*/ |
8480 |
*/ |
8485 |
public void test0663() throws JavaModelException { |
8481 |
public void test0663() throws JavaModelException { |
8486 |
ICompilationUnit workingCopy = null; |
8482 |
ICompilationUnit workingCopy = null; |
Lines 8519-8525
Link Here
|
8519 |
assertNotNull("No binding", variableBinding); |
8515 |
assertNotNull("No binding", variableBinding); |
8520 |
assertEquals("Wrong name", "i", variableBinding.getName()); |
8516 |
assertEquals("Wrong name", "i", variableBinding.getName()); |
8521 |
// (PR 149590) |
8517 |
// (PR 149590) |
8522 |
// String key = variableBinding.getKey(); |
8518 |
String key = variableBinding.getKey(); |
8523 |
|
8519 |
|
8524 |
Block block = (Block) statement.getBody(); |
8520 |
Block block = (Block) statement.getBody(); |
8525 |
List statements = block.statements(); |
8521 |
List statements = block.statements(); |
Lines 8540-8547
Link Here
|
8540 |
assertEquals("Wrong name", "i", variableBinding.getName()); |
8536 |
assertEquals("Wrong name", "i", variableBinding.getName()); |
8541 |
|
8537 |
|
8542 |
// (PR 149590) |
8538 |
// (PR 149590) |
8543 |
// String key2 = variableBinding.getKey(); |
8539 |
String key2 = variableBinding.getKey(); |
8544 |
//assertFalse("Keys should not be equals", key2.equals(key)); |
8540 |
assertFalse("Keys should not be equals", key2.equals(key)); |
8545 |
} finally { |
8541 |
} finally { |
8546 |
if (workingCopy != null) |
8542 |
if (workingCopy != null) |
8547 |
workingCopy.discardWorkingCopy(); |
8543 |
workingCopy.discardWorkingCopy(); |