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

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

Issue 780643002: More work on logging - new classes and timers. (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';
11 import 'package:analyzer/src/generated/incremental_resolver.dart'; 11 import 'package:analyzer/src/generated/incremental_resolver.dart';
12 import 'package:analyzer/src/generated/incremental_logger.dart' as log;
12 import 'package:analyzer/src/generated/java_engine.dart'; 13 import 'package:analyzer/src/generated/java_engine.dart';
13 import 'package:analyzer/src/generated/parser.dart'; 14 import 'package:analyzer/src/generated/parser.dart';
14 import 'package:analyzer/src/generated/resolver.dart'; 15 import 'package:analyzer/src/generated/resolver.dart';
15 import 'package:analyzer/src/generated/scanner.dart'; 16 import 'package:analyzer/src/generated/scanner.dart';
16 import 'package:analyzer/src/generated/source_io.dart'; 17 import 'package:analyzer/src/generated/source_io.dart';
17 import 'package:analyzer/src/generated/testing/ast_factory.dart'; 18 import 'package:analyzer/src/generated/testing/ast_factory.dart';
18 import 'package:analyzer/src/generated/testing/element_factory.dart'; 19 import 'package:analyzer/src/generated/testing/element_factory.dart';
19 import 'package:unittest/unittest.dart'; 20 import 'package:unittest/unittest.dart';
20 21
21 import '../reflective_tests.dart'; 22 import '../reflective_tests.dart';
(...skipping 2697 matching lines...) Expand 10 before | Expand all | Expand 10 after
2719 '''); 2720 ''');
2720 } 2721 }
2721 2722
2722 /** 2723 /**
2723 * Reset the analysis context to have the 'incremental' option set to the 2724 * Reset the analysis context to have the 'incremental' option set to the
2724 * given value. 2725 * given value.
2725 */ 2726 */
2726 void _resetWithIncremental(bool enable) { 2727 void _resetWithIncremental(bool enable) {
2727 AnalysisOptionsImpl analysisOptions = new AnalysisOptionsImpl(); 2728 AnalysisOptionsImpl analysisOptions = new AnalysisOptionsImpl();
2728 analysisOptions.incremental = enable; 2729 analysisOptions.incremental = enable;
2730 // log.logger = log.PRINT_LOGGER;
2731 log.logger = log.NULL_LOGGER;
2729 analysisContext2.analysisOptions = analysisOptions; 2732 analysisContext2.analysisOptions = analysisOptions;
2730 } 2733 }
2731 2734
2732 void _resolveUnit(String code) { 2735 void _resolveUnit(String code) {
2733 this.code = code; 2736 this.code = code;
2734 source = addSource(code); 2737 source = addSource(code);
2735 oldLibrary = resolve(source); 2738 oldLibrary = resolve(source);
2736 oldUnit = resolveCompilationUnit(source, oldLibrary); 2739 oldUnit = resolveCompilationUnit(source, oldLibrary);
2737 oldUnitElement = oldUnit.element; 2740 oldUnitElement = oldUnit.element;
2738 } 2741 }
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
3907 _visitList(node.metadata, other.metadata); 3910 _visitList(node.metadata, other.metadata);
3908 _visitNode(node.identifier, other.identifier); 3911 _visitNode(node.identifier, other.identifier);
3909 } 3912 }
3910 3913
3911 static void assertSameResolution(CompilationUnit actual, 3914 static void assertSameResolution(CompilationUnit actual,
3912 CompilationUnit expected) { 3915 CompilationUnit expected) {
3913 _SameResolutionValidator validator = new _SameResolutionValidator(expected); 3916 _SameResolutionValidator validator = new _SameResolutionValidator(expected);
3914 actual.accept(validator); 3917 actual.accept(validator);
3915 } 3918 }
3916 } 3919 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698