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

Side by Side Diff: pkg/analyzer/test/src/context/context_test.dart

Issue 2201993002: Don't invalidate resolution for ClassElementDelta annotation changes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.test.src.context.context_test; 5 library analyzer.test.src.context.context_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 2816 matching lines...) Expand 10 before | Expand all | Expand 10 after
2827 context.setContents( 2827 context.setContents(
2828 a, 2828 a,
2829 r''' 2829 r'''
2830 @deprecated 2830 @deprecated
2831 class A {} 2831 class A {}
2832 '''); 2832 ''');
2833 _assertValidForChangedLibrary(a); 2833 _assertValidForChangedLibrary(a);
2834 _assertInvalid(a, LIBRARY_ERRORS_READY); 2834 _assertInvalid(a, LIBRARY_ERRORS_READY);
2835 _assertValidForDependentLibrary(b); 2835 _assertValidForDependentLibrary(b);
2836 _assertInvalid(b, LIBRARY_ERRORS_READY); 2836 _assertInvalid(b, LIBRARY_ERRORS_READY);
2837 _assertInvalidUnits(b, RESOLVED_UNIT4); 2837 _assertValidAllResolution(b);
2838 // Analysis is done successfully. 2838 // Analysis is done successfully.
2839 _performPendingAnalysisTasks(); 2839 _performPendingAnalysisTasks();
2840 _assertValid(a, LIBRARY_ERRORS_READY); 2840 _assertValid(a, LIBRARY_ERRORS_READY);
2841 _assertValid(a, READY_RESOLVED_UNIT); 2841 _assertValid(a, READY_RESOLVED_UNIT);
2842 _assertValid(b, LIBRARY_ERRORS_READY); 2842 _assertValid(b, LIBRARY_ERRORS_READY);
2843 _assertValid(b, READY_RESOLVED_UNIT); 2843 _assertValid(b, READY_RESOLVED_UNIT);
2844 expect(context.getErrors(b).errors, hasLength(1)); 2844 expect(context.getErrors(b).errors, hasLength(1));
2845 } 2845 }
2846 2846
2847 void test_class_annotation_remove_deprecated() { 2847 void test_class_annotation_remove_deprecated() {
(...skipping 17 matching lines...) Expand all
2865 // is invalid. 2865 // is invalid.
2866 context.setContents( 2866 context.setContents(
2867 a, 2867 a,
2868 r''' 2868 r'''
2869 class A {} 2869 class A {}
2870 '''); 2870 ''');
2871 _assertValidForChangedLibrary(a); 2871 _assertValidForChangedLibrary(a);
2872 _assertInvalid(a, LIBRARY_ERRORS_READY); 2872 _assertInvalid(a, LIBRARY_ERRORS_READY);
2873 _assertValidForDependentLibrary(b); 2873 _assertValidForDependentLibrary(b);
2874 _assertInvalid(b, LIBRARY_ERRORS_READY); 2874 _assertInvalid(b, LIBRARY_ERRORS_READY);
2875 _assertInvalidUnits(b, RESOLVED_UNIT4); 2875 _assertValidAllResolution(b);
2876 // Analysis is done successfully. 2876 // Analysis is done successfully.
2877 _performPendingAnalysisTasks(); 2877 _performPendingAnalysisTasks();
2878 _assertValid(a, LIBRARY_ERRORS_READY); 2878 _assertValid(a, LIBRARY_ERRORS_READY);
2879 _assertValid(a, READY_RESOLVED_UNIT); 2879 _assertValid(a, READY_RESOLVED_UNIT);
2880 _assertValid(b, LIBRARY_ERRORS_READY); 2880 _assertValid(b, LIBRARY_ERRORS_READY);
2881 _assertValid(b, READY_RESOLVED_UNIT); 2881 _assertValid(b, READY_RESOLVED_UNIT);
2882 expect(context.getErrors(b).errors, hasLength(0)); 2882 expect(context.getErrors(b).errors, hasLength(0));
2883 } 2883 }
2884 2884
2885 void test_class_constructor_named_changeName() { 2885 void test_class_constructor_named_changeName() {
(...skipping 2183 matching lines...) Expand 10 before | Expand all | Expand 10 after
5069 * Initialize the visitor. 5069 * Initialize the visitor.
5070 */ 5070 */
5071 _ElementGatherer(); 5071 _ElementGatherer();
5072 5072
5073 @override 5073 @override
5074 void visitElement(Element element) { 5074 void visitElement(Element element) {
5075 elements[element] = element; 5075 elements[element] = element;
5076 super.visitElement(element); 5076 super.visitElement(element);
5077 } 5077 }
5078 } 5078 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698