| 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' show Group; | 8 import 'test_helper.dart' show Group; |
| 9 import 'test_helper.dart' as base show TestSpec; | 9 import 'test_helper.dart' as base show TestSpec; |
| 10 | 10 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 var a = 0; | 184 var a = 0; |
| 185 return a; | 185 return a; |
| 186 } | 186 } |
| 187 ''',''' | 187 ''',''' |
| 188 main() { | 188 main() { |
| 189 return 0; | 189 return 0; |
| 190 } | 190 } |
| 191 '''), | 191 '''), |
| 192 ]), | 192 ]), |
| 193 | 193 |
| 194 const Group('Local variable writes', const <TestSpec>[ |
| 195 const TestSpec(''' |
| 196 main() { |
| 197 var a; |
| 198 a = 10; |
| 199 return a; |
| 200 } |
| 201 ''', ''' |
| 202 main() { |
| 203 return 10; |
| 204 } |
| 205 '''), |
| 206 |
| 207 const TestSpec(''' |
| 208 main() { |
| 209 var a = 0; |
| 210 a = 10; |
| 211 return a; |
| 212 } |
| 213 ''', ''' |
| 214 main() { |
| 215 return 10; |
| 216 } |
| 217 '''), |
| 218 |
| 219 const TestSpec(''' |
| 220 main() { |
| 221 var a = 0; |
| 222 print(a); |
| 223 a = ""; |
| 224 print(a); |
| 225 return a; |
| 226 } |
| 227 '''), |
| 228 |
| 229 const TestSpec(''' |
| 230 main(a) { |
| 231 print(a); |
| 232 a = ""; |
| 233 print(a); |
| 234 return a; |
| 235 } |
| 236 '''), |
| 237 |
| 238 const TestSpec(''' |
| 239 main(a) { |
| 240 if (a) { |
| 241 a = ""; |
| 242 } |
| 243 print(a); |
| 244 return a; |
| 245 } |
| 246 '''), |
| 247 ]), |
| 248 |
| 194 const Group('Dynamic access', const <TestSpec>[ | 249 const Group('Dynamic access', const <TestSpec>[ |
| 195 const TestSpec(''' | 250 const TestSpec(''' |
| 196 main(a) { | 251 main(a) { |
| 197 return a.foo; | 252 return a.foo; |
| 198 } | 253 } |
| 199 '''), | 254 '''), |
| 200 | 255 |
| 201 const TestSpec(''' | 256 const TestSpec(''' |
| 202 main() { | 257 main() { |
| 203 var a = ""; | 258 var a = ""; |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 } | 508 } |
| 454 '''), | 509 '''), |
| 455 | 510 |
| 456 const TestSpec(''' | 511 const TestSpec(''' |
| 457 main(a) { | 512 main(a) { |
| 458 new Deprecated(""); | 513 new Deprecated(""); |
| 459 } | 514 } |
| 460 '''), | 515 '''), |
| 461 ]), | 516 ]), |
| 462 ]; | 517 ]; |
| OLD | NEW |