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

Unified Diff: pkg/analyzer/test/src/task/strong/front_end_inference_test.dart

Issue 2867113002: Update expectations for instance creations to match front_end. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | pkg/front_end/testcases/inference/constructors_downwards_with_constraint.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/strong/front_end_inference_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart b/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart
index bf778e8bee38bc5c7d42f7650ab26ef7986dd15d..9d0f983d486a6015f235f3b3f1e93a05e7620879 100644
--- a/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart
+++ b/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart
@@ -32,6 +32,9 @@ main() {
}, timeout: new Timeout(const Duration(seconds: 60)));
}
+/// Set this to `true` to cause expectation comments to be updated.
+const bool fixProblems = false;
+
@reflectiveTest
class RunFrontEndInferenceTest {
test_run() async {
@@ -99,7 +102,12 @@ class _FrontEndInferenceTest extends BaseAnalysisDriverTest {
validation.finish();
if (validation.hasProblems) {
- return validation.problemsAsString;
+ if (fixProblems) {
+ validation.fixSource(uri);
+ return null;
+ } else {
+ return validation.problemsAsString;
+ }
} else {
return null;
}
@@ -239,7 +247,7 @@ class _InstrumentationVisitor extends RecursiveAstVisitor<Null> {
if (type is InterfaceType) {
if (type.typeParameters.isNotEmpty &&
node.constructorName.type.typeArguments == null) {
- _recordTypeArguments(node.offset, type.typeArguments);
+ _recordTypeArguments(node.constructorName.offset, type.typeArguments);
}
}
}
« no previous file with comments | « no previous file | pkg/front_end/testcases/inference/constructors_downwards_with_constraint.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698