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

Side by Side Diff: pkg/analysis_server/test/completion_test.dart

Issue 802163002: include local functions in completion suggestions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 years 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
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.completion.support; 5 library test.completion.support;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'completion_test_support.dart'; 9 import 'completion_test_support.dart';
10 10
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 <String>["1+Map", "2+List", "2-Map", "3+List", "4+Map", "4-List"], 652 <String>["1+Map", "2+List", "2-Map", "3+List", "4+Map", "4-List"],
653 failingTests: '1234'); 653 failingTests: '1234');
654 654
655 CompletionTestCase.buildTests('testCommentSnippets085', ''' 655 CompletionTestCase.buildTests('testCommentSnippets085', '''
656 class List{}class Map{}class Z extends List with !1Ma!2p {}''', 656 class List{}class Map{}class Z extends List with !1Ma!2p {}''',
657 <String>["1+List", "1+Map", "2+Map", "2-List"], 657 <String>["1+List", "1+Map", "2+Map", "2-List"],
658 failingTests: '12'); 658 failingTests: '12');
659 659
660 CompletionTestCase.buildTests('testCommentSnippets086', ''' 660 CompletionTestCase.buildTests('testCommentSnippets086', '''
661 class Q{f(){xy() {!2};x!1y();}}''', 661 class Q{f(){xy() {!2};x!1y();}}''',
662 <String>["1+xy", "2+f", "2-xy"], 662 <String>["1+xy", "2+f", "2-xy"]);
663 failingTests: '1');
664 663
665 CompletionTestCase.buildTests('testCommentSnippets087', ''' 664 CompletionTestCase.buildTests('testCommentSnippets087', '''
666 class Map{}class Q extends Object with !1Map {}''', 665 class Map{}class Q extends Object with !1Map {}''',
667 <String>["1+Map", "1-HashMap"], 666 <String>["1+Map", "1-HashMap"],
668 failingTests: '1'); 667 failingTests: '1');
669 668
670 CompletionTestCase.buildTests('testCommentSnippets088', ''' 669 CompletionTestCase.buildTests('testCommentSnippets088', '''
671 class A { 670 class A {
672 int f; 671 int f;
673 B m(){} 672 B m(){}
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 "4+fqi", 722 "4+fqi",
724 "4+Q", 723 "4+Q",
725 "4+xya", 724 "4+xya",
726 "4-xyb", 725 "4-xyb",
727 "4+xza", 726 "4+xza",
728 "5+fqe", 727 "5+fqe",
729 "5+fqi", 728 "5+fqi",
730 "5+Q", 729 "5+Q",
731 "5-xya", 730 "5-xya",
732 "5-xyb", 731 "5-xyb",
733 "5-xza"], 732 "5-xza"]);
734 failingTests: '34');
735 733
736 CompletionTestCase.buildTests('testCommentSnippets090', ''' 734 CompletionTestCase.buildTests('testCommentSnippets090', '''
737 class X { f() { var a = 'x'; a.!1 }}''', 735 class X { f() { var a = 'x'; a.!1 }}''',
738 <String>["1+length"], 736 <String>["1+length"],
739 failingTests: '1'); 737 failingTests: '1');
740 } 738 }
741 739
742 void buildCompletionTests() { 740 void buildCompletionTests() {
743 CompletionTestCase.buildTests('testCompletion_alias_field', ''' 741 CompletionTestCase.buildTests('testCompletion_alias_field', '''
744 typedef int fnint(int k); fn!1int x;''', <String>["1+fnint"]); 742 typedef int fnint(int k); fn!1int x;''', <String>["1+fnint"]);
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after
2401 'test_classMembers_inGetter', 2399 'test_classMembers_inGetter',
2402 '''class A { var fff; get z {ff!1}}''', 2400 '''class A { var fff; get z {ff!1}}''',
2403 <String>["1+fff"]); 2401 <String>["1+fff"]);
2404 2402
2405 CompletionTestCase.buildTests( 2403 CompletionTestCase.buildTests(
2406 'testSingle', 2404 'testSingle',
2407 '''class A {int x; !2mth() {int y = this.x;}}class B{}''', 2405 '''class A {int x; !2mth() {int y = this.x;}}class B{}''',
2408 <String>["2+B"]); 2406 <String>["2+B"]);
2409 } 2407 }
2410 } 2408 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698