| 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:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 143 |
| 144 buildTests('testCommentSnippets022a', ''' | 144 buildTests('testCommentSnippets022a', ''' |
| 145 class Map{}class F{m(){new !1''', <String>["1+Map"], failingTests: '1'); | 145 class Map{}class F{m(){new !1''', <String>["1+Map"], failingTests: '1'); |
| 146 | 146 |
| 147 buildTests('testCommentSnippets022b', ''' | 147 buildTests('testCommentSnippets022b', ''' |
| 148 class Map{factory Map.qq(){return null;}}class F{m(){new Map.!1qq();}}''', | 148 class Map{factory Map.qq(){return null;}}class F{m(){new Map.!1qq();}}''', |
| 149 <String>["1+qq"]); | 149 <String>["1+qq"]); |
| 150 | 150 |
| 151 buildTests('testCommentSnippets023', ''' | 151 buildTests('testCommentSnippets023', ''' |
| 152 class X {X c; X(this.!1c!3) : super() {c.!2}}''', | 152 class X {X c; X(this.!1c!3) : super() {c.!2}}''', |
| 153 <String>["1+c", "2+c", "3+c"]); | 153 <String>["1+c", "2+c", "3+c"], failingTests: '13'); |
| 154 | 154 |
| 155 buildTests('testCommentSnippets024', ''' | 155 buildTests('testCommentSnippets024', ''' |
| 156 class q {m(Map q){var x;m(!1)}n(){var x;n(!2)}}''', <String>["1+x", "2+x"]); | 156 class q {m(Map q){var x;m(!1)}n(){var x;n(!2)}}''', <String>["1+x", "2+x"]); |
| 157 | 157 |
| 158 buildTests('testCommentSnippets025', ''' | 158 buildTests('testCommentSnippets025', ''' |
| 159 class q {num m() {var q; num x=!1 q!3 + !2/**/;}}''', | 159 class q {num m() {var q; num x=!1 q!3 + !2/**/;}}''', |
| 160 <String>["1+q", "2+q", "3+q"], failingTests: '123'); | 160 <String>["1+q", "2+q", "3+q"], failingTests: '123'); |
| 161 | 161 |
| 162 buildTests('testCommentSnippets026', ''' | 162 buildTests('testCommentSnippets026', ''' |
| 163 class List{}class a implements !1{}''', <String>["1+List"], failingTests: '1'); | 163 class List{}class a implements !1{}''', <String>["1+List"], failingTests: '1'); |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 | 896 |
| 897 buildTests('testCompletion_dartDoc_reference_forConstructor', ''' | 897 buildTests('testCompletion_dartDoc_reference_forConstructor', ''' |
| 898 class A { | 898 class A { |
| 899 /** | 899 /** |
| 900 * [aa!1] | 900 * [aa!1] |
| 901 * [int!2] | 901 * [int!2] |
| 902 * [method!3] | 902 * [method!3] |
| 903 */ | 903 */ |
| 904 A.named(aaa, bbb) {} | 904 A.named(aaa, bbb) {} |
| 905 methodA() {} | 905 methodA() {} |
| 906 }''', <String>["1+aaa", "1-bbb", "2+int", "2-double", "3+methodA"], | 906 }''', <String>["1+aaa", "1-bbb", "2+int", "2-double", "3+methodA"]); |
| 907 failingTests: '1'); | |
| 908 | 907 |
| 909 buildTests('testCompletion_dartDoc_reference_forFunction', ''' | 908 buildTests('testCompletion_dartDoc_reference_forFunction', ''' |
| 910 /** | 909 /** |
| 911 * [aa!1] | 910 * [aa!1] |
| 912 * [int!2] | 911 * [int!2] |
| 913 * [function!3] | 912 * [function!3] |
| 914 */ | 913 */ |
| 915 functionA(aaa, bbb) {} | 914 functionA(aaa, bbb) {} |
| 916 functionB() {}''', <String>[ | 915 functionB() {}''', <String>[ |
| 917 "1+aaa", | 916 "1+aaa", |
| (...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2297 } else { | 2296 } else { |
| 2298 ++expectedPassCount; | 2297 ++expectedPassCount; |
| 2299 tester(testName, () { | 2298 tester(testName, () { |
| 2300 CompletionTestCase test = new CompletionTestCase(); | 2299 CompletionTestCase test = new CompletionTestCase(); |
| 2301 return test.runTest(spec, extraFiles); | 2300 return test.runTest(spec, extraFiles); |
| 2302 }); | 2301 }); |
| 2303 } | 2302 } |
| 2304 } | 2303 } |
| 2305 } | 2304 } |
| 2306 } | 2305 } |
| OLD | NEW |