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

Side by Side Diff: pkg/analysis_server/test/analysis/notification_implemented_test.dart

Issue 1615023002: Issue 25538. Fix for 'analysis.implemented' notification and private members. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/domains/analysis/implemented_dart.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.implemented; 5 library test.analysis.notification.implemented;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/protocol/protocol.dart'; 9 import 'package:analysis_server/plugin/protocol/protocol.dart';
10 import 'package:analysis_server/src/constants.dart'; 10 import 'package:analysis_server/src/constants.dart';
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 class B extends A { 269 class B extends A {
270 } 270 }
271 class C extends A { 271 class C extends A {
272 m() {} 272 m() {}
273 } 273 }
274 '''); 274 ''');
275 await prepareImplementedElements(); 275 await prepareImplementedElements();
276 assertHasImplementedMember('m() {} // A'); 276 assertHasImplementedMember('m() {} // A');
277 } 277 }
278 278
279 test_method_withMethod_private_differentLib() async {
280 addFile(
281 '$testFolder/lib.dart',
282 r'''
283 import 'test.dart';
284 class B extends A {
285 void _m() {}
286 }
287 ''');
288 addTestFile('''
289 class A {
290 _m() {} // A
291 }
292 ''');
293 await prepareImplementedElements();
294 assertNoImplementedMember('_m() {} // A');
295 }
296
297 test_method_withMethod_private_sameLibrary() async {
298 addTestFile('''
299 class A {
300 _m() {} // A
301 }
302 class B extends A {
303 _m() {} // B
304 }
305 ''');
306 await prepareImplementedElements();
307 assertHasImplementedMember('_m() {} // A');
308 assertNoImplementedMember('_m() {} // B');
309 }
310
279 test_method_withMethod_wasAbstract() async { 311 test_method_withMethod_wasAbstract() async {
280 addTestFile(''' 312 addTestFile('''
281 abstract class A { 313 abstract class A {
282 m(); // A 314 m(); // A
283 } 315 }
284 class B extends A { 316 class B extends A {
285 m() {} 317 m() {}
286 } 318 }
287 '''); 319 ''');
288 await prepareImplementedElements(); 320 await prepareImplementedElements();
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 Future waitForNotification(int times) { 429 Future waitForNotification(int times) {
398 if (times == 0 || implementedClasses != null) { 430 if (times == 0 || implementedClasses != null) {
399 return new Future.value(); 431 return new Future.value();
400 } 432 }
401 return new Future.delayed( 433 return new Future.delayed(
402 new Duration(milliseconds: 1), () => waitForNotification(times - 1)); 434 new Duration(milliseconds: 1), () => waitForNotification(times - 1));
403 } 435 }
404 return waitForNotification(30000); 436 return waitForNotification(30000);
405 } 437 }
406 } 438 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/domains/analysis/implemented_dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698