Chromium Code Reviews| Index: pkg/analyzer/test/src/summary/resynthesize_test.dart |
| diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart |
| index d6c1b518076f3521f7bf60f3f1745df58dfbfbd6..19a793ae2f4121a3642997ec0bb4cfdfdf5dd4af 100644 |
| --- a/pkg/analyzer/test/src/summary/resynthesize_test.dart |
| +++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart |
| @@ -477,6 +477,9 @@ class ResynthTest extends ResolverTestCase { |
| void compareConstructorElements(ConstructorElement resynthesized, |
| ConstructorElement original, String desc) { |
| + if (original == null && resynthesized == null) { |
| + return; |
| + } |
| compareExecutableElements(resynthesized, original, desc); |
| if (original.isConst) { |
| ConstructorElementImpl resynthesizedImpl = |
| @@ -1457,6 +1460,23 @@ const V = const p.C.named(); |
| '''); |
| } |
| + test_const_invokeConstructor_named_unresolved() { |
| + checkLibrary( |
| + r''' |
| +class C {} |
| +const V = const C.named(); |
| +''', |
| + allowErrors: true); |
| + } |
| + |
| + test_const_invokeConstructor_named_unresolved2() { |
| + checkLibrary( |
| + r''' |
| +const V = const C.named(); |
| +''', |
| + allowErrors: true); |
| + } |
| + |
|
Paul Berry
2016/02/16 20:44:10
Let's also add tests for cases involving prefixes,
scheglov
2016/02/16 21:48:44
Done.
|
| test_const_invokeConstructor_unnamed() { |
| checkLibrary(r''' |
| class C { |
| @@ -1494,6 +1514,14 @@ const V = const p.C(); |
| '''); |
| } |
| + test_const_invokeConstructor_unnamed_unresolved() { |
| + checkLibrary( |
| + r''' |
| +const V = const C(); |
| +''', |
| + allowErrors: true); |
| + } |
| + |
|
Paul Berry
2016/02/16 20:44:10
Similarly, also test the case:
import 'a.dart' as
scheglov
2016/02/16 21:48:44
Done.
|
| test_const_length_ofClassConstField() { |
| checkLibrary(r''' |
| class C { |