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

Side by Side Diff: dart/tests/compiler/dart2js/analyze_dart2js_test.dart

Issue 18029018: Check that non-abstract classes implement all methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 analyze_api; 5 library analyze_api;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart'; 8 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart';
9 import 'analyze_helper.dart'; 9 import 'analyze_helper.dart';
10 import "package:async_helper/async_helper.dart"; 10 import "package:async_helper/async_helper.dart";
11 11
12 /** 12 /**
13 * Map of whitelisted warnings and errors. 13 * Map of whitelisted warnings and errors.
14 * 14 *
15 * Only add a whitelisting together with a bug report to dartbug.com and add 15 * Only add a whitelisting together with a bug report to dartbug.com and add
16 * the bug issue number as a comment on the whitelisting. 16 * the bug issue number as a comment on the whitelisting.
17 * 17 *
18 * Use an identifiable suffix of the file uri as key. Use a fixed substring of 18 * Use an identifiable suffix of the file uri as key. Use a fixed substring of
19 * the error/warning message in the list of whitelistings for each file. 19 * the error/warning message in the list of whitelistings for each file.
20 */ 20 */
21 // TODO(johnniwinther): Support canonical URIs as keys and message kinds as 21 // TODO(johnniwinther): Support canonical URIs as keys and message kinds as
22 // values. 22 // values.
23 const Map<String,List<String>> WHITE_LIST = const { 23 const Map<String,List<String>> WHITE_LIST = const {
24 "sdk/lib/_collection_dev/iterable.dart": const [
25 "Info: This is the method declaration."],
26
27 "sdk/lib/_internal/lib/interceptors.dart": const [
28 "Info: This is the method declaration."],
29
30 "sdk/lib/core/iterable.dart": const [
31 "Info: This is the method declaration."],
32
33 "sdk/lib/core/list.dart": const [
34 "Info: This is the method declaration."],
35
36 // Bug 15418.
37 "sdk/lib/typed_data/dart2js/typed_data_dart2js.dart": const ["""
38 Warning: 'Uint64List' doesn't implement '[]'.
39 Try adding an implementation of '[]'.""", """
40 Warning: 'Uint64List' doesn't implement '[]='.
41 Try adding an implementation of '[]='.""", """
42 Warning: 'Uint64List' doesn't implement 'length'.
43 Try adding an implementation of 'length'.""", """
44 Warning: 'Uint64List' doesn't implement 'length'.
45 Try adding an implementation of 'length'.""", """
46 Warning: 'Uint64List' doesn't implement 'add'.
47 Try adding an implementation of 'add'.""", """
48 Warning: 'Uint64List' doesn't implement 'addAll'.
49 Try adding an implementation of 'addAll'.""", """
50 Warning: 'Uint64List' doesn't implement 'reversed'.
51 Try adding an implementation of 'reversed'.""", """
52 Warning: 'Uint64List' doesn't implement 'sort'.
53 Try adding an implementation of 'sort'.""", """
54 Warning: 'Uint64List' doesn't implement 'shuffle'.
55 Try adding an implementation of 'shuffle'.""", """
56 Warning: 'Uint64List' doesn't implement 'indexOf'.
57 Try adding an implementation of 'indexOf'.""", """
58 Warning: 'Uint64List' doesn't implement 'lastIndexOf'.
59 Try adding an implementation of 'lastIndexOf'.""", """
60 Warning: 'Uint64List' doesn't implement 'clear'.
61 Try adding an implementation of 'clear'.""", """
62 Warning: 'Uint64List' doesn't implement 'insert'.
63 Try adding an implementation of 'insert'.""", """
64 Warning: 'Uint64List' doesn't implement 'insertAll'.
65 Try adding an implementation of 'insertAll'.""", """
66 Warning: 'Uint64List' doesn't implement 'setAll'.
67 Try adding an implementation of 'setAll'.""", """
68 Warning: 'Uint64List' doesn't implement 'remove'.
69 Try adding an implementation of 'remove'.""", """
70 Warning: 'Uint64List' doesn't implement 'removeAt'.
71 Try adding an implementation of 'removeAt'.""", """
72 Warning: 'Uint64List' doesn't implement 'removeLast'.
73 Try adding an implementation of 'removeLast'.""", """
74 Warning: 'Uint64List' doesn't implement 'removeWhere'.
75 Try adding an implementation of 'removeWhere'.""", """
76 Warning: 'Uint64List' doesn't implement 'retainWhere'.
77 Try adding an implementation of 'retainWhere'.""", """
78 Warning: 'Uint64List' doesn't implement 'sublist'.
79 Try adding an implementation of 'sublist'.""", """
80 Warning: 'Uint64List' doesn't implement 'getRange'.
81 Try adding an implementation of 'getRange'.""", """
82 Warning: 'Uint64List' doesn't implement 'setRange'.
83 Try adding an implementation of 'setRange'.""", """
84 Warning: 'Uint64List' doesn't implement 'removeRange'.
85 Try adding an implementation of 'removeRange'.""", """
86 Warning: 'Uint64List' doesn't implement 'fillRange'.
87 Try adding an implementation of 'fillRange'.""", """
88 Warning: 'Uint64List' doesn't implement 'replaceRange'.
89 Try adding an implementation of 'replaceRange'.""", """
90 Warning: 'Uint64List' doesn't implement 'asMap'.
91 Try adding an implementation of 'asMap'.""", """
92 Warning: 'Uint64List' doesn't implement 'length'.
93 Try adding an implementation of 'length'.""", """
94 Warning: 'Uint64List' doesn't implement 'iterator'.
95 Try adding an implementation of 'iterator'.""", """
96 Warning: 'Uint64List' doesn't implement 'map'.
97 Try adding an implementation of 'map'.""", """
98 Warning: 'Uint64List' doesn't implement 'where'.
99 Try adding an implementation of 'where'.""", """
100 Warning: 'Uint64List' doesn't implement 'expand'.
101 Try adding an implementation of 'expand'.""", """
102 Warning: 'Uint64List' doesn't implement 'contains'.
103 Try adding an implementation of 'contains'.""", """
104 Warning: 'Uint64List' doesn't implement 'forEach'.
105 Try adding an implementation of 'forEach'.""", """
106 Warning: 'Uint64List' doesn't implement 'reduce'.
107 Try adding an implementation of 'reduce'.""", """
108 Warning: 'Uint64List' doesn't implement 'fold'.
109 Try adding an implementation of 'fold'.""", """
110 Warning: 'Uint64List' doesn't implement 'every'.
111 Try adding an implementation of 'every'.""", """
112 Warning: 'Uint64List' doesn't implement 'any'.
113 Try adding an implementation of 'any'.""", """
114 Warning: 'Uint64List' doesn't implement 'toList'.
115 Try adding an implementation of 'toList'.""", """
116 Warning: 'Uint64List' doesn't implement 'toSet'.
117 Try adding an implementation of 'toSet'.""", """
118 Warning: 'Uint64List' doesn't implement 'length'.
119 Try adding an implementation of 'length'.""", """
120 Warning: 'Uint64List' doesn't implement 'isEmpty'.
121 Try adding an implementation of 'isEmpty'.""", """
122 Warning: 'Uint64List' doesn't implement 'isNotEmpty'.
123 Try adding an implementation of 'isNotEmpty'.""", """
124 Warning: 'Uint64List' doesn't implement 'take'.
125 Try adding an implementation of 'take'.""", """
126 Warning: 'Uint64List' doesn't implement 'takeWhile'.
127 Try adding an implementation of 'takeWhile'.""", """
128 Warning: 'Uint64List' doesn't implement 'skip'.
129 Try adding an implementation of 'skip'.""", """
130 Warning: 'Uint64List' doesn't implement 'skipWhile'.
131 Try adding an implementation of 'skipWhile'.""", """
132 Warning: 'Uint64List' doesn't implement 'first'.
133 Try adding an implementation of 'first'.""", """
134 Warning: 'Uint64List' doesn't implement 'last'.
135 Try adding an implementation of 'last'.""", """
136 Warning: 'Uint64List' doesn't implement 'single'.
137 Try adding an implementation of 'single'.""", """
138 Warning: 'Uint64List' doesn't implement 'firstWhere'.
139 Try adding an implementation of 'firstWhere'.""", """
140 Warning: 'Uint64List' doesn't implement 'lastWhere'.
141 Try adding an implementation of 'lastWhere'.""", """
142 Warning: 'Uint64List' doesn't implement 'singleWhere'.
143 Try adding an implementation of 'singleWhere'.""", """
144 Warning: 'Uint64List' doesn't implement 'elementAt'.
145 Try adding an implementation of 'elementAt'.""", """
146 Warning: 'Uint64List' doesn't implement '[]='.
147 Try adding an implementation of '[]='.""", """
148 Warning: 'Uint64List' doesn't implement 'length'.
149 Try adding an implementation of 'length'.""", """
150 Warning: 'Uint64List' doesn't implement '[]'.
151 Try adding an implementation of '[]'.""", """
152 Warning: 'Int64List' doesn't implement '[]'.
153 Try adding an implementation of '[]'.""", """
154 Warning: 'Int64List' doesn't implement '[]='.
155 Try adding an implementation of '[]='.""", """
156 Warning: 'Int64List' doesn't implement 'length'.
157 Try adding an implementation of 'length'.""", """
158 Warning: 'Int64List' doesn't implement 'length'.
159 Try adding an implementation of 'length'.""", """
160 Warning: 'Int64List' doesn't implement 'add'.
161 Try adding an implementation of 'add'.""", """
162 Warning: 'Int64List' doesn't implement 'addAll'.
163 Try adding an implementation of 'addAll'.""", """
164 Warning: 'Int64List' doesn't implement 'reversed'.
165 Try adding an implementation of 'reversed'.""", """
166 Warning: 'Int64List' doesn't implement 'sort'.
167 Try adding an implementation of 'sort'.""", """
168 Warning: 'Int64List' doesn't implement 'shuffle'.
169 Try adding an implementation of 'shuffle'.""", """
170 Warning: 'Int64List' doesn't implement 'indexOf'.
171 Try adding an implementation of 'indexOf'.""", """
172 Warning: 'Int64List' doesn't implement 'lastIndexOf'.
173 Try adding an implementation of 'lastIndexOf'.""", """
174 Warning: 'Int64List' doesn't implement 'clear'.
175 Try adding an implementation of 'clear'.""", """
176 Warning: 'Int64List' doesn't implement 'insert'.
177 Try adding an implementation of 'insert'.""", """
178 Warning: 'Int64List' doesn't implement 'insertAll'.
179 Try adding an implementation of 'insertAll'.""", """
180 Warning: 'Int64List' doesn't implement 'setAll'.
181 Try adding an implementation of 'setAll'.""", """
182 Warning: 'Int64List' doesn't implement 'remove'.
183 Try adding an implementation of 'remove'.""", """
184 Warning: 'Int64List' doesn't implement 'removeAt'.
185 Try adding an implementation of 'removeAt'.""", """
186 Warning: 'Int64List' doesn't implement 'removeLast'.
187 Try adding an implementation of 'removeLast'.""", """
188 Warning: 'Int64List' doesn't implement 'removeWhere'.
189 Try adding an implementation of 'removeWhere'.""", """
190 Warning: 'Int64List' doesn't implement 'retainWhere'.
191 Try adding an implementation of 'retainWhere'.""", """
192 Warning: 'Int64List' doesn't implement 'sublist'.
193 Try adding an implementation of 'sublist'.""", """
194 Warning: 'Int64List' doesn't implement 'getRange'.
195 Try adding an implementation of 'getRange'.""", """
196 Warning: 'Int64List' doesn't implement 'setRange'.
197 Try adding an implementation of 'setRange'.""", """
198 Warning: 'Int64List' doesn't implement 'removeRange'.
199 Try adding an implementation of 'removeRange'.""", """
200 Warning: 'Int64List' doesn't implement 'fillRange'.
201 Try adding an implementation of 'fillRange'.""", """
202 Warning: 'Int64List' doesn't implement 'replaceRange'.
203 Try adding an implementation of 'replaceRange'.""", """
204 Warning: 'Int64List' doesn't implement 'asMap'.
205 Try adding an implementation of 'asMap'.""", """
206 Warning: 'Int64List' doesn't implement 'length'.
207 Try adding an implementation of 'length'.""", """
208 Warning: 'Int64List' doesn't implement 'iterator'.
209 Try adding an implementation of 'iterator'.""", """
210 Warning: 'Int64List' doesn't implement 'map'.
211 Try adding an implementation of 'map'.""", """
212 Warning: 'Int64List' doesn't implement 'where'.
213 Try adding an implementation of 'where'.""", """
214 Warning: 'Int64List' doesn't implement 'expand'.
215 Try adding an implementation of 'expand'.""", """
216 Warning: 'Int64List' doesn't implement 'contains'.
217 Try adding an implementation of 'contains'.""", """
218 Warning: 'Int64List' doesn't implement 'forEach'.
219 Try adding an implementation of 'forEach'.""", """
220 Warning: 'Int64List' doesn't implement 'reduce'.
221 Try adding an implementation of 'reduce'.""", """
222 Warning: 'Int64List' doesn't implement 'fold'.
223 Try adding an implementation of 'fold'.""", """
224 Warning: 'Int64List' doesn't implement 'every'.
225 Try adding an implementation of 'every'.""", """
226 Warning: 'Int64List' doesn't implement 'any'.
227 Try adding an implementation of 'any'.""", """
228 Warning: 'Int64List' doesn't implement 'toList'.
229 Try adding an implementation of 'toList'.""", """
230 Warning: 'Int64List' doesn't implement 'toSet'.
231 Try adding an implementation of 'toSet'.""", """
232 Warning: 'Int64List' doesn't implement 'length'.
233 Try adding an implementation of 'length'.""", """
234 Warning: 'Int64List' doesn't implement 'isEmpty'.
235 Try adding an implementation of 'isEmpty'.""", """
236 Warning: 'Int64List' doesn't implement 'isNotEmpty'.
237 Try adding an implementation of 'isNotEmpty'.""", """
238 Warning: 'Int64List' doesn't implement 'take'.
239 Try adding an implementation of 'take'.""", """
240 Warning: 'Int64List' doesn't implement 'takeWhile'.
241 Try adding an implementation of 'takeWhile'.""", """
242 Warning: 'Int64List' doesn't implement 'skip'.
243 Try adding an implementation of 'skip'.""", """
244 Warning: 'Int64List' doesn't implement 'skipWhile'.
245 Try adding an implementation of 'skipWhile'.""", """
246 Warning: 'Int64List' doesn't implement 'first'.
247 Try adding an implementation of 'first'.""", """
248 Warning: 'Int64List' doesn't implement 'last'.
249 Try adding an implementation of 'last'.""", """
250 Warning: 'Int64List' doesn't implement 'single'.
251 Try adding an implementation of 'single'.""", """
252 Warning: 'Int64List' doesn't implement 'firstWhere'.
253 Try adding an implementation of 'firstWhere'.""", """
254 Warning: 'Int64List' doesn't implement 'lastWhere'.
255 Try adding an implementation of 'lastWhere'.""", """
256 Warning: 'Int64List' doesn't implement 'singleWhere'.
257 Try adding an implementation of 'singleWhere'.""", """
258 Warning: 'Int64List' doesn't implement 'elementAt'.
259 Try adding an implementation of 'elementAt'.""", """
260 Warning: 'Int64List' doesn't implement '[]='.
261 Try adding an implementation of '[]='.""", """
262 Warning: 'Int64List' doesn't implement 'length'.
263 Try adding an implementation of 'length'.""", """
264 Warning: 'Int64List' doesn't implement '[]'.
265 Try adding an implementation of '[]'."""],
24 }; 266 };
25 267
26 void main() { 268 void main() {
27 var uri = currentDirectory.resolve( 269 var uri = currentDirectory.resolve(
28 'sdk/lib/_internal/compiler/implementation/dart2js.dart'); 270 'sdk/lib/_internal/compiler/implementation/dart2js.dart');
29 asyncTest(() => analyze([uri], WHITE_LIST)); 271 asyncTest(() => analyze([uri], WHITE_LIST));
30 } 272 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698