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

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

Issue 1355503004: Fix for updating HINTS during incremental resolution with TM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/incremental_resolver_test.dart
diff --git a/pkg/analyzer/test/generated/incremental_resolver_test.dart b/pkg/analyzer/test/generated/incremental_resolver_test.dart
index a60941bb8bacaaad3e93e29e739920b94655480c..50c51babc20bd9f2cf6d2daf400432185b14d1e8 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -3435,11 +3435,19 @@ class A {
''');
}
+ @override
void setUp() {
+ AnalysisEngine.instance.useTaskModel = true;
super.setUp();
_resetWithIncremental(true);
}
+ @override
+ void tearDown() {
+ super.tearDown();
+ AnalysisEngine.instance.useTaskModel = false;
+ }
+
void test_computeConstants() {
_resolveUnit(r'''
int f() => 0;
@@ -4160,6 +4168,28 @@ class A {
''');
}
+ void test_true_todoHint() {
+ _resolveUnit(r'''
+main() {
+ print(1);
+}
+foo() {
+ // TODO
+}
+''');
+ List<AnalysisError> oldErrors = analysisContext.computeErrors(source);
+ _updateAndValidate(r'''
+main() {
+ print(2);
+}
+foo() {
+ // TODO
+}
+''');
+ List<AnalysisError> newErrors = analysisContext.computeErrors(source);
+ _assertEqualErrors(newErrors, oldErrors);
+ }
+
void test_unusedHint_add_wasUsedOnlyInPart() {
Source partSource = addNamedSource(
'/my_unit.dart',
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.dart ('k') | pkg/analyzer/test/src/context/cache_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698