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

Side by Side Diff: pkg/analyzer/test/src/task/dart_test.dart

Issue 1807723002: Timing hooks to profile linters (#24548). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.task.dart_test; 5 library analyzer.test.src.task.dart_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/ast/visitor.dart'; 9 import 'package:analyzer/dart/ast/visitor.dart';
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 2633 matching lines...) Expand 10 before | Expand all | Expand 10 after
2644 visitClassDeclaration(ClassDeclaration node) { 2644 visitClassDeclaration(ClassDeclaration node) {
2645 if (!new RegExp(r'^([_]*)([A-Z]+[a-z0-9]*)+$') 2645 if (!new RegExp(r'^([_]*)([A-Z]+[a-z0-9]*)+$')
2646 .hasMatch(node.name.toString())) { 2646 .hasMatch(node.name.toString())) {
2647 linter.reporter.reportErrorForNode(_testLintCode, node, []); 2647 linter.reporter.reportErrorForNode(_testLintCode, node, []);
2648 } 2648 }
2649 } 2649 }
2650 } 2650 }
2651 2651
2652 class GenerateLintsTaskTest_TestLinter extends Linter { 2652 class GenerateLintsTaskTest_TestLinter extends Linter {
2653 @override 2653 @override
2654 String get name => 'GenerateLintsTaskTest_TestLinter';
2655
2656 @override
2654 AstVisitor getVisitor() => new GenerateLintsTaskTest_AstVisitor(this); 2657 AstVisitor getVisitor() => new GenerateLintsTaskTest_AstVisitor(this);
2655 } 2658 }
2656 2659
2657 @reflectiveTest 2660 @reflectiveTest
2658 class InferInstanceMembersInUnitTaskTest extends _AbstractDartTaskTest { 2661 class InferInstanceMembersInUnitTaskTest extends _AbstractDartTaskTest {
2659 test_created_resolved_unit() { 2662 test_created_resolved_unit() {
2660 Source source = newSource( 2663 Source source = newSource(
2661 '/test.dart', 2664 '/test.dart',
2662 r''' 2665 r'''
2663 library lib; 2666 library lib;
(...skipping 2372 matching lines...) Expand 10 before | Expand all | Expand 10 after
5036 /** 5039 /**
5037 * Fill [errorListener] with [result] errors in the current [task]. 5040 * Fill [errorListener] with [result] errors in the current [task].
5038 */ 5041 */
5039 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { 5042 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) {
5040 List<AnalysisError> errors = task.outputs[result]; 5043 List<AnalysisError> errors = task.outputs[result];
5041 expect(errors, isNotNull, reason: result.name); 5044 expect(errors, isNotNull, reason: result.name);
5042 errorListener = new GatheringErrorListener(); 5045 errorListener = new GatheringErrorListener();
5043 errorListener.addAll(errors); 5046 errorListener.addAll(errors);
5044 } 5047 }
5045 } 5048 }
OLDNEW
« pkg/analyzer/lib/src/services/lint.dart ('K') | « 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