| 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 { | 10 class TestSpec extends TestSpecBase { |
| 11 // A [String] or a [Map<String, String>]. | 11 // A [String] or a [Map<String, String>]. |
| 12 final output; | 12 final output; |
| 13 | 13 |
| 14 const TestSpec(String input, this.output) : super(input); | 14 /// True if the test should be skipped when testing analyzer2dart. |
| 15 final bool skipInAnalyzerFrontend; |
| 16 |
| 17 const TestSpec(String input, this.output, |
| 18 {this.skipInAnalyzerFrontend: false}) : super(input); |
| 15 } | 19 } |
| 16 | 20 |
| 17 const List<Group> TEST_DATA = const [ | 21 const List<Group> TEST_DATA = const [ |
| 18 const Group('Empty main', const [ | 22 const Group('Empty main', const [ |
| 19 const TestSpec(''' | 23 const TestSpec(''' |
| 20 main() {} | 24 main() {} |
| 21 ''', ''' | 25 ''', ''' |
| 22 (FunctionDefinition main ( return) | 26 (FunctionDefinition main ( return) |
| 23 (LetPrim v0 (Constant NullConstant)) | 27 (LetPrim v0 (Constant NullConstant)) |
| 24 (InvokeContinuation return v0)) | 28 (InvokeContinuation return v0)) |
| (...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1348 (FunctionDefinition main (args return) | 1352 (FunctionDefinition main (args return) |
| 1349 (LetCont (k0 v0) | 1353 (LetCont (k0 v0) |
| 1350 (LetCont (k1 v1) | 1354 (LetCont (k1 v1) |
| 1351 (LetCont (k2 v2) | 1355 (LetCont (k2 v2) |
| 1352 (InvokeContinuation return v2)) | 1356 (InvokeContinuation return v2)) |
| 1353 (InvokeStatic field k2)) | 1357 (InvokeStatic field k2)) |
| 1354 (InvokeStatic field v0 k1)) | 1358 (InvokeStatic field v0 k1)) |
| 1355 (InvokeMethod args length k0)) | 1359 (InvokeMethod args length k0)) |
| 1356 '''), | 1360 '''), |
| 1357 ]), | 1361 ]), |
| 1362 |
| 1363 const Group('Closure variables', const <TestSpec>[ |
| 1364 const TestSpec(''' |
| 1365 main(x,foo) { |
| 1366 print(x); |
| 1367 getFoo() => foo; |
| 1368 print(getFoo()); |
| 1369 } |
| 1370 ''', ''' |
| 1371 (FunctionDefinition main {foo} (x foo return) |
| 1372 (LetCont (k0 v0) |
| 1373 (LetPrim v1 (CreateFunction |
| 1374 (FunctionDefinition getFoo ( return) |
| 1375 (LetPrim v2 (GetClosureVariable foo)) |
| 1376 (InvokeContinuation return v2)))) |
| 1377 (LetCont (k1 v3) |
| 1378 (LetCont (k2 v4) |
| 1379 (LetPrim v5 (Constant NullConstant)) |
| 1380 (InvokeContinuation return v5)) |
| 1381 (InvokeStatic print v3 k2)) |
| 1382 (InvokeMethod v1 call k1)) |
| 1383 (InvokeStatic print x k0)) |
| 1384 ''', skipInAnalyzerFrontend: true) |
| 1385 ]), |
| 1358 ]; | 1386 ]; |
| OLD | NEW |