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

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

Issue 2625783002: Explicitly compute analysis results for sources to check errors. (Closed)
Patch Set: Rollback await(ing) of assertErrors(). Format. Created 3 years, 11 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/static_type_warning_code_test.dart
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
index 6ba39b09299e3906c893f0cae728807977b4985b..0b942895a37293743049e97e28e940304aaf99ba 100644
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
@@ -133,7 +133,8 @@ f() {}''');
r'''
library lib2;
f() {}''');
- await assertErrors(source, [StaticWarningCode.AMBIGUOUS_IMPORT]);
+ await computeAnalysisResult(source);
+ assertErrors(source, [StaticWarningCode.AMBIGUOUS_IMPORT]);
}
test_assert_message_suppresses_type_promotion() async {
@@ -1720,7 +1721,8 @@ main() { return f.g(); }''');
r'''
library lib;
h() {}''');
- await assertErrors(source, [StaticTypeWarningCode.UNDEFINED_FUNCTION]);
+ await computeAnalysisResult(source);
+ assertErrors(source, [StaticTypeWarningCode.UNDEFINED_FUNCTION]);
}
test_undefinedGetter() async {
@@ -2423,7 +2425,8 @@ main() {
f/*<int>*/();
}
''');
- await assertErrors(
+ await computeAnalysisResult(source);
+ assertErrors(
source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD]);
for (AnalysisError error in analysisContext2.computeErrors(source)) {
if (error.errorCode ==
« no previous file with comments | « pkg/analyzer/test/generated/simple_resolver_test.dart ('k') | pkg/analyzer/test/generated/static_warning_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698