Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Unified Diff: pkg/analyzer/test/src/context/context_test.dart

Issue 1168743002: Reanalyze after creating a referenced part. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/test/src/context/context_test.dart
diff --git a/pkg/analyzer/test/src/context/context_test.dart b/pkg/analyzer/test/src/context/context_test.dart
index 0f4ea1353c8db09966284ce417b1c18631a7bd24..ddca9826228a77aa4f37bb12656c610380fb872d 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -473,6 +473,8 @@ library lib;
part 'part.dart';''');
// run all tasks without part
_analyzeAll_assertFinished();
+ expect(_hasAnalysisErrorWithErrorSeverity(context.getErrors(libSource)),
+ isTrue, reason: "lib has errors");
// add part and run all tasks
Source partSource = addSource("/part.dart", r'''
part of lib;
@@ -481,6 +483,11 @@ part of lib;
// "libSource" should be here
List<Source> librariesWithPart = context.getLibrariesContaining(partSource);
expect(librariesWithPart, unorderedEquals([libSource]));
+ expect(_hasAnalysisErrorWithErrorSeverity(context.getErrors(libSource)),
+ isFalse, reason: "lib doesn't have errors");
+ expect(
+ context.getResolvedCompilationUnit2(partSource, libSource), isNotNull,
+ reason: "part resolved");
}
void test_performAnalysisTask_changeLibraryContents() {

Powered by Google App Engine
This is Rietveld 408576698