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/try/web/incremental_compilation_update_test.dart

Issue 720813002: Incremental compilation of new classes with fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r41823. 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
« no previous file with comments | « dart/pkg/dart2js_incremental/lib/library_updater.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 if (instance == null) { 529 if (instance == null) {
530 instance = new A(); 530 instance = new A();
531 } else { 531 } else {
532 instance = new B(); 532 instance = new B();
533 } 533 }
534 instance.m(); 534 instance.m();
535 } 535 }
536 """, 536 """,
537 const <String>['Called B.m']), 537 const <String>['Called B.m']),
538 ], 538 ],
539
540 // Test that fields of a newly instantiated class are handled.
541 const <ProgramResult>[
542 const ProgramResult(
543 r"""
544 class A {
545 var x;
546 A(this.x);
547 }
548 var instance;
549 foo() {
550 if (instance != null) {
551 print(instance.x);
552 } else {
553 print('v1');
554 }
555 }
556 main() {
557 foo();
558 }
559 """,
560 const <String>['v1']),
561 const ProgramResult(
562 r"""
563 class A {
564 var x;
565 A(this.x);
566 }
567 var instance;
568 foo() {
569 if (instance != null) {
570 print(instance.x);
571 } else {
572 print('v1');
573 }
574 }
575 main() {
576 instance = new A('v2');
577 foo();
578 }
579 """,
580 const <String>['v2']),
581 ],
539 ]; 582 ];
540 583
541 void main() { 584 void main() {
542 listener.start(); 585 listener.start();
543 586
544 document.head.append(lineNumberStyle()); 587 document.head.append(lineNumberStyle());
545 588
546 return asyncTest(() => Future.forEach(tests, compileAndRun)); 589 return asyncTest(() => Future.forEach(tests, compileAndRun));
547 } 590 }
548 591
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 position: absolute; 698 position: absolute;
656 left: 0px; 699 left: 0px;
657 width: 3em; 700 width: 3em;
658 text-align: right; 701 text-align: right;
659 background-color: lightgoldenrodyellow; 702 background-color: lightgoldenrodyellow;
660 } 703 }
661 '''); 704 ''');
662 style.type = 'text/css'; 705 style.type = 'text/css';
663 return style; 706 return style;
664 } 707 }
OLDNEW
« no previous file with comments | « dart/pkg/dart2js_incremental/lib/library_updater.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698