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

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

Issue 1147853002: Properly handle circular references among constants in the task model. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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 test.src.task.test_support; 5 library test.src.task.test_support;
6 6
7 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask; 7 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask;
8 import 'package:analyzer/src/generated/java_engine.dart'; 8 import 'package:analyzer/src/generated/java_engine.dart';
9 import 'package:analyzer/task/model.dart'; 9 import 'package:analyzer/task/model.dart';
10 10
(...skipping 14 matching lines...) Expand all
25 /** 25 /**
26 * The results whose values are to be provided as outputs from this task. 26 * The results whose values are to be provided as outputs from this task.
27 */ 27 */
28 List<ResultDescriptor> results; 28 List<ResultDescriptor> results;
29 29
30 /** 30 /**
31 * The next value that is to be used for a result. 31 * The next value that is to be used for a result.
32 */ 32 */
33 int value; 33 int value;
34 34
35 @override
36 final bool handlesDependencyCycles;
37
35 TestAnalysisTask(AnalysisContext context, AnalysisTarget target, 38 TestAnalysisTask(AnalysisContext context, AnalysisTarget target,
36 {this.descriptor, this.exception, this.results, this.value: 1}) 39 {this.descriptor, this.exception, this.results, this.value: 1,
40 this.handlesDependencyCycles: false})
scheglov 2015/05/19 19:25:42 Please keep these parameters sorted by name.
Paul Berry 2015/05/19 19:36:11 Done.
37 : super(context, target); 41 : super(context, target);
38 42
39 @override 43 @override
40 String get description => 'Test task'; 44 String get description => 'Test task';
41 45
42 @override 46 @override
43 internalPerform() { 47 internalPerform() {
44 if (exception != null) { 48 if (exception != null) {
45 caughtException = exception; 49 caughtException = exception;
46 } else if (results != null) { 50 } else if (results != null) {
47 for (ResultDescriptor result in results) { 51 for (ResultDescriptor result in results) {
48 outputs[result] = value++; 52 outputs[result] = value++;
49 } 53 }
50 } else if (descriptor != null) { 54 } else if (descriptor != null) {
51 for (ResultDescriptor result in descriptor.results) { 55 for (ResultDescriptor result in descriptor.results) {
52 outputs[result] = value++; 56 outputs[result] = value++;
53 } 57 }
54 } 58 }
55 } 59 }
56 } 60 }
OLDNEW
« pkg/analyzer/test/src/task/inputs_test.dart ('K') | « pkg/analyzer/test/src/task/inputs_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698