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

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: Address comments 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 // The following notices go away when bug 15418 is fixed.
25 "sdk/lib/_collection_dev/iterable.dart": const [
26 "Info: This is the method declaration."],
27
28 "sdk/lib/_internal/lib/interceptors.dart": const [
29 "Info: This is the method declaration."],
30
31 "sdk/lib/core/iterable.dart": const [
32 "Info: This is the method declaration."],
33
34 "sdk/lib/core/list.dart": const [
35 "Info: This is the method declaration."],
36
37 // Bug 15418.
38 "sdk/lib/typed_data/dart2js/typed_data_dart2js.dart": const ["""
39 Warning: 'Uint64List' doesn't implement '[]'.
40 Try adding an implementation of '[]'.""", """
41 Warning: 'Uint64List' doesn't implement '[]='.
42 Try adding an implementation of '[]='.""", """
43 Warning: 'Uint64List' doesn't implement 'length'.
44 Try adding an implementation of 'length'.""", """
45 Warning: 'Uint64List' doesn't implement 'length'.
46 Try adding an implementation of 'length'.""", """
47 Warning: 'Uint64List' doesn't implement 'add'.
48 Try adding an implementation of 'add'.""", """
49 Warning: 'Uint64List' doesn't implement 'addAll'.
50 Try adding an implementation of 'addAll'.""", """
51 Warning: 'Uint64List' doesn't implement 'reversed'.
52 Try adding an implementation of 'reversed'.""", """
53 Warning: 'Uint64List' doesn't implement 'sort'.
54 Try adding an implementation of 'sort'.""", """
55 Warning: 'Uint64List' doesn't implement 'shuffle'.
56 Try adding an implementation of 'shuffle'.""", """
57 Warning: 'Uint64List' doesn't implement 'indexOf'.
58 Try adding an implementation of 'indexOf'.""", """
59 Warning: 'Uint64List' doesn't implement 'lastIndexOf'.
60 Try adding an implementation of 'lastIndexOf'.""", """
61 Warning: 'Uint64List' doesn't implement 'clear'.
62 Try adding an implementation of 'clear'.""", """
63 Warning: 'Uint64List' doesn't implement 'insert'.
64 Try adding an implementation of 'insert'.""", """
65 Warning: 'Uint64List' doesn't implement 'insertAll'.
66 Try adding an implementation of 'insertAll'.""", """
67 Warning: 'Uint64List' doesn't implement 'setAll'.
68 Try adding an implementation of 'setAll'.""", """
69 Warning: 'Uint64List' doesn't implement 'remove'.
70 Try adding an implementation of 'remove'.""", """
71 Warning: 'Uint64List' doesn't implement 'removeAt'.
72 Try adding an implementation of 'removeAt'.""", """
73 Warning: 'Uint64List' doesn't implement 'removeLast'.
74 Try adding an implementation of 'removeLast'.""", """
75 Warning: 'Uint64List' doesn't implement 'removeWhere'.
76 Try adding an implementation of 'removeWhere'.""", """
77 Warning: 'Uint64List' doesn't implement 'retainWhere'.
78 Try adding an implementation of 'retainWhere'.""", """
79 Warning: 'Uint64List' doesn't implement 'sublist'.
80 Try adding an implementation of 'sublist'.""", """
81 Warning: 'Uint64List' doesn't implement 'getRange'.
82 Try adding an implementation of 'getRange'.""", """
83 Warning: 'Uint64List' doesn't implement 'setRange'.
84 Try adding an implementation of 'setRange'.""", """
85 Warning: 'Uint64List' doesn't implement 'removeRange'.
86 Try adding an implementation of 'removeRange'.""", """
87 Warning: 'Uint64List' doesn't implement 'fillRange'.
88 Try adding an implementation of 'fillRange'.""", """
89 Warning: 'Uint64List' doesn't implement 'replaceRange'.
90 Try adding an implementation of 'replaceRange'.""", """
91 Warning: 'Uint64List' doesn't implement 'asMap'.
92 Try adding an implementation of 'asMap'.""", """
93 Warning: 'Uint64List' doesn't implement 'length'.
94 Try adding an implementation of 'length'.""", """
95 Warning: 'Uint64List' doesn't implement 'iterator'.
96 Try adding an implementation of 'iterator'.""", """
97 Warning: 'Uint64List' doesn't implement 'map'.
98 Try adding an implementation of 'map'.""", """
99 Warning: 'Uint64List' doesn't implement 'where'.
100 Try adding an implementation of 'where'.""", """
101 Warning: 'Uint64List' doesn't implement 'expand'.
102 Try adding an implementation of 'expand'.""", """
103 Warning: 'Uint64List' doesn't implement 'contains'.
104 Try adding an implementation of 'contains'.""", """
105 Warning: 'Uint64List' doesn't implement 'forEach'.
106 Try adding an implementation of 'forEach'.""", """
107 Warning: 'Uint64List' doesn't implement 'reduce'.
108 Try adding an implementation of 'reduce'.""", """
109 Warning: 'Uint64List' doesn't implement 'fold'.
110 Try adding an implementation of 'fold'.""", """
111 Warning: 'Uint64List' doesn't implement 'every'.
112 Try adding an implementation of 'every'.""", """
113 Warning: 'Uint64List' doesn't implement 'any'.
114 Try adding an implementation of 'any'.""", """
115 Warning: 'Uint64List' doesn't implement 'toList'.
116 Try adding an implementation of 'toList'.""", """
117 Warning: 'Uint64List' doesn't implement 'toSet'.
118 Try adding an implementation of 'toSet'.""", """
119 Warning: 'Uint64List' doesn't implement 'length'.
120 Try adding an implementation of 'length'.""", """
121 Warning: 'Uint64List' doesn't implement 'isEmpty'.
122 Try adding an implementation of 'isEmpty'.""", """
123 Warning: 'Uint64List' doesn't implement 'isNotEmpty'.
124 Try adding an implementation of 'isNotEmpty'.""", """
125 Warning: 'Uint64List' doesn't implement 'take'.
126 Try adding an implementation of 'take'.""", """
127 Warning: 'Uint64List' doesn't implement 'takeWhile'.
128 Try adding an implementation of 'takeWhile'.""", """
129 Warning: 'Uint64List' doesn't implement 'skip'.
130 Try adding an implementation of 'skip'.""", """
131 Warning: 'Uint64List' doesn't implement 'skipWhile'.
132 Try adding an implementation of 'skipWhile'.""", """
133 Warning: 'Uint64List' doesn't implement 'first'.
134 Try adding an implementation of 'first'.""", """
135 Warning: 'Uint64List' doesn't implement 'last'.
136 Try adding an implementation of 'last'.""", """
137 Warning: 'Uint64List' doesn't implement 'single'.
138 Try adding an implementation of 'single'.""", """
139 Warning: 'Uint64List' doesn't implement 'firstWhere'.
140 Try adding an implementation of 'firstWhere'.""", """
141 Warning: 'Uint64List' doesn't implement 'lastWhere'.
142 Try adding an implementation of 'lastWhere'.""", """
143 Warning: 'Uint64List' doesn't implement 'singleWhere'.
144 Try adding an implementation of 'singleWhere'.""", """
145 Warning: 'Uint64List' doesn't implement 'elementAt'.
146 Try adding an implementation of 'elementAt'.""", """
147 Warning: 'Uint64List' doesn't implement '[]='.
148 Try adding an implementation of '[]='.""", """
149 Warning: 'Uint64List' doesn't implement 'length'.
150 Try adding an implementation of 'length'.""", """
151 Warning: 'Uint64List' doesn't implement '[]'.
152 Try adding an implementation of '[]'.""", """
153 Warning: 'Int64List' doesn't implement '[]'.
154 Try adding an implementation of '[]'.""", """
155 Warning: 'Int64List' doesn't implement '[]='.
156 Try adding an implementation of '[]='.""", """
157 Warning: 'Int64List' doesn't implement 'length'.
158 Try adding an implementation of 'length'.""", """
159 Warning: 'Int64List' doesn't implement 'length'.
160 Try adding an implementation of 'length'.""", """
161 Warning: 'Int64List' doesn't implement 'add'.
162 Try adding an implementation of 'add'.""", """
163 Warning: 'Int64List' doesn't implement 'addAll'.
164 Try adding an implementation of 'addAll'.""", """
165 Warning: 'Int64List' doesn't implement 'reversed'.
166 Try adding an implementation of 'reversed'.""", """
167 Warning: 'Int64List' doesn't implement 'sort'.
168 Try adding an implementation of 'sort'.""", """
169 Warning: 'Int64List' doesn't implement 'shuffle'.
170 Try adding an implementation of 'shuffle'.""", """
171 Warning: 'Int64List' doesn't implement 'indexOf'.
172 Try adding an implementation of 'indexOf'.""", """
173 Warning: 'Int64List' doesn't implement 'lastIndexOf'.
174 Try adding an implementation of 'lastIndexOf'.""", """
175 Warning: 'Int64List' doesn't implement 'clear'.
176 Try adding an implementation of 'clear'.""", """
177 Warning: 'Int64List' doesn't implement 'insert'.
178 Try adding an implementation of 'insert'.""", """
179 Warning: 'Int64List' doesn't implement 'insertAll'.
180 Try adding an implementation of 'insertAll'.""", """
181 Warning: 'Int64List' doesn't implement 'setAll'.
182 Try adding an implementation of 'setAll'.""", """
183 Warning: 'Int64List' doesn't implement 'remove'.
184 Try adding an implementation of 'remove'.""", """
185 Warning: 'Int64List' doesn't implement 'removeAt'.
186 Try adding an implementation of 'removeAt'.""", """
187 Warning: 'Int64List' doesn't implement 'removeLast'.
188 Try adding an implementation of 'removeLast'.""", """
189 Warning: 'Int64List' doesn't implement 'removeWhere'.
190 Try adding an implementation of 'removeWhere'.""", """
191 Warning: 'Int64List' doesn't implement 'retainWhere'.
192 Try adding an implementation of 'retainWhere'.""", """
193 Warning: 'Int64List' doesn't implement 'sublist'.
194 Try adding an implementation of 'sublist'.""", """
195 Warning: 'Int64List' doesn't implement 'getRange'.
196 Try adding an implementation of 'getRange'.""", """
197 Warning: 'Int64List' doesn't implement 'setRange'.
198 Try adding an implementation of 'setRange'.""", """
199 Warning: 'Int64List' doesn't implement 'removeRange'.
200 Try adding an implementation of 'removeRange'.""", """
201 Warning: 'Int64List' doesn't implement 'fillRange'.
202 Try adding an implementation of 'fillRange'.""", """
203 Warning: 'Int64List' doesn't implement 'replaceRange'.
204 Try adding an implementation of 'replaceRange'.""", """
205 Warning: 'Int64List' doesn't implement 'asMap'.
206 Try adding an implementation of 'asMap'.""", """
207 Warning: 'Int64List' doesn't implement 'length'.
208 Try adding an implementation of 'length'.""", """
209 Warning: 'Int64List' doesn't implement 'iterator'.
210 Try adding an implementation of 'iterator'.""", """
211 Warning: 'Int64List' doesn't implement 'map'.
212 Try adding an implementation of 'map'.""", """
213 Warning: 'Int64List' doesn't implement 'where'.
214 Try adding an implementation of 'where'.""", """
215 Warning: 'Int64List' doesn't implement 'expand'.
216 Try adding an implementation of 'expand'.""", """
217 Warning: 'Int64List' doesn't implement 'contains'.
218 Try adding an implementation of 'contains'.""", """
219 Warning: 'Int64List' doesn't implement 'forEach'.
220 Try adding an implementation of 'forEach'.""", """
221 Warning: 'Int64List' doesn't implement 'reduce'.
222 Try adding an implementation of 'reduce'.""", """
223 Warning: 'Int64List' doesn't implement 'fold'.
224 Try adding an implementation of 'fold'.""", """
225 Warning: 'Int64List' doesn't implement 'every'.
226 Try adding an implementation of 'every'.""", """
227 Warning: 'Int64List' doesn't implement 'any'.
228 Try adding an implementation of 'any'.""", """
229 Warning: 'Int64List' doesn't implement 'toList'.
230 Try adding an implementation of 'toList'.""", """
231 Warning: 'Int64List' doesn't implement 'toSet'.
232 Try adding an implementation of 'toSet'.""", """
233 Warning: 'Int64List' doesn't implement 'length'.
234 Try adding an implementation of 'length'.""", """
235 Warning: 'Int64List' doesn't implement 'isEmpty'.
236 Try adding an implementation of 'isEmpty'.""", """
237 Warning: 'Int64List' doesn't implement 'isNotEmpty'.
238 Try adding an implementation of 'isNotEmpty'.""", """
239 Warning: 'Int64List' doesn't implement 'take'.
240 Try adding an implementation of 'take'.""", """
241 Warning: 'Int64List' doesn't implement 'takeWhile'.
242 Try adding an implementation of 'takeWhile'.""", """
243 Warning: 'Int64List' doesn't implement 'skip'.
244 Try adding an implementation of 'skip'.""", """
245 Warning: 'Int64List' doesn't implement 'skipWhile'.
246 Try adding an implementation of 'skipWhile'.""", """
247 Warning: 'Int64List' doesn't implement 'first'.
248 Try adding an implementation of 'first'.""", """
249 Warning: 'Int64List' doesn't implement 'last'.
250 Try adding an implementation of 'last'.""", """
251 Warning: 'Int64List' doesn't implement 'single'.
252 Try adding an implementation of 'single'.""", """
253 Warning: 'Int64List' doesn't implement 'firstWhere'.
254 Try adding an implementation of 'firstWhere'.""", """
255 Warning: 'Int64List' doesn't implement 'lastWhere'.
256 Try adding an implementation of 'lastWhere'.""", """
257 Warning: 'Int64List' doesn't implement 'singleWhere'.
258 Try adding an implementation of 'singleWhere'.""", """
259 Warning: 'Int64List' doesn't implement 'elementAt'.
260 Try adding an implementation of 'elementAt'.""", """
261 Warning: 'Int64List' doesn't implement '[]='.
262 Try adding an implementation of '[]='.""", """
263 Warning: 'Int64List' doesn't implement 'length'.
264 Try adding an implementation of 'length'.""", """
265 Warning: 'Int64List' doesn't implement '[]'.
266 Try adding an implementation of '[]'."""],
24 }; 267 };
25 268
26 void main() { 269 void main() {
27 var uri = currentDirectory.resolve( 270 var uri = currentDirectory.resolve(
28 'sdk/lib/_internal/compiler/implementation/dart2js.dart'); 271 'sdk/lib/_internal/compiler/implementation/dart2js.dart');
29 asyncTest(() => analyze([uri], WHITE_LIST)); 272 asyncTest(() => analyze([uri], WHITE_LIST));
30 } 273 }
OLDNEW
« no previous file with comments | « dart/tests/compiler/dart2js/analyze_api_test.dart ('k') | dart/tests/compiler/dart2js/memory_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698