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

Unified Diff: tests/lib/mirrors/function_type_mirror_test.dart

Issue 21440002: Inline CreateClassMirror and remove dead code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | « runtime/vm/symbols.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/function_type_mirror_test.dart
diff --git a/tests/lib/mirrors/function_type_mirror_test.dart b/tests/lib/mirrors/function_type_mirror_test.dart
index 1ec74f029da7f715fb7abc6fc23785e18e474792..4376c83cf44240e139475be5c6c5cd4dcf31a7d1 100644
--- a/tests/lib/mirrors/function_type_mirror_test.dart
+++ b/tests/lib/mirrors/function_type_mirror_test.dart
@@ -8,12 +8,16 @@ import "package:expect/expect.dart";
typedef void FooFunction(int a, double b);
+bar(int a) {}
+
main() {
- // Right now we can only get to a FunctionTypeMirror by reflecting on a
- // typedef. See issue 12135.
TypedefMirror tm = reflectClass(FooFunction);
FunctionTypeMirror ftm = tm.referent;
Expect.equals(const Symbol("void"), ftm.returnType.simpleName);
Expect.equals(const Symbol("int"), ftm.parameters[0].type.simpleName);
Expect.equals(const Symbol("double"), ftm.parameters[1].type.simpleName);
+ ClosureMirror cm = reflect(bar);
+ ftm = cm.type;
+ Expect.equals(const Symbol("dynamic"), ftm.returnType.simpleName);
+ Expect.equals(const Symbol("int"), ftm.parameters[0].type.simpleName);
}
« no previous file with comments | « runtime/vm/symbols.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698