Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: pkg/analyzer/test/generated/ast_test.dart

Issue 285423002: New analyzer snapshot (with CaughtException). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Replace AnalysisException with CaughtException Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/pubspec.yaml ('k') | pkg/analyzer/test/generated/element_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/ast_test.dart
diff --git a/pkg/analyzer/test/generated/ast_test.dart b/pkg/analyzer/test/generated/ast_test.dart
index 7664e3699226211d5dc01f3aa210193551488843..f4f69e9fe5852930e8140c083cea9be5cfaf4593 100644
--- a/pkg/analyzer/test/generated/ast_test.dart
+++ b/pkg/analyzer/test/generated/ast_test.dart
@@ -1121,84 +1121,84 @@ class ConstantEvaluatorTest extends ParserTestCase {
class IndexExpressionTest extends EngineTestCase {
void test_inGetterContext_assignment_compound_left() {
IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
- // a[i] += ?
- AstFactory.assignmentExpression(expression, TokenType.PLUS_EQ, null);
+ // a[b] += c
+ AstFactory.assignmentExpression(expression, TokenType.PLUS_EQ, AstFactory.identifier3("c"));
JUnitTestCase.assertTrue(expression.inGetterContext());
}
void test_inGetterContext_assignment_simple_left() {
IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
- // a[i] = ?
- AstFactory.assignmentExpression(expression, TokenType.EQ, null);
+ // a[b] = c
+ AstFactory.assignmentExpression(expression, TokenType.EQ, AstFactory.identifier3("c"));
JUnitTestCase.assertFalse(expression.inGetterContext());
}
void test_inGetterContext_nonAssignment() {
IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
- // a[i] + ?
- AstFactory.binaryExpression(expression, TokenType.PLUS, null);
+ // a[b] + c
+ AstFactory.binaryExpression(expression, TokenType.PLUS, AstFactory.identifier3("c"));
JUnitTestCase.assertTrue(expression.inGetterContext());
}
void test_inSetterContext_assignment_compound_left() {
IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
- // a[i] += ?
- AstFactory.assignmentExpression(expression, TokenType.PLUS_EQ, null);
+ // a[b] += c
+ AstFactory.assignmentExpression(expression, TokenType.PLUS_EQ, AstFactory.identifier3("c"));
JUnitTestCase.assertTrue(expression.inSetterContext());
}
void test_inSetterContext_assignment_compound_right() {
IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
- // ? += a[i]
- AstFactory.assignmentExpression(null, TokenType.PLUS_EQ, expression);
+ // c += a[b]
+ AstFactory.assignmentExpression(AstFactory.identifier3("c"), TokenType.PLUS_EQ, expression);
JUnitTestCase.assertFalse(expression.inSetterContext());
}
void test_inSetterContext_assignment_simple_left() {
IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
- // a[i] = ?
- AstFactory.assignmentExpression(expression, TokenType.EQ, null);
+ // a[b] = c
+ AstFactory.assignmentExpression(expression, TokenType.EQ, AstFactory.identifier3("c"));
JUnitTestCase.assertTrue(expression.inSetterContext());
}
void test_inSetterContext_assignment_simple_right() {
IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
- // ? = a[i]
- AstFactory.assignmentExpression(null, TokenType.EQ, expression);
+ // c = a[b]
+ AstFactory.assignmentExpression(AstFactory.identifier3("c"), TokenType.EQ, expression);
JUnitTestCase.assertFalse(expression.inSetterContext());
}
void test_inSetterContext_nonAssignment() {
IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
- AstFactory.binaryExpression(expression, TokenType.PLUS, null);
- // a[i] + ?
+ AstFactory.binaryExpression(expression, TokenType.PLUS, AstFactory.identifier3("c"));
+ // a[b] + cc
JUnitTestCase.assertFalse(expression.inSetterContext());
}
void test_inSetterContext_postfix() {
IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
AstFactory.postfixExpression(expression, TokenType.PLUS_PLUS);
- // a[i]++
+ // a[b]++
JUnitTestCase.assertTrue(expression.inSetterContext());
}
void test_inSetterContext_prefix_bang() {
IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
- // !a[i]
+ // !a[b]
AstFactory.prefixExpression(TokenType.BANG, expression);
JUnitTestCase.assertFalse(expression.inSetterContext());
}
void test_inSetterContext_prefix_minusMinus() {
IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
- // --a[i]
+ // --a[b]
AstFactory.prefixExpression(TokenType.MINUS_MINUS, expression);
JUnitTestCase.assertTrue(expression.inSetterContext());
}
void test_inSetterContext_prefix_plusPlus() {
IndexExpression expression = AstFactory.indexExpression(AstFactory.identifier3("a"), AstFactory.identifier3("b"));
- // ++a[i]
+ // ++a[b]
AstFactory.prefixExpression(TokenType.PLUS_PLUS, expression);
JUnitTestCase.assertTrue(expression.inSetterContext());
}
« no previous file with comments | « pkg/analyzer/pubspec.yaml ('k') | pkg/analyzer/test/generated/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698