| 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 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 Loading... |
| 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 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2401 'test_classMembers_inGetter', | 2400 'test_classMembers_inGetter', |
| 2402 '''class A { var fff; get z {ff!1}}''', | 2401 '''class A { var fff; get z {ff!1}}''', |
| 2403 <String>["1+fff"]); | 2402 <String>["1+fff"]); |
| 2404 | 2403 |
| 2405 CompletionTestCase.buildTests( | 2404 CompletionTestCase.buildTests( |
| 2406 'testSingle', | 2405 'testSingle', |
| 2407 '''class A {int x; !2mth() {int y = this.x;}}class B{}''', | 2406 '''class A {int x; !2mth() {int y = this.x;}}class B{}''', |
| 2408 <String>["2+B"]); | 2407 <String>["2+B"]); |
| 2409 } | 2408 } |
| 2410 } | 2409 } |
| OLD | NEW |