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

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

Issue 96323006: Support newInstance() for class mirrors of generic classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. Created 7 years 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/mirrors/initializing_formals_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/new_instance_with_type_arguments_test.dart
diff --git a/tests/lib/mirrors/new_instance_with_type_arguments_test.dart b/tests/lib/mirrors/new_instance_with_type_arguments_test.dart
index 44238ad106a5e9e504ecf3bb30a44dea09ab2e68..2885bbbda578e91db8d8999d8f11cd4d69211c5d 100644
--- a/tests/lib/mirrors/new_instance_with_type_arguments_test.dart
+++ b/tests/lib/mirrors/new_instance_with_type_arguments_test.dart
@@ -20,7 +20,7 @@ main() {
ClassMirror cmA = reflectClass(A);
ClassMirror cmB = reflectClass(B);
ClassMirror cmC = reflectClass(C);
-
+
var a_int = new A<int>();
var a_dynamic = new A();
var b = new B();
@@ -36,31 +36,26 @@ main() {
Expect.equals(String, c_string.s);
Expect.equals(dynamic, c_dynamic.s);
-
var reflective_a_int =
cmB.superclass.newInstance(const Symbol(''), []).reflectee;
var reflective_a_dynamic =
cmA.newInstance(const Symbol(''), []).reflectee;
var reflective_b =
cmB.newInstance(const Symbol(''), []).reflectee;
- // TODO(rmacnak): Uncomment when reflectType is added to the API.
- // var reflective_c_string =
- // reflectType(cmC.runtimeType).newInstance(const Symbol(''), []).reflectee;
var reflective_c_dynamic =
cmC.newInstance(const Symbol(''), []).reflectee;
Expect.equals(int, reflective_a_int.t);
Expect.equals(dynamic, reflective_a_dynamic.t);
Expect.equals(int, reflective_b.t);
- // Expect.equals(num, c_string.t);
+ Expect.equals(num, c_string.t);
Expect.equals(num, reflective_c_dynamic.t);
- // Expect.equals(String, c_string.s);
+ Expect.equals(String, c_string.s);
Expect.equals(dynamic, reflective_c_dynamic.s);
Expect.equals(a_int.runtimeType, reflective_a_int.runtimeType);
Expect.equals(a_dynamic.runtimeType, reflective_a_dynamic.runtimeType);
Expect.equals(b.runtimeType, reflective_b.runtimeType);
- // Expect.equals(c_string.runtimeType, reflective_c_string.runtimeType);
Expect.equals(c_dynamic.runtimeType, reflective_c_dynamic.runtimeType);
}
« no previous file with comments | « tests/lib/mirrors/initializing_formals_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698