Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: pkg/analyzer2dart/test/sexpr_data.dart

Issue 900403003: Support default constructors in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 {
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 (LetPrim (v5 (Constant (Null))) 1379 (LetPrim (v5 (Constant (Null)))
1380 (InvokeContinuation return (v5))))) 1380 (InvokeContinuation return (v5)))))
1381 (InvokeStatic print (v3) k2)))) 1381 (InvokeStatic print (v3) k2))))
1382 (InvokeMethod v1 call () k1))))) 1382 (InvokeMethod v1 call () k1)))))
1383 (InvokeStatic print (x) k0))) 1383 (InvokeStatic print (x) k0)))
1384 ''', skipInAnalyzerFrontend: true) 1384 ''', skipInAnalyzerFrontend: true)
1385 ]), 1385 ]),
1386 1386
1387 const Group('Constructors', const <TestSpec>[ 1387 const Group('Constructors', const <TestSpec>[
1388 const TestSpec(''' 1388 const TestSpec('''
1389 class C {}
1390 main() {
1391 return new C();
1392 }
1393 ''',
1394 const {
1395 'main': '''
1396 (FunctionDefinition main () return
1397 (LetCont ((k0 (v0)
1398 (InvokeContinuation return (v0))))
1399 (InvokeConstructor C () k0)))
1400 ''',
1401 'C.': null}),
1402
1403 const TestSpec('''
1389 class C { 1404 class C {
1390 C() {} 1405 C() {}
1391 } 1406 }
1392 main() { 1407 main() {
1393 return new C(); 1408 return new C();
1394 } 1409 }
1395 ''', 1410 ''',
1396 const { 1411 const {
1397 'main': ''' 1412 'main': '''
1398 (FunctionDefinition main () return 1413 (FunctionDefinition main () return
1399 (LetCont ((k0 (v0) 1414 (LetCont ((k0 (v0)
1400 (InvokeContinuation return (v0)))) 1415 (InvokeContinuation return (v0))))
1401 (InvokeConstructor C () k0))) 1416 (InvokeConstructor C () k0)))
1402 ''', 1417 ''',
1403 'C.': ''' 1418 'C.': '''
1404 (FunctionDefinition () return 1419 (FunctionDefinition () return
1405 (LetPrim (v0 (Constant (Null))) 1420 (LetPrim (v0 (Constant (Null)))
1406 (InvokeContinuation return (v0)))) 1421 (InvokeContinuation return (v0))))
1407 '''}), 1422 '''}),
1423
1424 const TestSpec('''
1425 class B {}
1426 class C extends B {
1427 C() {}
1428 }
1429 main() {
1430 return new C();
1431 }
1432 ''',
1433 const {
1434 'main': '''
1435 (FunctionDefinition main () return
1436 (LetCont ((k0 (v0)
1437 (InvokeContinuation return (v0))))
1438 (InvokeConstructor C () k0)))
1439 ''',
1440 'B.': null,
1441 'C.': '''
1442 (FunctionDefinition () return
1443 (LetPrim (v0 (Constant (Null)))
1444 (InvokeContinuation return (v0))))
1445 '''}),
1446
1447 const TestSpec('''
1448 class B {
1449 B() {}
1450 }
1451 class C extends B {}
1452 main() {
1453 return new C();
1454 }
1455 ''',
1456 const {
1457 'main': '''
1458 (FunctionDefinition main () return
1459 (LetCont ((k0 (v0)
1460 (InvokeContinuation return (v0))))
1461 (InvokeConstructor C () k0)))
1462 ''',
1463 'B.': '''
1464 (FunctionDefinition () return
1465 (LetPrim (v0 (Constant (Null)))
1466 (InvokeContinuation return (v0))))
1467 ''',
1468 'C.': null}),
1408 ]), 1469 ]),
1409 1470
1410 const Group('Instance method', const <TestSpec>[ 1471 const Group('Instance method', const <TestSpec>[
1411 const TestSpec(''' 1472 const TestSpec('''
1412 class C { 1473 class C {
1413 C() {} 1474 C() {}
1414 foo() {} 1475 foo() {}
1415 } 1476 }
1416 main() { 1477 main() {
1417 return new C().foo(); 1478 return new C().foo();
1418 } 1479 }
1419 ''', 1480 ''',
1420 const { 1481 const {
1421 'main': ''' 1482 'main': '''
1422 (FunctionDefinition main () return 1483 (FunctionDefinition main () return
1423 (LetCont ((k0 (v0) 1484 (LetCont ((k0 (v0)
1424 (LetCont ((k1 (v1) 1485 (LetCont ((k1 (v1)
1425 (InvokeContinuation return (v1)))) 1486 (InvokeContinuation return (v1))))
1426 (InvokeMethod v0 foo () k1)))) 1487 (InvokeMethod v0 foo () k1))))
1427 (InvokeConstructor C () k0))) 1488 (InvokeConstructor C () k0)))
1428 ''', 1489 ''',
1429 'C.foo': ''' 1490 'C.foo': '''
1430 (FunctionDefinition foo () return 1491 (FunctionDefinition foo () return
1431 (LetPrim (v0 (Constant (Null))) 1492 (LetPrim (v0 (Constant (Null)))
1432 (InvokeContinuation return (v0)))) 1493 (InvokeContinuation return (v0))))
1433 '''}), 1494 '''}),
1434 ]), 1495 ]),
1435 ]; 1496 ];
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698