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"); |