| 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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 816 |
| 817 // Test that removing a class is supported. | 817 // Test that removing a class is supported, using constructor. |
| 818 // TODO(ahe): There should be a warning from second program, but there | |
| 819 // isn't. Investigate and write test. | |
| 820 const <ProgramResult>[ | 818 const <ProgramResult>[ |
| 821 const ProgramResult( | 819 const ProgramResult( |
| 822 r""" | 820 r""" |
| 823 class C { | 821 class C { |
| 824 } | 822 } |
| 825 | 823 |
| 826 main() { | 824 main() { |
| 827 try { | 825 try { |
| 828 new C(); | 826 new C(); |
| 829 print('v1'); | 827 print('v1'); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 840 new C(); | 838 new C(); |
| 841 print('v1'); | 839 print('v1'); |
| 842 } catch (e) { | 840 } catch (e) { |
| 843 print('v2'); | 841 print('v2'); |
| 844 } | 842 } |
| 845 } | 843 } |
| 846 """, | 844 """, |
| 847 const <String>['v2']), | 845 const <String>['v2']), |
| 848 ], | 846 ], |
| 849 | 847 |
| 848 // Test that removing a class is supported, using a static method. |
| 849 const <ProgramResult>[ |
| 850 const ProgramResult( |
| 851 r""" |
| 852 class C { |
| 853 static m() { |
| 854 print('v1'); |
| 855 } |
| 856 } |
| 857 |
| 858 main() { |
| 859 try { |
| 860 // TODO(ahe): Incremental compiler can't handle new noSuchMethod |
| 861 // situations, crashes when compiling a constructor which uses type |
| 862 // arguments. |
| 863 C.missing(); |
| 864 } catch (e) { |
| 865 } |
| 866 try { |
| 867 C.m(); |
| 868 } catch (e) { |
| 869 print('v2'); |
| 870 } |
| 871 } |
| 872 """, |
| 873 const <String>['v1']), |
| 874 const ProgramResult( |
| 875 r""" |
| 876 main() { |
| 877 try { |
| 878 C.m(); |
| 879 } catch (e) { |
| 880 print('v2'); |
| 881 } |
| 882 } |
| 883 """, |
| 884 const <String>['v2']), |
| 885 ], |
| 886 |
| 850 // Test that changing the supertype of a class. | 887 // Test that changing the supertype of a class. |
| 851 const <ProgramResult>[ | 888 const <ProgramResult>[ |
| 852 const ProgramResult( | 889 const ProgramResult( |
| 853 r""" | 890 r""" |
| 854 class A { | 891 class A { |
| 855 m() { | 892 m() { |
| 856 print('v2'); | 893 print('v2'); |
| 857 } | 894 } |
| 858 } | 895 } |
| 859 class B extends A { | 896 class B extends A { |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 position: absolute; | 1115 position: absolute; |
| 1079 left: 0px; | 1116 left: 0px; |
| 1080 width: 3em; | 1117 width: 3em; |
| 1081 text-align: right; | 1118 text-align: right; |
| 1082 background-color: lightgoldenrodyellow; | 1119 background-color: lightgoldenrodyellow; |
| 1083 } | 1120 } |
| 1084 '''); | 1121 '''); |
| 1085 style.type = 'text/css'; | 1122 style.type = 'text/css'; |
| 1086 return style; | 1123 return style; |
| 1087 } | 1124 } |
| OLD | NEW |