Chromium Code Reviews| 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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 806 print('v2'); | 806 print('v2'); |
| 807 } | 807 } |
| 808 } | 808 } |
| 809 | 809 |
| 810 main() { | 810 main() { |
| 811 new C().foo(); | 811 new C().foo(); |
| 812 } | 812 } |
| 813 """, | 813 """, |
| 814 const <String>['v2']), | 814 const <String>['v2']), |
| 815 ], | 815 ], |
| 816 | |
| 817 // Test that removing a class is supported. | |
| 818 // TODO(ahe): There should be a warning from second program, but there | |
| 819 // isn't. Investigate and write test. | |
|
Johnni Winther
2014/11/19 12:43:53
All a test in which a static property of C is used
ahe
2014/11/21 10:47:45
Done.
| |
| 820 const <ProgramResult>[ | |
| 821 const ProgramResult( | |
| 822 r""" | |
| 823 class C { | |
| 824 } | |
| 825 | |
| 826 main() { | |
| 827 try { | |
| 828 new C(); | |
| 829 print('v1'); | |
| 830 } catch (e) { | |
| 831 print('v2'); | |
| 832 } | |
| 833 } | |
| 834 """, | |
| 835 const <String>['v1']), | |
| 836 const ProgramResult( | |
| 837 r""" | |
| 838 main() { | |
| 839 try { | |
| 840 new C(); | |
| 841 print('v1'); | |
| 842 } catch (e) { | |
| 843 print('v2'); | |
| 844 } | |
| 845 } | |
| 846 """, | |
| 847 const <String>['v2']), | |
| 848 ], | |
| 816 ]; | 849 ]; |
| 817 | 850 |
| 818 void main() { | 851 void main() { |
| 819 listener.start(); | 852 listener.start(); |
| 820 | 853 |
| 821 document.head.append(lineNumberStyle()); | 854 document.head.append(lineNumberStyle()); |
| 822 | 855 |
| 823 return asyncTest(() => Future.forEach(tests, compileAndRun)); | 856 return asyncTest(() => Future.forEach(tests, compileAndRun)); |
| 824 } | 857 } |
| 825 | 858 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 932 position: absolute; | 965 position: absolute; |
| 933 left: 0px; | 966 left: 0px; |
| 934 width: 3em; | 967 width: 3em; |
| 935 text-align: right; | 968 text-align: right; |
| 936 background-color: lightgoldenrodyellow; | 969 background-color: lightgoldenrodyellow; |
| 937 } | 970 } |
| 938 '''); | 971 '''); |
| 939 style.type = 'text/css'; | 972 style.type = 'text/css'; |
| 940 return style; | 973 return style; |
| 941 } | 974 } |
| OLD | NEW |