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

Unified Diff: runtime/tests/vm/dart/isolate_mirror_local_test.dart

Issue 23460050: Mirror removals: async invoke, mirrorSystemOf(port), Mirror.mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: resync Created 7 years, 2 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: runtime/tests/vm/dart/isolate_mirror_local_test.dart
diff --git a/runtime/tests/vm/dart/isolate_mirror_local_test.dart b/runtime/tests/vm/dart/isolate_mirror_local_test.dart
index 4ffcaef3d5ed0a3e45d2b37dd6c88198b5238c2a..ecfb97e8a097b850aee0d90071a2d359908adc12 100644
--- a/runtime/tests/vm/dart/isolate_mirror_local_test.dart
+++ b/runtime/tests/vm/dart/isolate_mirror_local_test.dart
@@ -121,7 +121,7 @@ void testRootLibraryMirror(LibraryMirror lib_mirror) {
// Test library invocation by calling function(123).
Expect.equals(0, global_var);
- lib_mirror.invokeAsync(const Symbol('function'), [123]).then(
+ new Future(()=>lib_mirror.invoke(const Symbol('function'), [123])).then(
ahe 2013/10/29 10:18:22 Don't use future?
rmacnak 2013/10/30 17:25:30 Actually I will just delete this test. This test h
(InstanceMirror retval) {
Expect.equals(123, global_var);
testImplements(retval.type, #int);
@@ -323,7 +323,6 @@ void testLibrariesMap(Map libraries) {
Expect.isFalse(list_intf.isPrivate);
Expect.equals(const Symbol('Object'), list_intf.superclass.simpleName);
Expect.equals(const Symbol('dart.core'), list_intf.owner.simpleName);
- Expect.isTrue(list_intf.isClass);
Expect.equals(const Symbol('Iterable'),
list_intf.superinterfaces[0].simpleName);
Expect.equals("ClassMirror on 'List'", list_intf.toString());
@@ -336,9 +335,7 @@ void testLibrariesMap(Map libraries) {
oom_cls.qualifiedName);
Expect.isFalse(oom_cls.isPrivate);
Expect.equals(const Symbol('Object'), oom_cls.superclass.simpleName);
- Expect.isTrue(oom_cls.defaultFactory == null);
Expect.equals(const Symbol('dart.core'), oom_cls.owner.simpleName);
- Expect.isTrue(oom_cls.isClass);
Expect.equals(const Symbol('Error'), oom_cls.superinterfaces[0].simpleName);
Expect.equals("ClassMirror on 'OutOfMemoryError'",
oom_cls.toString());
@@ -376,7 +373,7 @@ void testIntegerInstanceMirror(InstanceMirror mirror) {
Expect.equals("InstanceMirror on 1001", mirror.toString());
// Invoke (mirror + mirror).
- mirror.invokeAsync(const Symbol('+'), [ mirror ]).then(
+ new Future(()=>mirror.invoke(const Symbol('+'), [ mirror.reflectee ])).then(
ahe 2013/10/29 10:18:22 Don't use future?
(InstanceMirror retval) {
testImplements(retval.type, #int);
Expect.isTrue(retval.hasReflectee);
@@ -393,7 +390,7 @@ void testStringInstanceMirror(InstanceMirror mirror) {
mirror.toString());
// Invoke mirror[0].
- mirror.invokeAsync(const Symbol('[]'), [ 0 ]).then(
+ new Future(()=>mirror.invoke(const Symbol('[]'), [ 0 ])).then(
ahe 2013/10/29 10:18:22 Ditto.
(InstanceMirror retval) {
testImplements(retval.type, #String);
Expect.isTrue(retval.hasReflectee);
@@ -457,15 +454,13 @@ void testCustomInstanceMirror(InstanceMirror mirror) {
Expect.isTrue(cls is ClassMirror);
Expect.equals(const Symbol('MyClass'), cls.simpleName);
Expect.equals(const Symbol('MySuperClass'), cls.superclass.simpleName);
- Expect.isTrue(cls.defaultFactory == null);
Expect.equals(const Symbol('isolate_mirror_local_test'),
cls.owner.simpleName);
- Expect.isTrue(cls.isClass);
Expect.equals(const Symbol('MyInterface'), cls.superinterfaces[0].simpleName);
Expect.equals("ClassMirror on 'MyClass'", cls.toString());
// Invoke mirror.method(1000).
- mirror.invokeAsync(const Symbol('method'), [ 1000 ]).then(
+ new Future(()=>mirror.invoke(const Symbol('method'), [ 1000 ])).then(
ahe 2013/10/29 10:18:22 Ditto.
(InstanceMirror retval) {
testImplements(retval.type, #int);
Expect.isTrue(retval.hasReflectee);
@@ -494,8 +489,7 @@ void main() {
'testNullInstanceMirror',
'testCustomInstanceMirror']);
- // Test that an isolate can reflect on itself.
- mirrorSystemOf(exit_port.toSendPort()).then(testMirrorSystem);
+ testMirrorSystem(currentMirrorSystem());
testIntegerInstanceMirror(reflect(1001));
testStringInstanceMirror(reflect('This\nis\na\nString'));

Powered by Google App Engine
This is Rietveld 408576698