| 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.invocation; | 5 library test.services.completion.invocation; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/protocol.dart'; | 9 import 'package:analysis_server/src/protocol.dart'; |
| 10 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; | 10 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 test_shadowing_field_over_getter() => | 392 test_shadowing_field_over_getter() => |
| 393 check_shadowing('int x;', 'int get x => null;', true); | 393 check_shadowing('int x;', 'int get x => null;', true); |
| 394 | 394 |
| 395 test_shadowing_field_over_method() => | 395 test_shadowing_field_over_method() => |
| 396 check_shadowing('int x;', 'void x() {}', true); | 396 check_shadowing('int x;', 'void x() {}', true); |
| 397 | 397 |
| 398 test_shadowing_field_over_setter() => | 398 test_shadowing_field_over_setter() => |
| 399 check_shadowing('int x;', 'set x(int value) {}', true); | 399 check_shadowing('int x;', 'set x(int value) {}', true); |
| 400 | 400 |
| 401 test_shadowing_getter_over_field() => | 401 test_shadowing_getter_over_field() => |
| 402 check_shadowing('int get x => null;', 'int x;', false); | 402 check_shadowing('int get x => null;', 'int x;', true); |
| 403 | 403 |
| 404 test_shadowing_getter_over_getter() => | 404 test_shadowing_getter_over_getter() => |
| 405 check_shadowing('int get x => null;', 'int get x => null;', true); | 405 check_shadowing('int get x => null;', 'int get x => null;', true); |
| 406 | 406 |
| 407 test_shadowing_getter_over_method() => | 407 test_shadowing_getter_over_method() => |
| 408 check_shadowing('int get x => null;', 'void x() {}', true); | 408 check_shadowing('int get x => null;', 'void x() {}', true); |
| 409 | 409 |
| 410 test_shadowing_getter_over_setter() => | 410 test_shadowing_getter_over_setter() => |
| 411 check_shadowing('int get x => null;', 'set x(int value) {}', false); | 411 check_shadowing('int get x => null;', 'set x(int value) {}', true); |
| 412 | 412 |
| 413 test_shadowing_method_over_field() => | 413 test_shadowing_method_over_field() => |
| 414 check_shadowing('void x() {}', 'int x;', true); | 414 check_shadowing('void x() {}', 'int x;', true); |
| 415 | 415 |
| 416 test_shadowing_method_over_getter() => | 416 test_shadowing_method_over_getter() => |
| 417 check_shadowing('void x() {}', 'int get x => null;', true); | 417 check_shadowing('void x() {}', 'int get x => null;', true); |
| 418 | 418 |
| 419 test_shadowing_method_over_method() => | 419 test_shadowing_method_over_method() => |
| 420 check_shadowing('void x() {}', 'void x() {}', true); | 420 check_shadowing('void x() {}', 'void x() {}', true); |
| 421 | 421 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 void test(Derived d) { | 461 void test(Derived d) { |
| 462 d.^ | 462 d.^ |
| 463 } | 463 } |
| 464 '''); | 464 '''); |
| 465 return computeFull((bool result) { | 465 return computeFull((bool result) { |
| 466 assertSuggestMethod('f', 'Mixin', 'void'); | 466 assertSuggestMethod('f', 'Mixin', 'void'); |
| 467 }); | 467 }); |
| 468 } | 468 } |
| 469 | 469 |
| 470 test_shadowing_setter_over_field() => | 470 test_shadowing_setter_over_field() => |
| 471 check_shadowing('set x(int value) {}', 'int x;', false); | 471 check_shadowing('set x(int value) {}', 'int x;', true); |
| 472 | 472 |
| 473 test_shadowing_setter_over_getter() => | 473 test_shadowing_setter_over_getter() => |
| 474 check_shadowing('set x(int value) {}', 'int get x => null;', false); | 474 check_shadowing('set x(int value) {}', 'int get x => null;', true); |
| 475 | 475 |
| 476 test_shadowing_setter_over_method() => | 476 test_shadowing_setter_over_method() => |
| 477 check_shadowing('set x(int value) {}', 'void x() {}', true); | 477 check_shadowing('set x(int value) {}', 'void x() {}', true); |
| 478 | 478 |
| 479 test_shadowing_setter_over_setter() => | 479 test_shadowing_setter_over_setter() => |
| 480 check_shadowing('set x(int value) {}', 'set x(int value) {}', true); | 480 check_shadowing('set x(int value) {}', 'set x(int value) {}', true); |
| 481 | 481 |
| 482 test_shadowing_superclass_over_interface() { | 482 test_shadowing_superclass_over_interface() { |
| 483 addTestSource(''' | 483 addTestSource(''' |
| 484 class Base { | 484 class Base { |
| 485 void f() {} | 485 void f() {} |
| 486 } | 486 } |
| 487 class Interface { | 487 class Interface { |
| 488 void f() {} | 488 void f() {} |
| 489 } | 489 } |
| 490 class Derived extends Base implements Interface { | 490 class Derived extends Base implements Interface { |
| 491 } | 491 } |
| 492 void test(Derived d) { | 492 void test(Derived d) { |
| 493 d.^ | 493 d.^ |
| 494 } | 494 } |
| 495 '''); | 495 '''); |
| 496 return computeFull((bool result) { | 496 return computeFull((bool result) { |
| 497 assertSuggestMethod('f', 'Base', 'void'); | 497 assertSuggestMethod('f', 'Base', 'void'); |
| 498 }); | 498 }); |
| 499 } | 499 } |
| 500 } | 500 } |
| OLD | NEW |