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

Unified Diff: pkg/docgen/test/multi_library_test.dart

Issue 119913002: Align source mirrors with runtime mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments + small fix. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/docgen/lib/docgen.dart ('k') | pkg/docgen/test/single_library_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/test/multi_library_test.dart
diff --git a/pkg/docgen/test/multi_library_test.dart b/pkg/docgen/test/multi_library_test.dart
index 1346de8a6d5d5028a46e2578cbdde46dd1aae153..4745790b4d72b760dfe8243d5f3e6b276df834ab 100644
--- a/pkg/docgen/test/multi_library_test.dart
+++ b/pkg/docgen/test/multi_library_test.dart
@@ -6,6 +6,8 @@ import 'package:path/path.dart' as path;
import 'package:unittest/unittest.dart';
import '../lib/docgen.dart';
+import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart'
+ as dart2js_util;
const String DART_LIBRARY_1 = '''
library testLib;
@@ -104,8 +106,9 @@ List writeLibFiles() {
var fileName3 = path.join(TEMP_DIRNAME.path, 'temp3.dart');
file = new File(fileName3);
file.writeAsStringSync(DART_LIBRARY_3);
- return [new Uri.file(fileName), new Uri.file(fileName3),
- new Uri.file(fileName3)];
+ return [new Uri.file(fileName, windows: Platform.isWindows),
+ new Uri.file(fileName2, windows: Platform.isWindows),
+ new Uri.file(fileName3, windows: Platform.isWindows)];
}
main() {
@@ -126,8 +129,10 @@ main() {
// Test for linking to parameter [c]
var importedLib = libraryMirror.libraryDependencies.firstWhere(
(dep) => dep.isImport).targetLibrary;
- var aClassMirror = importedLib.classes.values.first;
- expect(aClassMirror.qualifiedName, 'testLib2.foo.B');
+ var aClassMirror =
+ dart2js_util.classesOf(importedLib.declarations).first;
+ expect(dart2js_util.qualifiedNameOf(aClassMirror),
+ 'testLib2.foo.B');
var exportedClass = getDocgenObject(aClassMirror, library);
expect(exportedClass is Class, isTrue);
@@ -152,10 +157,12 @@ main() {
// Test a third library referencing another exported library in a
// separate file.
importedLib = libraryMirror.libraryDependencies.firstWhere(
- (dep) => dep.isImport && dep.targetLibrary.qualifiedName ==
+ (dep) => dep.isImport &&
+ dart2js_util.qualifiedNameOf(dep.targetLibrary) ==
'testLib.bar').targetLibrary;
- aClassMirror = importedLib.classes.values.first;
- expect(aClassMirror.qualifiedName, 'testLib.bar.C');
+ aClassMirror = dart2js_util.classesOf(importedLib.declarations).first;
+ expect(dart2js_util.qualifiedNameOf(aClassMirror),
+ 'testLib.bar.C');
exportedClass = getDocgenObject(aClassMirror, library);
expect(exportedClass is Class, isTrue);
expect(exportedClass.docName, 'testLib.C');
« no previous file with comments | « pkg/docgen/lib/docgen.dart ('k') | pkg/docgen/test/single_library_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698