| Index: pkg/analyzer/test/generated/static_warning_code_test.dart
|
| diff --git a/pkg/analyzer/test/generated/static_warning_code_test.dart b/pkg/analyzer/test/generated/static_warning_code_test.dart
|
| index 4164beb8b1c0ed26d4a795b279dd83c0cb27ba0a..127654a623197b42e4f4a7939476437d93c0ba70 100644
|
| --- a/pkg/analyzer/test/generated/static_warning_code_test.dart
|
| +++ b/pkg/analyzer/test/generated/static_warning_code_test.dart
|
| @@ -1116,7 +1116,7 @@ var m = {const A<int>(): 0, const A<num>(): 1};''');
|
| verify([source]);
|
| }
|
|
|
| - void test_exportDuplicatedLibraryName() {
|
| + void test_exportDuplicatedLibraryNamed() {
|
| Source source = addSource(r'''
|
| library test;
|
| export 'lib1.dart';
|
| @@ -1124,7 +1124,19 @@ export 'lib2.dart';''');
|
| addNamedSource("/lib1.dart", "library lib;");
|
| addNamedSource("/lib2.dart", "library lib;");
|
| resolve(source);
|
| - assertErrors(source, [StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAME]);
|
| + assertErrors(source, [StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAMED]);
|
| + verify([source]);
|
| + }
|
| +
|
| + void test_exportDuplicatedLibraryUnnamed() {
|
| + Source source = addSource(r'''
|
| +library test;
|
| +export 'lib1.dart';
|
| +export 'lib2.dart';''');
|
| + addNamedSource("/lib1.dart", "");
|
| + addNamedSource("/lib2.dart", "");
|
| + resolve(source);
|
| + assertErrors(source, [StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_UNNAMED]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1292,7 +1304,7 @@ class B implements A {
|
| verify([source]);
|
| }
|
|
|
| - void test_importDuplicatedLibraryName() {
|
| + void test_importDuplicatedLibraryNamed() {
|
| Source source = addSource(r'''
|
| library test;
|
| import 'lib1.dart';
|
| @@ -1301,7 +1313,22 @@ import 'lib2.dart';''');
|
| addNamedSource("/lib2.dart", "library lib;");
|
| resolve(source);
|
| assertErrors(source, [
|
| - StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAME,
|
| + StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAMED,
|
| + HintCode.UNUSED_IMPORT,
|
| + HintCode.UNUSED_IMPORT]);
|
| + verify([source]);
|
| + }
|
| +
|
| + void test_importDuplicatedLibraryUnnamed() {
|
| + Source source = addSource(r'''
|
| +library test;
|
| +import 'lib1.dart';
|
| +import 'lib2.dart';''');
|
| + addNamedSource("/lib1.dart", "");
|
| + addNamedSource("/lib2.dart", "");
|
| + resolve(source);
|
| + assertErrors(source, [
|
| + StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_UNNAMED,
|
| HintCode.UNUSED_IMPORT,
|
| HintCode.UNUSED_IMPORT]);
|
| verify([source]);
|
|
|