| 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 const ProgramResult( | 475 const ProgramResult( |
| 476 """ | 476 """ |
| 477 main() { | 477 main() { |
| 478 print('a'); | 478 print('a'); |
| 479 print('b'); | 479 print('b'); |
| 480 print('c'); | 480 print('c'); |
| 481 } | 481 } |
| 482 """, | 482 """, |
| 483 const <String>['a', 'b', 'c']), | 483 const <String>['a', 'b', 'c']), |
| 484 ], | 484 ], |
| 485 |
| 486 // Test that a newly instantiated class is handled. |
| 487 const <ProgramResult>[ |
| 488 const ProgramResult( |
| 489 r""" |
| 490 class A { |
| 491 get name => 'A.m'; |
| 492 |
| 493 m() { |
| 494 print('Called $name'); |
| 495 } |
| 496 } |
| 497 |
| 498 class B extends A { |
| 499 get name => 'B.m'; |
| 500 } |
| 501 |
| 502 var instance; |
| 503 main() { |
| 504 if (instance == null) { |
| 505 instance = new A(); |
| 506 // } else { |
| 507 // instance = new B(); |
| 508 } |
| 509 instance.m(); |
| 510 } |
| 511 """, |
| 512 const <String>['Called A.m']), |
| 513 const ProgramResult( |
| 514 r""" |
| 515 class A { |
| 516 get name => 'A.m'; |
| 517 |
| 518 m() { |
| 519 print('Called $name'); |
| 520 } |
| 521 } |
| 522 |
| 523 class B extends A { |
| 524 get name => 'B.m'; |
| 525 } |
| 526 |
| 527 var instance; |
| 528 main() { |
| 529 if (instance == null) { |
| 530 instance = new A(); |
| 531 } else { |
| 532 instance = new B(); |
| 533 } |
| 534 instance.m(); |
| 535 } |
| 536 """, |
| 537 const <String>['Called B.m']), |
| 538 ], |
| 485 ]; | 539 ]; |
| 486 | 540 |
| 487 void main() { | 541 void main() { |
| 488 listener.start(); | 542 listener.start(); |
| 489 | 543 |
| 490 document.head.append(lineNumberStyle()); | 544 document.head.append(lineNumberStyle()); |
| 491 | 545 |
| 492 return asyncTest(() => Future.forEach(tests, compileAndRun)); | 546 return asyncTest(() => Future.forEach(tests, compileAndRun)); |
| 493 } | 547 } |
| 494 | 548 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 position: absolute; | 655 position: absolute; |
| 602 left: 0px; | 656 left: 0px; |
| 603 width: 3em; | 657 width: 3em; |
| 604 text-align: right; | 658 text-align: right; |
| 605 background-color: lightgoldenrodyellow; | 659 background-color: lightgoldenrodyellow; |
| 606 } | 660 } |
| 607 '''); | 661 '''); |
| 608 style.type = 'text/css'; | 662 style.type = 'text/css'; |
| 609 return style; | 663 return style; |
| 610 } | 664 } |
| OLD | NEW |