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

Side by Side Diff: pkg/analyzer/test/generated/incremental_resolver_test.dart

Issue 781683004: Replace hints. Resolve TODO. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | Annotate | Revision Log
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 engine.incremental_resolver_test; 5 library engine.incremental_resolver_test;
6 6
7 import 'package:analyzer/src/generated/ast.dart'; 7 import 'package:analyzer/src/generated/ast.dart';
8 import 'package:analyzer/src/generated/element.dart'; 8 import 'package:analyzer/src/generated/element.dart';
9 import 'package:analyzer/src/generated/engine.dart'; 9 import 'package:analyzer/src/generated/engine.dart';
10 import 'package:analyzer/src/generated/error.dart'; 10 import 'package:analyzer/src/generated/error.dart';
(...skipping 2370 matching lines...) Expand 10 before | Expand all | Expand 10 after
2381 // some comment 2381 // some comment
2382 print(0); 2382 print(0);
2383 } 2383 }
2384 '''); 2384 ''');
2385 } 2385 }
2386 2386
2387 void test_endOfLineComment_edit() { 2387 void test_endOfLineComment_edit() {
2388 _resolveUnit(r''' 2388 _resolveUnit(r'''
2389 main() { 2389 main() {
2390 // some comment 2390 // some comment
2391 print(2); 2391 print(0);
2392 } 2392 }
2393 '''); 2393 ''');
2394 _updateAndValidate(r''' 2394 _updateAndValidate(r'''
2395 main() { 2395 main() {
2396 // edited comment text 2396 // edited comment text
2397 print(0); 2397 print(0);
2398 } 2398 }
2399 '''); 2399 ''');
2400 } 2400 }
2401 2401
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
2653 '''); 2653 ''');
2654 _updateAndValidate(r''' 2654 _updateAndValidate(r'''
2655 class A { 2655 class A {
2656 main(int b) { 2656 main(int b) {
2657 print(b); 2657 print(b);
2658 } 2658 }
2659 } 2659 }
2660 '''); 2660 ''');
2661 } 2661 }
2662 2662
2663 void test_updateErrors_addNew_hint() {
2664 _resolveUnit(r'''
2665 int main() {
2666 return 42;
2667 }
2668 ''');
2669 _updateAndValidate(r'''
2670 int main() {
2671 }
2672 ''');
2673 }
2674
2663 void test_updateErrors_addNew_hints() { 2675 void test_updateErrors_addNew_hints() {
2664 _resolveUnit(r''' 2676 _resolveUnit(r'''
2665 main() { 2677 main() {
2666 int v = 0; 2678 int v = 0;
2667 print(v); 2679 print(v);
2668 } 2680 }
2669 '''); 2681 ''');
2670 _updateAndValidate(r''' 2682 _updateAndValidate(r'''
2671 main() { 2683 main() {
2672 int v = 0; 2684 int v = 0;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2723 foo(int p) {} 2735 foo(int p) {}
2724 '''); 2736 ''');
2725 _updateAndValidate(r''' 2737 _updateAndValidate(r'''
2726 main() { 2738 main() {
2727 foo('abc'); 2739 foo('abc');
2728 } 2740 }
2729 foo(int p) {} 2741 foo(int p) {}
2730 '''); 2742 ''');
2731 } 2743 }
2732 2744
2733 void test_updateErrors_removeExisting() { 2745 void test_updateErrors_removeExisting_hint() {
2746 _resolveUnit(r'''
2747 int main() {
2748 }
2749 ''');
2750 _updateAndValidate(r'''
2751 int main() {
2752 return 42;
2753 }
2754 ''');
2755 }
2756
2757 void test_updateErrors_removeExisting_verify() {
2734 _resolveUnit(r''' 2758 _resolveUnit(r'''
2735 f1() { 2759 f1() {
2736 print(1) 2760 print(1)
2737 } 2761 }
2738 f2() { 2762 f2() {
2739 print(22) 2763 print(22)
2740 } 2764 }
2741 f3() { 2765 f3() {
2742 print(333) 2766 print(333)
2743 } 2767 }
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
3971 _visitList(node.metadata, other.metadata); 3995 _visitList(node.metadata, other.metadata);
3972 _visitNode(node.identifier, other.identifier); 3996 _visitNode(node.identifier, other.identifier);
3973 } 3997 }
3974 3998
3975 static void assertSameResolution(CompilationUnit actual, 3999 static void assertSameResolution(CompilationUnit actual,
3976 CompilationUnit expected) { 4000 CompilationUnit expected) {
3977 _SameResolutionValidator validator = new _SameResolutionValidator(expected); 4001 _SameResolutionValidator validator = new _SameResolutionValidator(expected);
3978 actual.accept(validator); 4002 actual.accept(validator);
3979 } 4003 }
3980 } 4004 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698