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

Unified Diff: pkg/analyzer/test/generated/compile_time_error_code_test.dart

Issue 1183723002: Explicitly compute library errors in tests. (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/generated/compile_time_error_code_test.dart
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index 540f98365714ddd1f633298167da0c1ad464e0d1..80e0551ed083e029908b9cb43daa244bb4edbdbc 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -20,15 +20,6 @@ main() {
@reflectiveTest
class CompileTimeErrorCodeTest extends ResolverTestCase {
- /**
- * Computes errors for the given [librarySource].
- * This assumes that the given [librarySource] and its parts have already
- * been added to the content provider using the method [addNamedSource].
- */
- void computeLibrarySourceErrors(Source librarySource) {
- analysisContext.computeErrors(librarySource);
- }
-
void fail_awaitInWrongContext_sync() {
// This test requires better error recovery than we currently have. In
// particular, we need to be able to distinguish between an await expression
@@ -4717,7 +4708,7 @@ f() {
p?.g();
}
''');
- resolve(source);
+ computeLibrarySourceErrors(source);
assertErrors(
source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
verify([source]);
@@ -4736,7 +4727,7 @@ f() {
p?.loadLibrary();
}
''');
- resolve(source);
+ computeLibrarySourceErrors(source);
assertErrors(
source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
verify([source]);
@@ -4756,7 +4747,7 @@ f() {
return p?.x;
}
''');
- resolve(source);
+ computeLibrarySourceErrors(source);
assertErrors(
source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
verify([source]);
@@ -4775,7 +4766,7 @@ f() {
return p?.loadLibrary;
}
''');
- resolve(source);
+ computeLibrarySourceErrors(source);
assertErrors(
source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
verify([source]);
@@ -4795,7 +4786,7 @@ f() {
p?.x = null;
}
''');
- resolve(source);
+ computeLibrarySourceErrors(source);
assertErrors(
source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
verify([source]);
@@ -4814,7 +4805,7 @@ f() {
p?.loadLibrary = null;
}
''');
- resolve(source);
+ computeLibrarySourceErrors(source);
assertErrors(
source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
verify([source]);
@@ -4884,7 +4875,7 @@ f() {
return p;
}
''');
- resolve(source);
+ computeLibrarySourceErrors(source);
assertErrors(
source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
verify([source]);
@@ -4898,7 +4889,7 @@ f() {
p += 1;
}
''');
- resolve(source);
+ computeLibrarySourceErrors(source);
assertErrors(
source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
verify([source]);
@@ -4918,7 +4909,7 @@ f() {
p?.g();
}
''');
- resolve(source);
+ computeLibrarySourceErrors(source);
assertErrors(
source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
verify([source]);
« no previous file with comments | « pkg/analyzer/test/generated/all_the_rest_test.dart ('k') | pkg/analyzer/test/generated/incremental_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698