| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 | 6 |
| 7 import 'package:analysis_server/protocol/protocol.dart'; | 7 import 'package:analysis_server/protocol/protocol.dart'; |
| 8 import 'package:analysis_server/protocol/protocol_constants.dart'; |
| 8 import 'package:analysis_server/protocol/protocol_generated.dart'; | 9 import 'package:analysis_server/protocol/protocol_generated.dart'; |
| 9 import 'package:analysis_server/src/constants.dart'; | |
| 10 import 'package:test/test.dart'; | 10 import 'package:test/test.dart'; |
| 11 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 11 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 12 | 12 |
| 13 import '../analysis_abstract.dart'; | 13 import '../analysis_abstract.dart'; |
| 14 | 14 |
| 15 main() { | 15 main() { |
| 16 defineReflectiveSuite(() { | 16 defineReflectiveSuite(() { |
| 17 defineReflectiveTests(AnalysisNotificationOverridesTest); | 17 defineReflectiveTests(AnalysisNotificationOverridesTest); |
| 18 }); | 18 }); |
| 19 } | 19 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 '${overridesList.join('\n')}'); | 116 '${overridesList.join('\n')}'); |
| 117 } | 117 } |
| 118 } | 118 } |
| 119 | 119 |
| 120 Future prepareOverrides() { | 120 Future prepareOverrides() { |
| 121 addAnalysisSubscription(AnalysisService.OVERRIDES, testFile); | 121 addAnalysisSubscription(AnalysisService.OVERRIDES, testFile); |
| 122 return _resultsAvailable.future; | 122 return _resultsAvailable.future; |
| 123 } | 123 } |
| 124 | 124 |
| 125 void processNotification(Notification notification) { | 125 void processNotification(Notification notification) { |
| 126 if (notification.event == ANALYSIS_OVERRIDES) { | 126 if (notification.event == ANALYSIS_NOTIFICATION_OVERRIDES) { |
| 127 var params = new AnalysisOverridesParams.fromNotification(notification); | 127 var params = new AnalysisOverridesParams.fromNotification(notification); |
| 128 if (params.file == testFile) { | 128 if (params.file == testFile) { |
| 129 overridesList = params.overrides; | 129 overridesList = params.overrides; |
| 130 _resultsAvailable.complete(null); | 130 _resultsAvailable.complete(null); |
| 131 } | 131 } |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 | 134 |
| 135 void setUp() { | 135 void setUp() { |
| 136 super.setUp(); | 136 super.setUp(); |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 class B extends A { | 570 class B extends A { |
| 571 set fff(x) {} // in B | 571 set fff(x) {} // in B |
| 572 } | 572 } |
| 573 '''); | 573 '''); |
| 574 await prepareOverrides(); | 574 await prepareOverrides(); |
| 575 assertHasOverride('fff(x) {} // in B'); | 575 assertHasOverride('fff(x) {} // in B'); |
| 576 assertHasSuperElement('fff(x) {} // in A'); | 576 assertHasSuperElement('fff(x) {} // in A'); |
| 577 assertNoInterfaceMembers(); | 577 assertNoInterfaceMembers(); |
| 578 } | 578 } |
| 579 } | 579 } |
| OLD | NEW |