Index: pkg/docgen/test/single_library_test.dart |
diff --git a/pkg/docgen/test/single_library_test.dart b/pkg/docgen/test/single_library_test.dart |
index ed30818fa9033c37e42ae9768163e4f5c4f53f91..01968c9780c579a55ba356d96b7bf8fb6de4911a 100644 |
--- a/pkg/docgen/test/single_library_test.dart |
+++ b/pkg/docgen/test/single_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 = ''' |
library test; |
@@ -48,8 +50,8 @@ main() { |
file.writeAsStringSync(DART_LIBRARY); |
getMirrorSystem([new Uri.file(fileName)]) |
.then(expectAsync1((mirrorSystem) { |
- var testLibraryUri = new Uri(scheme: 'file', |
- path: path.absolute(fileName)); |
+ var testLibraryUri = new Uri.file(path.absolute(fileName), |
+ windows: Platform.isWindows); |
var library = new Library(mirrorSystem.libraries[testLibraryUri]); |
expect(library is Library, isTrue); |
@@ -99,12 +101,14 @@ main() { |
/// Testing fixReference |
// Testing Doc comment for class [A]. |
var libraryMirror = mirrorSystem.libraries[testLibraryUri]; |
- var classMirror = libraryMirror.classes.values.first; |
+ var classMirror = |
+ dart2js_util.classesOf(libraryMirror.declarations).first; |
var classDocComment = library.fixReference('A').children.first.text; |
expect(classDocComment, 'test.A'); |
// Test for linking to parameter [A] |
- var method = getDocgenObject(classMirror.methods['doThis']); |
+ var method = getDocgenObject( |
+ classMirror.declarations[dart2js_util.symbolOf('doThis')]); |
var methodParameterDocComment = method.fixReference( |
'A').children.first.text; |
expect(methodParameterDocComment, 'test.A.doThis.A'); |