| 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 analyzer.test.src.summary.summary_common; | 5 library analyzer.test.src.summary.summary_common; | 
| 6 | 6 | 
| 7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; | 
| 8 import 'package:analyzer/dart/ast/ast.dart'; | 8 import 'package:analyzer/dart/ast/ast.dart'; | 
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; | 
| 10 import 'package:analyzer/src/dart/scanner/reader.dart'; | 10 import 'package:analyzer/src/dart/scanner/reader.dart'; | 
| 11 import 'package:analyzer/src/dart/scanner/scanner.dart'; | 11 import 'package:analyzer/src/dart/scanner/scanner.dart'; | 
| 12 import 'package:analyzer/src/generated/engine.dart'; | 12 import 'package:analyzer/src/generated/engine.dart'; | 
| 13 import 'package:analyzer/src/generated/error.dart'; | 13 import 'package:analyzer/src/generated/error.dart'; | 
| 14 import 'package:analyzer/src/generated/java_engine_io.dart'; |  | 
| 15 import 'package:analyzer/src/generated/parser.dart'; | 14 import 'package:analyzer/src/generated/parser.dart'; | 
| 16 import 'package:analyzer/src/generated/source.dart'; | 15 import 'package:analyzer/src/generated/source.dart'; | 
| 17 import 'package:analyzer/src/generated/source_io.dart'; | 16 import 'package:analyzer/src/generated/source_io.dart'; | 
| 18 import 'package:analyzer/src/summary/base.dart'; | 17 import 'package:analyzer/src/summary/base.dart'; | 
| 19 import 'package:analyzer/src/summary/idl.dart'; | 18 import 'package:analyzer/src/summary/idl.dart'; | 
| 20 import 'package:analyzer/src/summary/public_namespace_computer.dart' | 19 import 'package:analyzer/src/summary/public_namespace_computer.dart' | 
| 21     as public_namespace; | 20     as public_namespace; | 
| 22 import 'package:analyzer/src/summary/summarize_elements.dart' | 21 import 'package:analyzer/src/summary/summarize_elements.dart' | 
| 23     as summarize_elements; | 22     as summarize_elements; | 
|  | 23 import 'package:path/path.dart' show posix; | 
| 24 import 'package:unittest/unittest.dart'; | 24 import 'package:unittest/unittest.dart'; | 
| 25 | 25 | 
| 26 import '../context/mock_sdk.dart'; | 26 import '../context/mock_sdk.dart'; | 
| 27 | 27 | 
| 28 /** | 28 /** | 
| 29  * Convert [path] to a suitably formatted absolute path URI for the current | 29  * Convert the given Posix style file [path] to the corresponding absolute URI. | 
| 30  * platform. |  | 
| 31  */ | 30  */ | 
| 32 String absUri(String path) { | 31 String absUri(String path) { | 
| 33   return FileUtilities2.createFile(path).toURI().toString(); | 32   String absolutePath = posix.absolute(path); | 
|  | 33   return posix.toUri(absolutePath).toString(); | 
| 34 } | 34 } | 
| 35 | 35 | 
| 36 /** | 36 /** | 
| 37  * Convert a summary object (or a portion of one) into a canonical form that | 37  * Convert a summary object (or a portion of one) into a canonical form that | 
| 38  * can be easily compared using [expect].  If [orderByName] is true, and the | 38  * can be easily compared using [expect].  If [orderByName] is true, and the | 
| 39  * object is a [List], it is sorted by the `name` field of its elements. | 39  * object is a [List], it is sorted by the `name` field of its elements. | 
| 40  */ | 40  */ | 
| 41 Object canonicalize(Object obj, {bool orderByName: false}) { | 41 Object canonicalize(Object obj, {bool orderByName: false}) { | 
| 42   if (obj is SummaryClass) { | 42   if (obj is SummaryClass) { | 
| 43     Map<String, Object> result = <String, Object>{}; | 43     Map<String, Object> result = <String, Object>{}; | 
| (...skipping 10482 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 10526 class _PrefixExpectation { | 10526 class _PrefixExpectation { | 
| 10527   final ReferenceKind kind; | 10527   final ReferenceKind kind; | 
| 10528   final String name; | 10528   final String name; | 
| 10529   final String absoluteUri; | 10529   final String absoluteUri; | 
| 10530   final String relativeUri; | 10530   final String relativeUri; | 
| 10531   final int numTypeParameters; | 10531   final int numTypeParameters; | 
| 10532 | 10532 | 
| 10533   _PrefixExpectation(this.kind, this.name, | 10533   _PrefixExpectation(this.kind, this.name, | 
| 10534       {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); | 10534       {this.absoluteUri, this.relativeUri, this.numTypeParameters: 0}); | 
| 10535 } | 10535 } | 
| OLD | NEW | 
|---|