Chromium Code Reviews| Index: pkg/analyzer/test/src/task/dart_test.dart |
| diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart |
| index 7bc11f51763aa25410ba61a396f5f6636e32a83e..42484bd8973bc3514833a9e8155b1c52946bb9fd 100644 |
| --- a/pkg/analyzer/test/src/task/dart_test.dart |
| +++ b/pkg/analyzer/test/src/task/dart_test.dart |
| @@ -555,17 +555,42 @@ part of lib; |
| } |
| } |
| - test_perform_error_missingLibraryDirectiveWithPart() { |
| + test_perform_error_missingLibraryDirectiveWithPart_hasCommon() { |
| _performBuildTask({ |
| '/lib.dart': ''' |
| -part 'part.dart'; |
| +part 'partA.dart'; |
| +part 'partB.dart'; |
| ''', |
| - '/part.dart': ''' |
| -part of lib; |
| + '/partA.dart': ''' |
| +part of my_lib; |
| + ''', |
| + '/partB.dart': ''' |
| +part of my_lib; |
| +''' |
| + }); |
| + _assertErrorsWithCodes( |
| + [ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART]); |
| + AnalysisErrorWithProperties error = errorListener.errors[0]; |
|
Brian Wilkerson
2015/03/15 23:28:14
"AnalysisErrorWithProperties" --> "AnalysisError"
scheglov
2015/03/15 23:38:15
Done.
|
| + expect(error.getProperty(ErrorProperty.PARTS_LIBRARY_NAME), 'my_lib'); |
| + } |
| + |
| + test_perform_error_missingLibraryDirectiveWithPart_noCommon() { |
| + _performBuildTask({ |
| + '/lib.dart': ''' |
| +part 'partA.dart'; |
| +part 'partB.dart'; |
| +''', |
| + '/partA.dart': ''' |
| +part of libA; |
| + ''', |
| + '/partB.dart': ''' |
| +part of libB; |
| ''' |
| }); |
| _assertErrorsWithCodes( |
| [ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART]); |
| + AnalysisErrorWithProperties error = errorListener.errors[0]; |
|
Brian Wilkerson
2015/03/15 23:28:14
"AnalysisErrorWithProperties" --> "AnalysisError"
scheglov
2015/03/15 23:38:15
Done.
|
| + expect(error.getProperty(ErrorProperty.PARTS_LIBRARY_NAME), isNull); |
| } |
| test_perform_error_partOfDifferentLibrary() { |