| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import 'dart:uri'; | 5 import 'dart:uri'; |
| 6 import 'parser_helper.dart'; | 6 import 'parser_helper.dart'; |
| 7 import 'mock_compiler.dart'; | 7 import 'mock_compiler.dart'; |
| 8 import '../../../sdk/lib/_internal/compiler/compiler.dart'; | 8 import '../../../sdk/lib/_internal/compiler/compiler.dart'; |
| 9 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' as l
eg; | 9 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' as l
eg; |
| 10 import '../../../sdk/lib/_internal/compiler/implementation/dart_backend/dart_bac
kend.dart'; | 10 import '../../../sdk/lib/_internal/compiler/implementation/dart_backend/dart_bac
kend.dart'; |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 685 fisk.print('corelib'); | 685 fisk.print('corelib'); |
| 686 print('local'); | 686 print('local'); |
| 687 } | 687 } |
| 688 '''; | 688 '''; |
| 689 var expectedResult = "p_print(x){throw 'fisk';}" | 689 var expectedResult = "p_print(x){throw 'fisk';}" |
| 690 "main(){print('corelib');p_print('local');}"; | 690 "main(){print('corelib');p_print('local');}"; |
| 691 testDart2Dart(src, | 691 testDart2Dart(src, |
| 692 continuation: (String result) { Expect.equals(expectedResult, result); }); | 692 continuation: (String result) { Expect.equals(expectedResult, result); }); |
| 693 } | 693 } |
| 694 | 694 |
| 695 testUnresolvedNamedConstructor() { |
| 696 var src = ''' |
| 697 class A { |
| 698 A() {} |
| 699 } |
| 700 |
| 701 main() { |
| 702 new A(); |
| 703 new A.named(); |
| 704 } |
| 705 '''; |
| 706 var expectedResult = "class A{A(){}}main(){new A();new p_Unresolved();}"; |
| 707 testDart2Dart(src, |
| 708 continuation: (String result) { Expect.equals(expectedResult, result); }); |
| 709 } |
| 710 |
| 695 main() { | 711 main() { |
| 696 testSimpleFileUnparse(); | 712 testSimpleFileUnparse(); |
| 697 testTopLevelField(); | 713 testTopLevelField(); |
| 698 testSimpleTopLevelClass(); | 714 testSimpleTopLevelClass(); |
| 699 testClassWithSynthesizedConstructor(); | 715 testClassWithSynthesizedConstructor(); |
| 700 testClassWithMethod(); | 716 testClassWithMethod(); |
| 701 testExtendsImplements(); | 717 testExtendsImplements(); |
| 702 testVariableDefinitions(); | 718 testVariableDefinitions(); |
| 703 testGetSet(); | 719 testGetSet(); |
| 704 testAbstractClass(); | 720 testAbstractClass(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 715 testClassTypeArgumentBound(); | 731 testClassTypeArgumentBound(); |
| 716 testDoubleMains(); | 732 testDoubleMains(); |
| 717 testStaticAccessIoLib(); | 733 testStaticAccessIoLib(); |
| 718 testLocalFunctionPlaceholder(); | 734 testLocalFunctionPlaceholder(); |
| 719 testMinification(); | 735 testMinification(); |
| 720 testClosureLocalsMinified(); | 736 testClosureLocalsMinified(); |
| 721 testParametersMinified(); | 737 testParametersMinified(); |
| 722 testDeclarationTypePlaceholders(); | 738 testDeclarationTypePlaceholders(); |
| 723 testPlatformLibraryMemberNamesAreFixed(); | 739 testPlatformLibraryMemberNamesAreFixed(); |
| 724 testConflictsWithCoreLib(); | 740 testConflictsWithCoreLib(); |
| 741 testUnresolvedNamedConstructor(); |
| 725 } | 742 } |
| OLD | NEW |