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

Side by Side Diff: dart/tests/try/web/incremental_compilation_update_test.dart

Issue 701133003: Implement removal of overridden instance methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r41632 Created 6 years, 1 month 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) 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 trydart.incremental_compilation_update_test; 5 library trydart.incremental_compilation_update_test;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 8
9 import 'dart:async' show 9 import 'dart:async' show
10 Future; 10 Future;
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 var closure; 190 var closure;
191 main() { 191 main() {
192 if (closure == null) { 192 if (closure == null) {
193 closure = new C().m; 193 closure = new C().m;
194 } 194 }
195 closure(); 195 closure();
196 } 196 }
197 """, 197 """,
198 const <String> ['v2']), 198 const <String> ['v2']),
199 ], 199 ],
200
201 // // Test that deleting an instance method works.
Johnni Winther 2014/11/13 10:33:40 Why is this section commented out.
ahe 2014/11/13 11:07:46 Because I don't yet remove the instance method. Th
202 // const <ProgramResult>[
203 // const ProgramResult(
204 // """
205 // class C {
206 // m() {
207 // print('v1');
208 // }
209 // }
210 // var instance;
211 // main() {
212 // if (instance == null) {
213 // instance = new C();
214 // }
215 // try {
216 // instance.m();
217 // } catch (e) {
218 // print('v2');
219 // }
220 // }
221 // """,
222 // const <String> ['v1']),
223 // const ProgramResult(
224 // """
225 // class C {
226 // }
227 // var instance;
228 // main() {
229 // if (instance == null) {
230 // instance = new C();
231 // }
232 // try {
233 // instance.m();
234 // } catch (e) {
235 // print('v2');
236 // }
237 // }
238 // """,
239 // const <String> ['v2']),
240 // ],
241
242 // Test that deleting an instance method works, even when accessed through
243 // super.
244 const <ProgramResult>[
245 const ProgramResult(
246 """
247 class A {
248 m() {
249 print('v2');
250 }
251 }
252 class B extends A {
253 m() {
254 print('v1');
255 }
256 }
257 class C extends B {
258 m() {
259 super.m();
260 }
261 }
262 var instance;
263 main() {
264 if (instance == null) {
265 instance = new C();
266 }
267 instance.m();
268 }
269 """,
270 const <String> ['v1']),
271 const ProgramResult(
272 """
273 class A {
274 m() {
275 print('v2');
276 }
277 }
278 class B extends A {
279 }
280 class C extends B {
281 m() {
282 super.m();
283 }
284 }
285 var instance;
286 main() {
287 if (instance == null) {
288 instance = new C();
289 }
290 instance.m();
291 }
292 """,
293 const <String> ['v2']),
294 ],
295
200 ]; 296 ];
201 297
202 void main() { 298 void main() {
203 listener.start(); 299 listener.start();
204 300
205 return asyncTest(() => Future.forEach(tests, compileAndRun)); 301 return asyncTest(() => Future.forEach(tests, compileAndRun));
206 } 302 }
207 303
208 Future compileAndRun(List<ProgramResult> programs) { 304 Future compileAndRun(List<ProgramResult> programs) {
209 var status = new DivElement(); 305 var status = new DivElement();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 357
262 void logger(x) { 358 void logger(x) {
263 print(x); 359 print(x);
264 bool isCheckedMode = false; 360 bool isCheckedMode = false;
265 assert(isCheckedMode = true); 361 assert(isCheckedMode = true);
266 int timeout = isCheckedMode ? TIMEOUT * 2 : TIMEOUT; 362 int timeout = isCheckedMode ? TIMEOUT * 2 : TIMEOUT;
267 if (listener.elapsed > timeout) { 363 if (listener.elapsed > timeout) {
268 throw 'Test timed out.'; 364 throw 'Test timed out.';
269 } 365 }
270 } 366 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698