| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |