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' hide | 7 import 'dart:html' hide |
8 Element; | 8 Element; |
9 | 9 |
10 import 'dart:async' show | 10 import 'dart:async' show |
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 """, | 1300 """, |
1301 const <String>['v1']), | 1301 const <String>['v1']), |
1302 const ProgramResult( | 1302 const ProgramResult( |
1303 r""" | 1303 r""" |
1304 main() { | 1304 main() { |
1305 ['v2'].forEach(print); | 1305 ['v2'].forEach(print); |
1306 } | 1306 } |
1307 """, | 1307 """, |
1308 const <String>['v2']), | 1308 const <String>['v2']), |
1309 ], | 1309 ], |
| 1310 |
| 1311 // Test that newly instantiated classes are handled correctly when there is |
| 1312 // more than one change. |
| 1313 const <ProgramResult>[ |
| 1314 const ProgramResult( |
| 1315 r""" |
| 1316 class A { |
| 1317 foo() { |
| 1318 print('Called foo'); |
| 1319 } |
| 1320 |
| 1321 bar() { |
| 1322 print('Called bar'); |
| 1323 } |
| 1324 } |
| 1325 |
| 1326 class B extends A { |
| 1327 } |
| 1328 |
| 1329 main() { |
| 1330 new B().foo(); |
| 1331 } |
| 1332 """, |
| 1333 const <String>['Called foo']), |
| 1334 const ProgramResult( |
| 1335 r""" |
| 1336 class A { |
| 1337 foo() { |
| 1338 print('Called foo'); |
| 1339 } |
| 1340 |
| 1341 bar() { |
| 1342 print('Called bar'); |
| 1343 } |
| 1344 } |
| 1345 |
| 1346 class B extends A { |
| 1347 } |
| 1348 |
| 1349 main() { |
| 1350 new B().foo(); |
| 1351 } |
| 1352 """, |
| 1353 const <String>['Called foo']), |
| 1354 const ProgramResult( |
| 1355 r""" |
| 1356 class A { |
| 1357 foo() { |
| 1358 print('Called foo'); |
| 1359 } |
| 1360 |
| 1361 bar() { |
| 1362 print('Called bar'); |
| 1363 } |
| 1364 } |
| 1365 |
| 1366 class B extends A { |
| 1367 } |
| 1368 |
| 1369 main() { |
| 1370 new A().bar(); |
| 1371 } |
| 1372 """, |
| 1373 const <String>['Called bar']), |
| 1374 ], |
1310 ]; | 1375 ]; |
1311 | 1376 |
1312 void main() { | 1377 void main() { |
1313 listener.start(); | 1378 listener.start(); |
1314 | 1379 |
1315 document.head.append(lineNumberStyle()); | 1380 document.head.append(lineNumberStyle()); |
1316 | 1381 |
1317 summary = new SpanElement(); | 1382 summary = new SpanElement(); |
1318 document.body.append(new HeadingElement.h1() | 1383 document.body.append(new HeadingElement.h1() |
1319 ..appendText("Incremental compiler tests") | 1384 ..appendText("Incremental compiler tests") |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1498 position: absolute; | 1563 position: absolute; |
1499 left: 0px; | 1564 left: 0px; |
1500 width: 3em; | 1565 width: 3em; |
1501 text-align: right; | 1566 text-align: right; |
1502 background-color: lightgoldenrodyellow; | 1567 background-color: lightgoldenrodyellow; |
1503 } | 1568 } |
1504 '''); | 1569 '''); |
1505 style.type = 'text/css'; | 1570 style.type = 'text/css'; |
1506 return style; | 1571 return style; |
1507 } | 1572 } |
OLD | NEW |