| 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 /// Test data for the end2end test. | 5 /// Test data for the end2end test. |
| 6 library test.end2end.data; | 6 library test.end2end.data; |
| 7 | 7 |
| 8 import 'test_helper.dart'; | 8 import 'test_helper.dart'; |
| 9 | 9 |
| 10 class TestSpec extends TestSpecBase { | 10 class TestSpec extends TestSpecBase { |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 '''), | 249 '''), |
| 250 | 250 |
| 251 const TestSpec(''' | 251 const TestSpec(''' |
| 252 main() { | 252 main() { |
| 253 var a = 0; | 253 var a = 0; |
| 254 print(a); | 254 print(a); |
| 255 a = ""; | 255 a = ""; |
| 256 print(a); | 256 print(a); |
| 257 return a; | 257 return a; |
| 258 } | 258 } |
| 259 ''', ''' |
| 260 main() { |
| 261 var a; |
| 262 print(0); |
| 263 a = ""; |
| 264 print(a); |
| 265 return a; |
| 266 } |
| 259 '''), | 267 '''), |
| 260 | 268 |
| 261 const TestSpec(''' | 269 const TestSpec(''' |
| 262 main(a) { | 270 main(a) { |
| 263 print(a); | 271 print(a); |
| 264 a = ""; | 272 a = ""; |
| 265 print(a); | 273 print(a); |
| 266 return a; | 274 return a; |
| 267 } | 275 } |
| 268 '''), | 276 '''), |
| 269 | 277 |
| 270 const TestSpec(''' | 278 const TestSpec(''' |
| 271 main(a) { | 279 main(a) { |
| 272 if (a) { | 280 if (a) { |
| 273 a = ""; | 281 a = ""; |
| 274 } | 282 } |
| 275 print(a); | 283 print(a); |
| 276 return a; | 284 return a; |
| 277 } | 285 } |
| 286 ''', ''' |
| 287 main(a) { |
| 288 a = a ? "" : a; |
| 289 print(a); |
| 290 return a; |
| 291 } |
| 278 '''), | 292 '''), |
| 279 ]), | 293 ]), |
| 280 | 294 |
| 281 const Group('Dynamic access', const <TestSpec>[ | 295 const Group('Dynamic access', const <TestSpec>[ |
| 282 const TestSpec(''' | 296 const TestSpec(''' |
| 283 main(a) { | 297 main(a) { |
| 284 return a.foo; | 298 return a.foo; |
| 285 } | 299 } |
| 286 '''), | 300 '''), |
| 287 | 301 |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 const TestSpec(''' | 748 const TestSpec(''' |
| 735 main(a) { | 749 main(a) { |
| 736 for (var i in a) { | 750 for (var i in a) { |
| 737 print(i); | 751 print(i); |
| 738 i = 0; | 752 i = 0; |
| 739 print(i); | 753 print(i); |
| 740 } | 754 } |
| 741 } | 755 } |
| 742 ''', ''' | 756 ''', ''' |
| 743 main(a) { | 757 main(a) { |
| 744 var v0 = a.iterator, i; | 758 var v0 = a.iterator; |
| 745 while (v0.moveNext()) { | 759 while (v0.moveNext()) { |
| 746 i = v0.current; | 760 print(v0.current); |
| 747 print(i); | 761 print(0); |
| 748 i = 0; | |
| 749 print(i); | |
| 750 } | 762 } |
| 751 } | 763 } |
| 752 '''), | 764 '''), |
| 753 | 765 |
| 754 const TestSpec(''' | 766 const TestSpec(''' |
| 755 main(a) { | 767 main(a) { |
| 756 var i; | 768 var i; |
| 757 for (i in a) { | 769 for (i in a) { |
| 758 print(i); | 770 print(i); |
| 759 } | 771 } |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 main() { | 906 main() { |
| 895 try { | 907 try { |
| 896 return null; | 908 return null; |
| 897 } catch (e, v0) { | 909 } catch (e, v0) { |
| 898 return null; | 910 return null; |
| 899 } | 911 } |
| 900 } | 912 } |
| 901 '''), | 913 '''), |
| 902 ]), | 914 ]), |
| 903 ]; | 915 ]; |
| OLD | NEW |