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

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

Issue 802233002: refine when suggestions are limited to types (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge and address comments 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 18 matching lines...) Expand all
29 CompletionTestCase.buildTests('testCommentSnippets001', ''' 29 CompletionTestCase.buildTests('testCommentSnippets001', '''
30 class X {static final num MAX = 0;num yc,xc;mth() {xc = yc = MA!1X;x!2c.abs();nu m f = M!3AX;}}''', 30 class X {static final num MAX = 0;num yc,xc;mth() {xc = yc = MA!1X;x!2c.abs();nu m f = M!3AX;}}''',
31 <String>["1+MAX", "2+xc", "3+MAX"]); 31 <String>["1+MAX", "2+xc", "3+MAX"]);
32 32
33 CompletionTestCase.buildTests('testCommentSnippets002', ''' 33 CompletionTestCase.buildTests('testCommentSnippets002', '''
34 class Y {String x='hi';mth() {x.l!1ength;int n = 0;x!2.codeUnitAt(n!3);}}''', 34 class Y {String x='hi';mth() {x.l!1ength;int n = 0;x!2.codeUnitAt(n!3);}}''',
35 <String>["1+length", "2+x", "3+n"]); 35 <String>["1+length", "2+x", "3+n"]);
36 36
37 CompletionTestCase.buildTests('testCommentSnippets004', ''' 37 CompletionTestCase.buildTests('testCommentSnippets004', '''
38 class A {!1int x; !2mth() {!3int y = this.!5x!6;}}class B{}''', 38 class A {!1int x; !2mth() {!3int y = this.!5x!6;}}class B{}''',
39 <String>["1+A", "2+B", "3+x", "3-y", "5+mth", "6+x"], 39 <String>["1+A", "2+B", "3+x", "3-y", "5+mth", "6+x"]);
40 failingTests: '3');
41 40
42 CompletionTestCase.buildTests('testCommentSnippets005', ''' 41 CompletionTestCase.buildTests('testCommentSnippets005', '''
43 class Date { static Date JUN, JUL;}class X { m() { return Da!1te.JU!2L; }}''', 42 class Date { static Date JUN, JUL;}class X { m() { return Da!1te.JU!2L; }}''',
44 <String>["1+Date", "2+JUN", "2+JUL"]); 43 <String>["1+Date", "2+JUN", "2+JUL"]);
45 44
46 CompletionTestCase.buildTests('testCommentSnippets007', ''' 45 CompletionTestCase.buildTests('testCommentSnippets007', '''
47 class C {mth(Map x, !1) {}mtf(!2, Map x) {}m() {for (in!3t i=0; i<5; i++); A!4 x ;}}class int{}class Arrays{}class bool{}''', 46 class C {mth(Map x, !1) {}mtf(!2, Map x) {}m() {for (in!3t i=0; i<5; i++); A!4 x ;}}class int{}class Arrays{}class bool{}''',
48 <String>["1+bool", "2+bool", "3+int", "4+Arrays"], 47 <String>["1+bool", "2+bool", "3+int", "4+Arrays"],
49 failingTests: '3'); 48 failingTests: '3');
50 49
(...skipping 2345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2396 'test_classMembers_inGetter', 2395 'test_classMembers_inGetter',
2397 '''class A { var fff; get z {ff!1}}''', 2396 '''class A { var fff; get z {ff!1}}''',
2398 <String>["1+fff"]); 2397 <String>["1+fff"]);
2399 2398
2400 CompletionTestCase.buildTests( 2399 CompletionTestCase.buildTests(
2401 'testSingle', 2400 'testSingle',
2402 '''class A {int x; !2mth() {int y = this.x;}}class B{}''', 2401 '''class A {int x; !2mth() {int y = this.x;}}class B{}''',
2403 <String>["2+B"]); 2402 <String>["2+B"]);
2404 } 2403 }
2405 } 2404 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698