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

Unified Diff: pkg/analysis_server/test/services/completion/optype_test.dart

Issue 1022703006: fix exceptions when completing other edge cases (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 9 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/analysis_server/lib/src/services/completion/optype.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/completion/optype_test.dart
diff --git a/pkg/analysis_server/test/services/completion/optype_test.dart b/pkg/analysis_server/test/services/completion/optype_test.dart
index b8dfadbbbdbb9a9413befad947f4a618b00a9e97..a2634b1da84f1455fd080fd2b3c06678d6a03d9d 100644
--- a/pkg/analysis_server/test/services/completion/optype_test.dart
+++ b/pkg/analysis_server/test/services/completion/optype_test.dart
@@ -663,6 +663,12 @@ class OpTypeTest {
assertOpType();
}
+ test_FunctionExpressionInvocation() {
+ // ArgumentList FunctionExpressionInvocation ExpressionStatement
+ addTestSource('main() { ((x) => x + 7)^(2) }');
+ assertOpType();
+ }
+
test_FunctionTypeAlias() {
// SimpleIdentifier FunctionTypeAlias CompilationUnit
addTestSource('typedef n^ ;');
@@ -988,6 +994,12 @@ class C2 {
assertOpType(invocation: true);
}
+ test_PostfixExpression() {
+ // SimpleIdentifier PostfixExpression ForStatement
+ addTestSource('int x = 0; main() {ax+^+;}');
+ assertOpType(returnValue: true, typeNames: true);
+ }
+
test_PrefixedIdentifier_class_const() {
// SimpleIdentifier PrefixedIdentifier ExpressionStatement Block
addTestSource('main() {A.^}');
@@ -1062,6 +1074,12 @@ class C2 {
assertOpType(invocation: true);
}
+ test_ThrowExpression() {
+ // SimpleIdentifier ThrowExpression ExpressionStatement
+ addTestSource('main() {throw ^;}');
+ assertOpType(returnValue: true, typeNames: true);
+ }
+
test_TopLevelVariableDeclaration_typed_name() {
// SimpleIdentifier VariableDeclaration VariableDeclarationList
// TopLevelVariableDeclaration
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/optype.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698