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

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

Issue 882823002: Issue 22143. Navigation from super initializers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_navigation.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.navigation; 5 library test.analysis.notification.navigation;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/constants.dart'; 9 import 'package:analysis_server/src/constants.dart';
10 import 'package:analysis_server/src/protocol.dart'; 10 import 'package:analysis_server/src/protocol.dart';
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 test_string_part_unresolvedUri() { 574 test_string_part_unresolvedUri() {
575 addTestFile(''' 575 addTestFile('''
576 library lib; 576 library lib;
577 part "test_unit.dart"; 577 part "test_unit.dart";
578 '''); 578 ''');
579 return prepareNavigation().then((_) { 579 return prepareNavigation().then((_) {
580 assertNoRegionString('part "test_unit.dart"'); 580 assertNoRegionString('part "test_unit.dart"');
581 }); 581 });
582 } 582 }
583 583
584 test_superConstructorInvocation() {
585 addTestFile('''
586 class A {
587 A() {}
588 A.named() {}
589 }
590 class B extends A {
591 B() : super();
592 B.named() : super.named();
593 }
594 ''');
595 return prepareNavigation().then((_) {
596 {
597 assertHasRegionString('super');
598 assertHasTarget('A() {}', 0);
599 }
600 {
601 assertHasRegionString('super.named');
602 assertHasTarget('named() {}');
603 }
604 });
605 }
606
607 test_superConstructorInvocation_synthetic() {
608 addTestFile('''
609 class A {
610 }
611 class B extends A {
612 B() : super();
613 }
614 ''');
615 return prepareNavigation().then((_) {
616 {
617 assertHasRegionString('super');
618 assertHasTarget('A {');
619 }
620 });
621 }
622
584 test_targetElement() { 623 test_targetElement() {
585 addTestFile(''' 624 addTestFile('''
586 class AAA {} 625 class AAA {}
587 main() { 626 main() {
588 AAA aaa = null; 627 AAA aaa = null;
589 } 628 }
590 '''); 629 ''');
591 return prepareNavigation().then((_) { 630 return prepareNavigation().then((_) {
592 assertHasRegionTarget('AAA aaa', 'AAA {}'); 631 assertHasRegionTarget('AAA aaa', 'AAA {}');
593 expect(testTarget.kind, ElementKind.CLASS); 632 expect(testTarget.kind, ElementKind.CLASS);
(...skipping 14 matching lines...) Expand all
608 test_type_void() { 647 test_type_void() {
609 addTestFile(''' 648 addTestFile('''
610 void main() { 649 void main() {
611 } 650 }
612 '''); 651 ''');
613 return prepareNavigation().then((_) { 652 return prepareNavigation().then((_) {
614 assertNoRegionAt('void'); 653 assertNoRegionAt('void');
615 }); 654 });
616 } 655 }
617 } 656 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_navigation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698