| 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 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 200 |
| 201 // // Test that deleting an instance method works. | 201 // Test that deleting an instance method works. |
| 202 // const <ProgramResult>[ | 202 const <ProgramResult>[ |
| 203 // const ProgramResult( | 203 const ProgramResult( |
| 204 // """ | 204 """ |
| 205 // class C { | 205 class C { |
| 206 // m() { | 206 m() { |
| 207 // print('v1'); | 207 print('v1'); |
| 208 // } | 208 } |
| 209 // } | 209 } |
| 210 // var instance; | 210 var instance; |
| 211 // main() { | 211 main() { |
| 212 // if (instance == null) { | 212 if (instance == null) { |
| 213 // instance = new C(); | 213 instance = new C(); |
| 214 // } | 214 } |
| 215 // try { | 215 try { |
| 216 // instance.m(); | 216 instance.m(); |
| 217 // } catch (e) { | 217 } catch (e) { |
| 218 // print('v2'); | 218 print('v2'); |
| 219 // } | 219 } |
| 220 // } | 220 } |
| 221 // """, | 221 """, |
| 222 // const <String> ['v1']), | 222 const <String> ['v1']), |
| 223 // const ProgramResult( | 223 const ProgramResult( |
| 224 // """ | 224 """ |
| 225 // class C { | 225 class C { |
| 226 // } | 226 } |
| 227 // var instance; | 227 var instance; |
| 228 // main() { | 228 main() { |
| 229 // if (instance == null) { | 229 if (instance == null) { |
| 230 // instance = new C(); | 230 instance = new C(); |
| 231 // } | 231 } |
| 232 // try { | 232 try { |
| 233 // instance.m(); | 233 instance.m(); |
| 234 // } catch (e) { | 234 } catch (e) { |
| 235 // print('v2'); | 235 print('v2'); |
| 236 // } | 236 } |
| 237 // } | 237 } |
| 238 // """, | 238 """, |
| 239 // const <String> ['v2']), | 239 const <String> ['v2']), |
| 240 // ], | 240 ], |
| 241 | 241 |
| 242 // Test that deleting an instance method works, even when accessed through | 242 // Test that deleting an instance method works, even when accessed through |
| 243 // super. | 243 // super. |
| 244 const <ProgramResult>[ | 244 const <ProgramResult>[ |
| 245 const ProgramResult( | 245 const ProgramResult( |
| 246 """ | 246 """ |
| 247 class A { | 247 class A { |
| 248 m() { | 248 m() { |
| 249 print('v2'); | 249 print('v2'); |
| 250 } | 250 } |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 | 357 |
| 358 void logger(x) { | 358 void logger(x) { |
| 359 print(x); | 359 print(x); |
| 360 bool isCheckedMode = false; | 360 bool isCheckedMode = false; |
| 361 assert(isCheckedMode = true); | 361 assert(isCheckedMode = true); |
| 362 int timeout = isCheckedMode ? TIMEOUT * 2 : TIMEOUT; | 362 int timeout = isCheckedMode ? TIMEOUT * 2 : TIMEOUT; |
| 363 if (listener.elapsed > timeout) { | 363 if (listener.elapsed > timeout) { |
| 364 throw 'Test timed out.'; | 364 throw 'Test timed out.'; |
| 365 } | 365 } |
| 366 } | 366 } |
| OLD | NEW |