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

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: Removed null check 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
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..6e68fb8103aefdb451c0c466b83e33a3c783d73d 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);
Johnni Winther 2012/08/17 13:54:27 This will make the path used by dartdoc tested wit
ahe 2012/08/21 08:50:28 I was surprised that you didn't land this change b
Expect.isNotNull(compilation, "No compilation created");
var mirrors = compilation.mirrors;
@@ -553,12 +553,15 @@ 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, "Type variables is null");
ahe 2012/08/21 08:50:28 The String argument to isNotNull is virtually poin
Johnni Winther 2012/08/21 09:30:27 Done.
+ Expect.equals(2, funcTypedefTypeVariables.length,
+ "Unexpected type variable count");
ahe 2012/08/21 08:50:28 Ditto.
Johnni Winther 2012/08/21 09:30:27 Done.
+
+ var funcTypedefDefinition = funcTypedef.definition;
+ Expect.isNotNull(funcTypedefDefinition, "Typedef definition is null");
ahe 2012/08/21 08:50:28 Ditto.
Johnni Winther 2012/08/21 09:30:27 Done.
+ Expect.isTrue(funcTypedefDefinition is FunctionTypeMirror,
+ "Unexpected typedef definition");
ahe 2012/08/21 08:50:28 Ditto.
Johnni Winther 2012/08/21 09:30:27 Done.
Expect.stringEquals("func2", method3Parameter2.simpleName,
"Unexpected parameter simpleName");
« pkg/dartdoc/mirrors/dart2js_mirror.dart ('K') | « pkg/dartdoc/mirrors/dart2js_mirror.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698