| 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 sexpr_test. | 5 /// Test data for sexpr_test. |
| 6 library test.sexpr.data; | 6 library test.sexpr.data; |
| 7 | 7 |
| 8 import 'test_helper.dart'; | 8 import 'test_helper.dart'; |
| 9 | 9 |
| 10 class TestSpec extends TestSpecBase { |
| 11 // A [String] or a [Map<String, String>]. |
| 12 final output; |
| 13 |
| 14 const TestSpec(String input, this.output) : super(input); |
| 15 } |
| 16 |
| 10 const List<Group> TEST_DATA = const [ | 17 const List<Group> TEST_DATA = const [ |
| 11 const Group('Empty main', const [ | 18 const Group('Empty main', const [ |
| 12 const TestSpec(''' | 19 const TestSpec(''' |
| 13 main() {} | 20 main() {} |
| 14 ''', ''' | 21 ''', ''' |
| 15 (FunctionDefinition main ( return) | 22 (FunctionDefinition main ( return) |
| 16 (LetPrim v0 (Constant NullConstant)) | 23 (LetPrim v0 (Constant NullConstant)) |
| 17 (InvokeContinuation return v0)) | 24 (InvokeContinuation return v0)) |
| 18 '''), | 25 '''), |
| 19 | 26 |
| (...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1270 (InvokeContinuation k0 v2)) | 1277 (InvokeContinuation k0 v2)) |
| 1271 (LetCont (k3) | 1278 (LetCont (k3) |
| 1272 (LetPrim v4 (CreateFunction | 1279 (LetPrim v4 (CreateFunction |
| 1273 (FunctionDefinition ( return) | 1280 (FunctionDefinition ( return) |
| 1274 (LetPrim v5 (Constant IntConstant(1))) | 1281 (LetPrim v5 (Constant IntConstant(1))) |
| 1275 (InvokeContinuation return v5)))) | 1282 (InvokeContinuation return v5)))) |
| 1276 (InvokeContinuation k0 v4)) | 1283 (InvokeContinuation k0 v4)) |
| 1277 (Branch (IsTrue a) k2 k3)) | 1284 (Branch (IsTrue a) k2 k3)) |
| 1278 '''), | 1285 '''), |
| 1279 ]), | 1286 ]), |
| 1287 |
| 1288 const Group('Top level field', const <TestSpec>[ |
| 1289 const TestSpec(''' |
| 1290 var field; |
| 1291 main(args) { |
| 1292 return field; |
| 1293 } |
| 1294 ''', const { |
| 1295 'main': ''' |
| 1296 (FunctionDefinition main (args return) |
| 1297 (LetCont (k0 v0) |
| 1298 (InvokeContinuation return v0)) |
| 1299 (InvokeStatic field k0)) |
| 1300 ''', |
| 1301 'field': ''' |
| 1302 (FieldDefinition field) |
| 1303 '''}), |
| 1304 |
| 1305 const TestSpec(''' |
| 1306 var field = null; |
| 1307 main(args) { |
| 1308 return field; |
| 1309 } |
| 1310 ''', const { |
| 1311 'main': ''' |
| 1312 (FunctionDefinition main (args return) |
| 1313 (LetCont (k0 v0) |
| 1314 (InvokeContinuation return v0)) |
| 1315 (InvokeStatic field k0)) |
| 1316 ''', |
| 1317 'field': ''' |
| 1318 (FieldDefinition field (return) |
| 1319 (LetPrim v0 (Constant NullConstant)) |
| 1320 (InvokeContinuation return v0)) |
| 1321 '''}), |
| 1322 |
| 1323 const TestSpec(''' |
| 1324 var field = 0; |
| 1325 main(args) { |
| 1326 return field; |
| 1327 } |
| 1328 ''', const { |
| 1329 'main': ''' |
| 1330 (FunctionDefinition main (args return) |
| 1331 (LetCont (k0 v0) |
| 1332 (InvokeContinuation return v0)) |
| 1333 (InvokeStatic field k0)) |
| 1334 ''', |
| 1335 'field': ''' |
| 1336 (FieldDefinition field (return) |
| 1337 (LetPrim v0 (Constant IntConstant(0))) |
| 1338 (InvokeContinuation return v0)) |
| 1339 '''}), |
| 1340 |
| 1341 const TestSpec(''' |
| 1342 var field; |
| 1343 main(args) { |
| 1344 field = args.length; |
| 1345 return field; |
| 1346 } |
| 1347 ''', ''' |
| 1348 (FunctionDefinition main (args return) |
| 1349 (LetCont (k0 v0) |
| 1350 (LetCont (k1 v1) |
| 1351 (LetCont (k2 v2) |
| 1352 (InvokeContinuation return v2)) |
| 1353 (InvokeStatic field k2)) |
| 1354 (InvokeStatic field v0 k1)) |
| 1355 (InvokeMethod args length k0)) |
| 1356 '''), |
| 1357 ]), |
| 1280 ]; | 1358 ]; |
| OLD | NEW |