Lines 107-113
Link Here
|
107 |
|
107 |
|
108 |
static { |
108 |
static { |
109 |
// TESTS_NAMES = new String[] {"test0602"}; |
109 |
// TESTS_NAMES = new String[] {"test0602"}; |
110 |
// TESTS_NUMBERS = new int[] { 652 }; |
110 |
TESTS_NUMBERS = new int[] { 653 }; |
111 |
} |
111 |
} |
112 |
public static Test suite() { |
112 |
public static Test suite() { |
113 |
return buildModelTestSuite(ASTConverterTestAST3_2.class); |
113 |
return buildModelTestSuite(ASTConverterTestAST3_2.class); |
Lines 7988-7991
Link Here
|
7988 |
workingCopy.discardWorkingCopy(); |
7988 |
workingCopy.discardWorkingCopy(); |
7989 |
} |
7989 |
} |
7990 |
} |
7990 |
} |
|
|
7991 |
/** |
7992 |
* http://dev.eclipse.org/bugs/show_bug.cgi?id=150409 |
7993 |
*/ |
7994 |
public void test0653() throws JavaModelException { |
7995 |
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0653", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
7996 |
ASTNode result = runConversion(AST.JLS3, sourceUnit, true); |
7997 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); |
7998 |
CompilationUnit unit = (CompilationUnit) result; |
7999 |
|
8000 |
ASTNode node = getASTNode(unit, 0, 2, 0); |
8001 |
assertEquals("Not a method invocation", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); |
8002 |
ExpressionStatement statement = (ExpressionStatement) node; |
8003 |
MethodInvocation invocation = (MethodInvocation) statement.getExpression(); |
8004 |
List arguments = invocation.arguments(); |
8005 |
assertEquals("Wrong size", 1, arguments.size()); |
8006 |
Expression argument = (Expression) arguments.get(0); |
8007 |
assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, argument.getNodeType()); |
8008 |
invocation = (MethodInvocation) argument; |
8009 |
Expression expression = invocation.getExpression(); |
8010 |
assertEquals("Not a method invocation", ASTNode.FIELD_ACCESS, expression.getNodeType()); |
8011 |
FieldAccess fieldAccess = (FieldAccess) expression; |
8012 |
IVariableBinding variableBinding = fieldAccess.resolveFieldBinding(); |
8013 |
assertNotNull("No variable binding", variableBinding); |
8014 |
} |
7991 |
} |
8015 |
} |