| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library test.services.completion.target; | 5 library test.services.completion.target; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/services/completion/completion_target.dart'; | 7 import 'package:analysis_server/src/services/completion/completion_target.dart'; |
| 8 import 'package:analyzer/src/generated/ast.dart'; | 8 import 'package:analyzer/src/generated/ast.dart'; |
| 9 import 'package:analyzer/src/generated/source.dart'; | 9 import 'package:analyzer/src/generated/source.dart'; |
| 10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 assertTarget('zoo', 'zoo(z) {}'); | 468 assertTarget('zoo', 'zoo(z) {}'); |
| 469 } | 469 } |
| 470 | 470 |
| 471 test_MethodDeclaration_returnType_afterStarDocComment2() { | 471 test_MethodDeclaration_returnType_afterStarDocComment2() { |
| 472 // MethodDeclaration ClassDeclaration CompilationUnit | 472 // MethodDeclaration ClassDeclaration CompilationUnit |
| 473 addTestSource('class C2 {/** */^ zoo(z) { } String name; }'); | 473 addTestSource('class C2 {/** */^ zoo(z) { } String name; }'); |
| 474 assertTarget('zoo', 'zoo(z) {}'); | 474 assertTarget('zoo', 'zoo(z) {}'); |
| 475 } | 475 } |
| 476 | 476 |
| 477 test_TypeArgumentList() { | 477 test_TypeArgumentList() { |
| 478 // SimpleIdentifier BinaryExpression ExpressionStatement | 478 // TypeName TypeArgumentList TypeName |
| 479 addTestSource('main() { C<^> c; }'); | 479 addTestSource('main() { C<^> c; }'); |
| 480 assertTarget('', 'C < '); | 480 assertTarget('', '<>'); |
| 481 } | 481 } |
| 482 | 482 |
| 483 test_TypeArgumentList2() { | 483 test_TypeArgumentList2() { |
| 484 // TypeName TypeArgumentList TypeName | 484 // TypeName TypeArgumentList TypeName |
| 485 addTestSource('main() { C<C^> c; }'); | 485 addTestSource('main() { C<C^> c; }'); |
| 486 assertTarget('C', '<C>'); | 486 assertTarget('C', '<C>'); |
| 487 } | 487 } |
| 488 | 488 |
| 489 test_VariableDeclaration_lhs_identifier_after() { | 489 test_VariableDeclaration_lhs_identifier_after() { |
| 490 // VariableDeclaration VariableDeclarationList | 490 // VariableDeclaration VariableDeclarationList |
| 491 addTestSource('main() {int b^ = 1;}'); | 491 addTestSource('main() {int b^ = 1;}'); |
| 492 assertTarget('b = 1', 'int b = 1'); | 492 assertTarget('b = 1', 'int b = 1'); |
| 493 } | 493 } |
| 494 | 494 |
| 495 test_VariableDeclaration_lhs_identifier_before() { | 495 test_VariableDeclaration_lhs_identifier_before() { |
| 496 // VariableDeclaration VariableDeclarationList | 496 // VariableDeclaration VariableDeclarationList |
| 497 addTestSource('main() {int ^b = 1;}'); | 497 addTestSource('main() {int ^b = 1;}'); |
| 498 assertTarget('b = 1', 'int b = 1'); | 498 assertTarget('b = 1', 'int b = 1'); |
| 499 } | 499 } |
| 500 } | 500 } |
| OLD | NEW |