| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library test.src.serialization.elements_test; | 5 library test.src.serialization.elements_test; |
| 6 | 6 |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/constant/value.dart'; | 10 import 'package:analyzer/dart/constant/value.dart'; |
| (...skipping 3634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3645 | 3645 |
| 3646 test_localFunctions_inTopLevelGetter() { | 3646 test_localFunctions_inTopLevelGetter() { |
| 3647 checkLibrary(r''' | 3647 checkLibrary(r''' |
| 3648 get g { | 3648 get g { |
| 3649 f() {} | 3649 f() {} |
| 3650 } | 3650 } |
| 3651 '''); | 3651 '''); |
| 3652 } | 3652 } |
| 3653 | 3653 |
| 3654 test_localLabels_inConstructor() { | 3654 test_localLabels_inConstructor() { |
| 3655 checkLibrary(r''' | 3655 checkLibrary( |
| 3656 r''' |
| 3656 class C { | 3657 class C { |
| 3657 C() { | 3658 C() { |
| 3658 aaa: while (true) {} | 3659 aaa: while (true) {} |
| 3659 bbb: switch (42) { | 3660 bbb: switch (42) { |
| 3660 ccc: case 0: | 3661 ccc: case 0: |
| 3661 break; | 3662 break; |
| 3662 } | 3663 } |
| 3663 } | 3664 } |
| 3664 } | 3665 } |
| 3665 '''); | 3666 ''', |
| 3667 allowErrors: true); |
| 3666 } | 3668 } |
| 3667 | 3669 |
| 3668 test_localLabels_inMethod() { | 3670 test_localLabels_inMethod() { |
| 3669 checkLibrary(r''' | 3671 checkLibrary( |
| 3672 r''' |
| 3670 class C { | 3673 class C { |
| 3671 m() { | 3674 m() { |
| 3672 aaa: while (true) {} | 3675 aaa: while (true) {} |
| 3673 bbb: switch (42) { | 3676 bbb: switch (42) { |
| 3674 ccc: case 0: | 3677 ccc: case 0: |
| 3675 break; | 3678 break; |
| 3676 } | 3679 } |
| 3677 } | 3680 } |
| 3678 } | 3681 } |
| 3679 '''); | 3682 ''', |
| 3683 allowErrors: true); |
| 3680 } | 3684 } |
| 3681 | 3685 |
| 3682 test_localLabels_inTopLevelFunction() { | 3686 test_localLabels_inTopLevelFunction() { |
| 3683 checkLibrary(r''' | 3687 checkLibrary( |
| 3688 r''' |
| 3684 main() { | 3689 main() { |
| 3685 aaa: while (true) {} | 3690 aaa: while (true) {} |
| 3686 bbb: switch (42) { | 3691 bbb: switch (42) { |
| 3687 ccc: case 0: | 3692 ccc: case 0: |
| 3688 break; | 3693 break; |
| 3689 } | 3694 } |
| 3690 } | 3695 } |
| 3691 '''); | 3696 ''', |
| 3697 allowErrors: true); |
| 3692 } | 3698 } |
| 3693 | 3699 |
| 3694 test_localVariables_inConstructor() { | 3700 test_localVariables_inConstructor() { |
| 3695 checkLibrary(r''' | 3701 checkLibrary(r''' |
| 3696 class C { | 3702 class C { |
| 3697 C() { | 3703 C() { |
| 3698 int v; | 3704 int v; |
| 3699 f() {} | 3705 f() {} |
| 3700 } | 3706 } |
| 3701 } | 3707 } |
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4602 fail('Unexpectedly tried to get unlinked summary for $uri'); | 4608 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 4603 } | 4609 } |
| 4604 return serializedUnit; | 4610 return serializedUnit; |
| 4605 } | 4611 } |
| 4606 | 4612 |
| 4607 @override | 4613 @override |
| 4608 bool hasLibrarySummary(String uri) { | 4614 bool hasLibrarySummary(String uri) { |
| 4609 return true; | 4615 return true; |
| 4610 } | 4616 } |
| 4611 } | 4617 } |
| OLD | NEW |