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

Side by Side Diff: pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart

Issue 2839003002: Reorder parameters in Instrumentation.record(). (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 import 'dart:async'; 4 import 'dart:async';
5 import 'dart:convert'; 5 import 'dart:convert';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import 'package:front_end/src/base/instrumentation.dart'; 8 import 'package:front_end/src/base/instrumentation.dart';
9 import 'package:front_end/src/fasta/messages.dart'; 9 import 'package:front_end/src/fasta/messages.dart';
10 import 'package:front_end/src/fasta/scanner.dart'; 10 import 'package:front_end/src/fasta/scanner.dart';
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 expectationsAtOffset.add(new _Expectation( 134 expectationsAtOffset.add(new _Expectation(
135 property, value, commentToken.offset, commentToken.length)); 135 property, value, commentToken.offset, commentToken.length));
136 } 136 }
137 } 137 }
138 } 138 }
139 } 139 }
140 } 140 }
141 141
142 @override 142 @override
143 void record( 143 void record(
144 String property, Uri uri, int offset, InstrumentationValue value) { 144 Uri uri, int offset, String property, InstrumentationValue value) {
145 var expectationsForUri = _unsatisfiedExpectations[uri]; 145 var expectationsForUri = _unsatisfiedExpectations[uri];
146 if (expectationsForUri == null) return; 146 if (expectationsForUri == null) return;
147 var expectationsAtOffset = expectationsForUri[offset]; 147 var expectationsAtOffset = expectationsForUri[offset];
148 if (expectationsAtOffset != null) { 148 if (expectationsAtOffset != null) {
149 for (int i = 0; i < expectationsAtOffset.length; i++) { 149 for (int i = 0; i < expectationsAtOffset.length; i++) {
150 var expectation = expectationsAtOffset[i]; 150 var expectation = expectationsAtOffset[i];
151 if (expectation.property == property) { 151 if (expectation.property == property) {
152 if (!value.matches(expectation.value)) { 152 if (!value.matches(expectation.value)) {
153 _problemWithStack( 153 _problemWithStack(
154 uri, 154 uri,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 this.property, this.value, this.commentOffset, this.commentLength); 220 this.property, this.value, this.commentOffset, this.commentLength);
221 } 221 }
222 222
223 class _Fix { 223 class _Fix {
224 final int offset; 224 final int offset;
225 final int length; 225 final int length;
226 final String replacement; 226 final String replacement;
227 227
228 _Fix(this.offset, this.length, this.replacement); 228 _Fix(this.offset, this.length, this.replacement);
229 } 229 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/base/instrumentation.dart ('k') | pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698