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

Unified Diff: tests/compiler/dart2js/mirrors_test.dart

Issue 10823390: Full typedef support in dartdoc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 8 years, 4 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/dartdoc/mirrors/dart2js_mirror.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/mirrors_test.dart
diff --git a/tests/compiler/dart2js/mirrors_test.dart b/tests/compiler/dart2js/mirrors_test.dart
index a69ffc3761dcad6966e46f1ab0e6b2ce34de33cc..9aca91125d41a4a76da96ecd174811ccd0607e29 100644
--- a/tests/compiler/dart2js/mirrors_test.dart
+++ b/tests/compiler/dart2js/mirrors_test.dart
@@ -29,7 +29,7 @@ main() {
var dirPath = scriptPath.directoryPath;
var libPath = dirPath.join(new Path.fromNative('../../../'));
var inputPath = dirPath.join(new Path.fromNative('mirrors_helper.dart'));
- var compilation = new Compilation(inputPath, libPath);
+ var compilation = new Compilation.library([inputPath], libPath);
Expect.isNotNull(compilation, "No compilation created");
var mirrors = compilation.mirrors;
@@ -553,12 +553,13 @@ void testBaz(MirrorSystem system, LibraryMirror helperLibrary,
Expect.throws(() => funcTypedef.typeArguments,
(exception) => true,
"Typedef has type arguments");
- Expect.isNotNull(funcTypedef.typeVariables, "Type variables is null");
- // TODO(johnniwinther): Should return a non-empty map.
- Expect.isTrue(funcTypedef.typeVariables.isEmpty(),
- "Type variables is non-empty");
- // TODO(johnniwinther): Provide access to the definition type.
- Expect.isNull(funcTypedef.definition, "Typedef definition is not null");
+ var funcTypedefTypeVariables = funcTypedef.typeVariables;
+ Expect.isNotNull(funcTypedefTypeVariables);
+ Expect.equals(2, funcTypedefTypeVariables.length);
+
+ var funcTypedefDefinition = funcTypedef.definition;
+ Expect.isNotNull(funcTypedefDefinition);
+ Expect.isTrue(funcTypedefDefinition is FunctionTypeMirror);
Expect.stringEquals("func2", method3Parameter2.simpleName,
"Unexpected parameter simpleName");
« no previous file with comments | « pkg/dartdoc/mirrors/dart2js_mirror.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698