| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 CompletionTestCase.buildTests('testCommentSnippets017', ''' | 94 CompletionTestCase.buildTests('testCommentSnippets017', ''' |
| 95 class F {var x = !1false;}''', <String>["1+true"], failingTests: '1'); | 95 class F {var x = !1false;}''', <String>["1+true"], failingTests: '1'); |
| 96 | 96 |
| 97 CompletionTestCase.buildTests('testCommentSnippets018', ''' | 97 CompletionTestCase.buildTests('testCommentSnippets018', ''' |
| 98 class Map{}class Arrays{}class C{ m(!1){} n(!2 x, q)''', | 98 class Map{}class Arrays{}class C{ m(!1){} n(!2 x, q)''', |
| 99 <String>["1+Map", "1-void", "1-null", "2+Arrays", "2-void", "2-null"], | 99 <String>["1+Map", "1-void", "1-null", "2+Arrays", "2-void", "2-null"], |
| 100 failingTests: '1'); | 100 failingTests: '1'); |
| 101 | 101 |
| 102 CompletionTestCase.buildTests('testCommentSnippets019', ''' | 102 CompletionTestCase.buildTests('testCommentSnippets019', ''' |
| 103 class A{m(){Object x;x.!1/**/clear()''', | 103 class A{m(){Object x;x.!1/**/clear()''', |
| 104 <String>["1+toString"], | 104 <String>["1+toString"]); |
| 105 failingTests: '1'); | |
| 106 | 105 |
| 107 CompletionTestCase.buildTests('testCommentSnippets020', ''' | 106 CompletionTestCase.buildTests('testCommentSnippets020', ''' |
| 108 classMap{}class tst {var newt;void newf(){}test() {var newz;new!1/**/;}}''', | 107 classMap{}class tst {var newt;void newf(){}test() {var newz;new!1/**/;}}''', |
| 109 <String>["1+newt", "1+newf", "1+newz", "1-Map"], | 108 <String>["1+newt", "1+newf", "1+newz", "1-Map"], |
| 110 failingTests: '1'); | 109 failingTests: '1'); |
| 111 | 110 |
| 112 CompletionTestCase.buildTests('testCommentSnippets021', ''' | 111 CompletionTestCase.buildTests('testCommentSnippets021', ''' |
| 113 class Map{}class tst {var newt;void newf(){}test() {var newz;new !1/**/;}}''', | 112 class Map{}class tst {var newt;void newf(){}test() {var newz;new !1/**/;}}''', |
| 114 <String>["1+Map", "1-newt"], | 113 <String>["1+Map", "1-newt"], |
| 115 failingTests: '1'); | 114 failingTests: '1'); |
| (...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1857 v.!1toString!2().!3hash!4Code | 1856 v.!1toString!2().!3hash!4Code |
| 1858 }''', | 1857 }''', |
| 1859 <String>[ | 1858 <String>[ |
| 1860 "1+toString", | 1859 "1+toString", |
| 1861 "1-==", | 1860 "1-==", |
| 1862 "2+toString", | 1861 "2+toString", |
| 1863 "3+hashCode", | 1862 "3+hashCode", |
| 1864 "3+toString", | 1863 "3+toString", |
| 1865 "4+hashCode", | 1864 "4+hashCode", |
| 1866 "4-toString"], | 1865 "4-toString"], |
| 1867 failingTests: '1234'); | 1866 failingTests: '34'); |
| 1868 | 1867 |
| 1869 CompletionTestCase.buildTests('test002', ''' | 1868 CompletionTestCase.buildTests('test002', ''' |
| 1870 void r2(var vim) { | 1869 void r2(var vim) { |
| 1871 v!1.toString() | 1870 v!1.toString() |
| 1872 }''', <String>["1+vim"]); | 1871 }''', <String>["1+vim"]); |
| 1873 | 1872 |
| 1874 CompletionTestCase.buildTests('test003', ''' | 1873 CompletionTestCase.buildTests('test003', ''' |
| 1875 class A { | 1874 class A { |
| 1876 int a() => 3; | 1875 int a() => 3; |
| 1877 int b() => this.!1a(); | 1876 int b() => this.!1a(); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2019 }''', | 2018 }''', |
| 2020 <String>[ | 2019 <String>[ |
| 2021 "1+var", | 2020 "1+var", |
| 2022 "1+dynamic", | 2021 "1+dynamic", |
| 2023 "1-f", | 2022 "1-f", |
| 2024 "2+var", | 2023 "2+var", |
| 2025 "2-dynamic", | 2024 "2-dynamic", |
| 2026 "3+false", | 2025 "3+false", |
| 2027 "3+true", | 2026 "3+true", |
| 2028 "4+toString"], | 2027 "4+toString"], |
| 2029 failingTests: '1234'); | 2028 failingTests: '123'); |
| 2030 | 2029 |
| 2031 // conditions & operators | 2030 // conditions & operators |
| 2032 CompletionTestCase.buildTests('test013', ''' | 2031 CompletionTestCase.buildTests('test013', ''' |
| 2033 class Q { | 2032 class Q { |
| 2034 bool x; | 2033 bool x; |
| 2035 List zs; | 2034 List zs; |
| 2036 int k; | 2035 int k; |
| 2037 var a; | 2036 var a; |
| 2038 mth() { | 2037 mth() { |
| 2039 while (!1x !9); | 2038 while (!1x !9); |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2404 'test_classMembers_inGetter', | 2403 'test_classMembers_inGetter', |
| 2405 '''class A { var fff; get z {ff!1}}''', | 2404 '''class A { var fff; get z {ff!1}}''', |
| 2406 <String>["1+fff"]); | 2405 <String>["1+fff"]); |
| 2407 | 2406 |
| 2408 CompletionTestCase.buildTests( | 2407 CompletionTestCase.buildTests( |
| 2409 'testSingle', | 2408 'testSingle', |
| 2410 '''class A {int x; !2mth() {int y = this.x;}}class B{}''', | 2409 '''class A {int x; !2mth() {int y = this.x;}}class B{}''', |
| 2411 <String>["2+B"]); | 2410 <String>["2+B"]); |
| 2412 } | 2411 } |
| 2413 } | 2412 } |
| OLD | NEW |