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

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

Issue 1037313002: Issue 23010. Compute constant and report related errors during incremental resolution. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.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 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 2792 matching lines...) Expand 10 before | Expand all | Expand 10 after
2803 void foo2() {} 2803 void foo2() {}
2804 } 2804 }
2805 '''); 2805 ''');
2806 } 2806 }
2807 2807
2808 void setUp() { 2808 void setUp() {
2809 super.setUp(); 2809 super.setUp();
2810 _resetWithIncremental(true); 2810 _resetWithIncremental(true);
2811 } 2811 }
2812 2812
2813 void test_computeConstants() {
2814 _resolveUnit(r'''
2815 int f() => 0;
2816 main() {
2817 const x = f();
2818 print(x + 1);
2819 }
2820 ''');
2821 _updateAndValidate(r'''
2822 int f() => 0;
2823 main() {
2824 const x = f();
2825 print(x + 2);
2826 }
2827 ''');
2828 }
2829
2813 void test_dartDoc_beforeField() { 2830 void test_dartDoc_beforeField() {
2814 _resolveUnit(r''' 2831 _resolveUnit(r'''
2815 class A { 2832 class A {
2816 /** 2833 /**
2817 * A field [field] of type [int] in class [A]. 2834 * A field [field] of type [int] in class [A].
2818 */ 2835 */
2819 int field; 2836 int field;
2820 } 2837 }
2821 '''); 2838 ''');
2822 _updateAndValidate(r''' 2839 _updateAndValidate(r'''
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after
3999 return ResolutionContextBuilder.contextFor(node, listener).scope; 4016 return ResolutionContextBuilder.contextFor(node, listener).scope;
4000 } 4017 }
4001 } 4018 }
4002 4019
4003 class _Edit { 4020 class _Edit {
4004 final int offset; 4021 final int offset;
4005 final int length; 4022 final int length;
4006 final String replacement; 4023 final String replacement;
4007 _Edit(this.offset, this.length, this.replacement); 4024 _Edit(this.offset, this.length, this.replacement);
4008 } 4025 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698