Lines 8113-8119
Link Here
|
8113 |
false); |
8113 |
false); |
8114 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
8114 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
8115 |
CompilationUnit unit = (CompilationUnit) node; |
8115 |
CompilationUnit unit = (CompilationUnit) node; |
8116 |
String expectedError = "x cannot be resolved"; |
8116 |
String expectedError = "x cannot be resolved to a variable"; |
8117 |
assertProblemsSize(unit, 1, expectedError); |
8117 |
assertProblemsSize(unit, 1, expectedError); |
8118 |
node = getASTNode(unit, 0, 1, 0); |
8118 |
node = getASTNode(unit, 0, 1, 0); |
8119 |
assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); |
8119 |
assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); |
Lines 8851-8857
Link Here
|
8851 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
8851 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
8852 |
CompilationUnit unit = (CompilationUnit) node; |
8852 |
CompilationUnit unit = (CompilationUnit) node; |
8853 |
String expectedErrors = "Constructor call must be the first statement in a constructor\n" + |
8853 |
String expectedErrors = "Constructor call must be the first statement in a constructor\n" + |
8854 |
"zork cannot be resolved\n" + |
8854 |
"zork cannot be resolved to a variable\n" + |
8855 |
"Constructor call must be the first statement in a constructor\n" + |
8855 |
"Constructor call must be the first statement in a constructor\n" + |
8856 |
"Zork cannot be resolved to a type\n" + |
8856 |
"Zork cannot be resolved to a type\n" + |
8857 |
"Zork cannot be resolved to a type\n" + |
8857 |
"Zork cannot be resolved to a type\n" + |
Lines 8926-8933
Link Here
|
8926 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
8926 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
8927 |
CompilationUnit unit = (CompilationUnit) node; |
8927 |
CompilationUnit unit = (CompilationUnit) node; |
8928 |
String expectedErrors = |
8928 |
String expectedErrors = |
8929 |
"x cannot be resolved\n" + |
8929 |
"x cannot be resolved to a variable\n" + |
8930 |
"x cannot be resolved"; |
8930 |
"x cannot be resolved to a variable"; |
8931 |
assertProblemsSize(unit, 2, expectedErrors); |
8931 |
assertProblemsSize(unit, 2, expectedErrors); |
8932 |
node = getASTNode(unit, 0, 1, 0); |
8932 |
node = getASTNode(unit, 0, 1, 0); |
8933 |
assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); |
8933 |
assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); |
Lines 8973-8980
Link Here
|
8973 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
8973 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
8974 |
CompilationUnit unit = (CompilationUnit) node; |
8974 |
CompilationUnit unit = (CompilationUnit) node; |
8975 |
String expectedErrors = |
8975 |
String expectedErrors = |
8976 |
"x cannot be resolved\n" + |
8976 |
"x cannot be resolved to a variable\n" + |
8977 |
"x cannot be resolved"; |
8977 |
"x cannot be resolved to a variable"; |
8978 |
assertProblemsSize(unit, 2, expectedErrors); |
8978 |
assertProblemsSize(unit, 2, expectedErrors); |
8979 |
node = getASTNode(unit, 0, 1, 0); |
8979 |
node = getASTNode(unit, 0, 1, 0); |
8980 |
assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); |
8980 |
assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); |
Lines 9021-9028
Link Here
|
9021 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
9021 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
9022 |
CompilationUnit unit = (CompilationUnit) node; |
9022 |
CompilationUnit unit = (CompilationUnit) node; |
9023 |
String expectedErrors = |
9023 |
String expectedErrors = |
9024 |
"x cannot be resolved\n" + |
9024 |
"x cannot be resolved to a variable\n" + |
9025 |
"x cannot be resolved"; |
9025 |
"x cannot be resolved to a variable"; |
9026 |
assertProblemsSize(unit, 2, expectedErrors); |
9026 |
assertProblemsSize(unit, 2, expectedErrors); |
9027 |
node = getASTNode(unit, 0, 1, 0); |
9027 |
node = getASTNode(unit, 0, 1, 0); |
9028 |
assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); |
9028 |
assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); |
Lines 9070-9077
Link Here
|
9070 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
9070 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
9071 |
CompilationUnit unit = (CompilationUnit) node; |
9071 |
CompilationUnit unit = (CompilationUnit) node; |
9072 |
String expectedErrors = |
9072 |
String expectedErrors = |
9073 |
"x cannot be resolved\n" + |
9073 |
"x cannot be resolved to a variable\n" + |
9074 |
"x cannot be resolved"; |
9074 |
"x cannot be resolved to a variable"; |
9075 |
assertProblemsSize(unit, 2, expectedErrors); |
9075 |
assertProblemsSize(unit, 2, expectedErrors); |
9076 |
node = getASTNode(unit, 0, 1, 0); |
9076 |
node = getASTNode(unit, 0, 1, 0); |
9077 |
assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); |
9077 |
assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); |
Lines 9121-9128
Link Here
|
9121 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
9121 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
9122 |
CompilationUnit unit = (CompilationUnit) node; |
9122 |
CompilationUnit unit = (CompilationUnit) node; |
9123 |
String expectedErrors = |
9123 |
String expectedErrors = |
9124 |
"x cannot be resolved\n" + |
9124 |
"x cannot be resolved to a variable\n" + |
9125 |
"x cannot be resolved"; |
9125 |
"x cannot be resolved to a variable"; |
9126 |
assertProblemsSize(unit, 2, expectedErrors); |
9126 |
assertProblemsSize(unit, 2, expectedErrors); |
9127 |
node = getASTNode(unit, 1, 0, 0); |
9127 |
node = getASTNode(unit, 1, 0, 0); |
9128 |
assertEquals("Not a super constructor invocation", ASTNode.SUPER_CONSTRUCTOR_INVOCATION, node.getNodeType()); |
9128 |
assertEquals("Not a super constructor invocation", ASTNode.SUPER_CONSTRUCTOR_INVOCATION, node.getNodeType()); |
Lines 9158-9164
Link Here
|
9158 |
false); |
9158 |
false); |
9159 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
9159 |
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); |
9160 |
CompilationUnit unit = (CompilationUnit) node; |
9160 |
CompilationUnit unit = (CompilationUnit) node; |
9161 |
String expectedError = "x cannot be resolved"; |
9161 |
String expectedError = "x cannot be resolved to a variable"; |
9162 |
assertProblemsSize(unit, 1, expectedError); |
9162 |
assertProblemsSize(unit, 1, expectedError); |
9163 |
node = getASTNode(unit, 0, 1, 0); |
9163 |
node = getASTNode(unit, 0, 1, 0); |
9164 |
assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); |
9164 |
assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); |