| OLD | NEW |
| 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 analysis_server.src.status.validator; | 5 library analysis_server.src.status.validator; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/token.dart'; | 9 import 'package:analyzer/dart/ast/token.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 } | 415 } |
| 416 | 416 |
| 417 void _compareGenericElements(Element expected, Element actual) { | 417 void _compareGenericElements(Element expected, Element actual) { |
| 418 _compareMetadata(expected.metadata, actual.metadata); | 418 _compareMetadata(expected.metadata, actual.metadata); |
| 419 if (expected.nameOffset != actual.nameOffset) { | 419 if (expected.nameOffset != actual.nameOffset) { |
| 420 _write('Expected name offset of '); | 420 _write('Expected name offset of '); |
| 421 _write(expected.nameOffset); | 421 _write(expected.nameOffset); |
| 422 _write('; found '); | 422 _write('; found '); |
| 423 _writeln(actual.nameOffset); | 423 _writeln(actual.nameOffset); |
| 424 } | 424 } |
| 425 SourceRange expectedRange = expected.docRange; | 425 String expectedComment = expected.documentationComment; |
| 426 SourceRange actualRange = actual.docRange; | 426 String actualComment = actual.documentationComment; |
| 427 if (expectedRange.offset != actualRange.offset || | 427 if (expectedComment != actualComment) { |
| 428 expectedRange.length != actualRange.length) { | 428 _write('Expected documentation comment of "'); |
| 429 _write('Expected documentation range of '); | 429 _write(expectedComment); |
| 430 _write(expectedRange); | 430 _write('"; found "'); |
| 431 _write('; found '); | 431 _write(actualComment); |
| 432 _writeln(actualRange); | 432 _writeln('"'); |
| 433 } | 433 } |
| 434 } | 434 } |
| 435 | 435 |
| 436 void _compareImportElements(ImportElement expected, ImportElement actual) { | 436 void _compareImportElements(ImportElement expected, ImportElement actual) { |
| 437 _compareUriReferencedElements(expected, actual); | 437 _compareUriReferencedElements(expected, actual); |
| 438 // | 438 // |
| 439 // Compare attributes. | 439 // Compare attributes. |
| 440 // | 440 // |
| 441 if (expected.isDeferred != actual.isDeferred) { | 441 if (expected.isDeferred != actual.isDeferred) { |
| 442 _writeMismatch( | 442 _writeMismatch( |
| (...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1760 * Determine whether or not there is any interesting difference between the | 1760 * Determine whether or not there is any interesting difference between the |
| 1761 * original and cloned values. | 1761 * original and cloned values. |
| 1762 */ | 1762 */ |
| 1763 void _performComparison() { | 1763 void _performComparison() { |
| 1764 StringBuffer buffer = new StringBuffer(); | 1764 StringBuffer buffer = new StringBuffer(); |
| 1765 if (!_compareObjects(cloneValue, originalValue, buffer)) { | 1765 if (!_compareObjects(cloneValue, originalValue, buffer)) { |
| 1766 description = buffer.toString(); | 1766 description = buffer.toString(); |
| 1767 } | 1767 } |
| 1768 } | 1768 } |
| 1769 } | 1769 } |
| OLD | NEW |