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.analysis.notification.overrides; | 5 library test.analysis.notification.overrides; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/protocol/protocol.dart'; | 9 import 'package:analysis_server/protocol/protocol.dart'; |
10 import 'package:analysis_server/protocol/protocol_generated.dart'; | 10 import 'package:analysis_server/protocol/protocol_generated.dart'; |
11 import 'package:analysis_server/src/constants.dart'; | 11 import 'package:analysis_server/src/constants.dart'; |
12 import 'package:test/test.dart'; | 12 import 'package:test/test.dart'; |
13 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 13 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
14 | 14 |
15 import '../analysis_abstract.dart'; | 15 import '../analysis_abstract.dart'; |
16 | 16 |
17 main() { | 17 main() { |
18 defineReflectiveSuite(() { | 18 defineReflectiveSuite(() { |
19 defineReflectiveTests(AnalysisNotificationOverridesTest); | 19 defineReflectiveTests(AnalysisNotificationOverridesTest); |
20 }); | 20 }); |
21 } | 21 } |
22 | 22 |
23 @reflectiveTest | 23 @reflectiveTest |
24 class AnalysisNotificationOverridesTest extends AbstractAnalysisTest { | 24 class AnalysisNotificationOverridesTest extends AbstractAnalysisTest { |
25 List<Override> overridesList; | 25 List<Override> overridesList; |
26 Override override; | 26 Override override; |
27 | 27 |
| 28 @override |
| 29 bool get enableNewAnalysisDriver => false; |
| 30 |
28 /** | 31 /** |
29 * Asserts that there is an overridden interface [OverriddenMember] at the | 32 * Asserts that there is an overridden interface [OverriddenMember] at the |
30 * offset of [search] in [override]. | 33 * offset of [search] in [override]. |
31 */ | 34 */ |
32 void assertHasInterfaceMember(String search) { | 35 void assertHasInterfaceMember(String search) { |
33 int offset = findOffset(search); | 36 int offset = findOffset(search); |
34 for (OverriddenMember member in override.interfaceMembers) { | 37 for (OverriddenMember member in override.interfaceMembers) { |
35 if (member.element.location.offset == offset) { | 38 if (member.element.location.offset == offset) { |
36 return; | 39 return; |
37 } | 40 } |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 class B extends A { | 572 class B extends A { |
570 set fff(x) {} // in B | 573 set fff(x) {} // in B |
571 } | 574 } |
572 '''); | 575 '''); |
573 await prepareOverrides(); | 576 await prepareOverrides(); |
574 assertHasOverride('fff(x) {} // in B'); | 577 assertHasOverride('fff(x) {} // in B'); |
575 assertHasSuperElement('fff(x) {} // in A'); | 578 assertHasSuperElement('fff(x) {} // in A'); |
576 assertNoInterfaceMembers(); | 579 assertNoInterfaceMembers(); |
577 } | 580 } |
578 } | 581 } |
OLD | NEW |