| 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 b229219a22be7336c5b7931884c448e3c84f8cfe..1348b8e70a5a92808139e5e34ec5cbc2606b0a82 100644
|
| --- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
|
| +++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
|
| @@ -1413,6 +1413,40 @@ const V = p.C.m;
|
| ''');
|
| }
|
|
|
| + test_const_reference_topLevelFunction() {
|
| + shouldCompareConstValues = true;
|
| + checkLibrary(r'''
|
| +foo() {}
|
| +const V = foo;
|
| +''');
|
| + }
|
| +
|
| + test_const_reference_topLevelFunction_imported() {
|
| + shouldCompareConstValues = true;
|
| + addLibrarySource(
|
| + '/a.dart',
|
| + r'''
|
| +foo() {}
|
| +''');
|
| + checkLibrary(r'''
|
| +import 'a.dart';
|
| +const V = foo;
|
| +''');
|
| + }
|
| +
|
| + test_const_reference_topLevelFunction_imported_withPrefix() {
|
| + shouldCompareConstValues = true;
|
| + addLibrarySource(
|
| + '/a.dart',
|
| + r'''
|
| +foo() {}
|
| +''');
|
| + checkLibrary(r'''
|
| +import 'a.dart' as p;
|
| +const V = p.foo;
|
| +''');
|
| + }
|
| +
|
| test_const_reference_topLevelVariable() {
|
| shouldCompareConstValues = true;
|
| checkLibrary(r'''
|
|
|