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

Unified Diff: pkg/docgen/test/single_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/test/multi_library_test.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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');
« no previous file with comments | « pkg/docgen/test/multi_library_test.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698