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

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

Issue 21124011: Inline CreateTypedefMirror and get rid of LazyXXXMirror (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 | « tests/lib/lib.status ('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
new file mode 100644
index 0000000000000000000000000000000000000000..1ec74f029da7f715fb7abc6fc23785e18e474792
--- /dev/null
+++ b/tests/lib/mirrors/function_type_mirror_test.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:mirrors";
+
+import "package:expect/expect.dart";
+
+typedef void FooFunction(int a, double b);
+
+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;
ahe 2013/08/06 11:10:06 What is tm.referent? It is not in the API.
rmacnak 2013/08/06 16:32:40 Hm, the API calls this value.
ahe 2013/08/06 16:41:10 On which line in https://code.google.com/p/dart/so
+ 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);
+}
« no previous file with comments | « tests/lib/lib.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698