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

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

Issue 735303002: Incremental compilation of added instance fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r41904. Created 6 years 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 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 899
900 main() { 900 main() {
901 if (instance == null) { 901 if (instance == null) {
902 instance = new C(); 902 instance = new C();
903 } 903 }
904 instance.m(); 904 instance.m();
905 } 905 }
906 """, 906 """,
907 const <String>['v2']), 907 const <String>['v2']),
908 ], 908 ],
909
910 // Test adding a field to a class works.
911 const <ProgramResult>[
912 const ProgramResult(
913 r"""
914 class A {
915 }
916
917 var instance;
918
919 main() {
920 if (instance == null) {
921 instance = new A();
922 }
923 try {
924 instance.x = 'v2';
925 } catch(e) {
926 print('setter threw');
927 }
928 try {
929 print(instance.x);
930 } catch (e) {
931 print('getter threw');
932 }
933 }
934 """,
935 const <String>['setter threw', 'getter threw']),
936 const ProgramResult(
937 r"""
938 class A {
939 var x;
940 }
941
942 var instance;
943
944 main() {
945 if (instance == null) {
946 instance = new A();
947 }
948 try {
949 instance.x = 'v2';
950 } catch(e) {
951 print('setter threw');
952 }
953 try {
954 print(instance.x);
955 } catch (e) {
956 print('getter threw');
957 }
958 }
959 """,
960 const <String>['v2']),
961 ],
909 ]; 962 ];
910 963
911 void main() { 964 void main() {
912 listener.start(); 965 listener.start();
913 966
914 document.head.append(lineNumberStyle()); 967 document.head.append(lineNumberStyle());
915 968
916 return asyncTest(() => Future.forEach(tests, compileAndRun)); 969 return asyncTest(() => Future.forEach(tests, compileAndRun));
917 } 970 }
918 971
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 position: absolute; 1078 position: absolute;
1026 left: 0px; 1079 left: 0px;
1027 width: 3em; 1080 width: 3em;
1028 text-align: right; 1081 text-align: right;
1029 background-color: lightgoldenrodyellow; 1082 background-color: lightgoldenrodyellow;
1030 } 1083 }
1031 '''); 1084 ''');
1032 style.type = 'text/css'; 1085 style.type = 'text/css';
1033 return style; 1086 return style;
1034 } 1087 }
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