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

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

Issue 10700149: Some small changes to make the vm dart:mirrors somewhat closer to the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/lib/mirrors_impl.dart ('k') | runtime/tests/vm/dart/isolate_mirror_remote_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/tests/vm/dart/isolate_mirror_local_test.dart
===================================================================
--- runtime/tests/vm/dart/isolate_mirror_local_test.dart (revision 9527)
+++ runtime/tests/vm/dart/isolate_mirror_local_test.dart (working copy)
@@ -2,7 +2,7 @@
// 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.
//
-// Dart test program for checking implemention of IsolateMirror when
+// Dart test program for checking implemention of MirrorSystem when
// inspecting the current isolate.
#library('isolate_mirror_local_test');
@@ -132,9 +132,9 @@
'testCustomInstanceMirror, '
'testDone, '
'testIntegerInstanceMirror, '
- 'testIsolateMirror, '
'testLibrariesMap, '
'testMirrorErrors, '
+ 'testMirrorSystem, '
'testNullInstanceMirror, '
'testRootLibraryMirror, '
'testStringInstanceMirror]',
@@ -168,9 +168,9 @@
'testCustomInstanceMirror, '
'testDone, '
'testIntegerInstanceMirror, '
- 'testIsolateMirror, '
'testLibrariesMap, '
'testMirrorErrors, '
+ 'testMirrorSystem, '
'testNullInstanceMirror, '
'testRootLibraryMirror, '
'testStringInstanceMirror]',
@@ -257,11 +257,11 @@
testDone('testLibrariesMap');
}
-void testIsolateMirror(IsolateMirror mirror) {
- Expect.isTrue(mirror.debugName.contains('main'));
- testRootLibraryMirror(mirror.rootLibrary);
- testLibrariesMap(mirror.libraries());
- testDone('testIsolateMirror');
+void testMirrorSystem(MirrorSystem mirrors) {
+ Expect.isTrue(mirrors.isolate.debugName.contains('main'));
+ testRootLibraryMirror(mirrors.rootLibrary);
+ testLibrariesMap(mirrors.libraries());
+ testDone('testMirrorSystem');
}
void testIntegerInstanceMirror(InstanceMirror mirror) {
@@ -382,8 +382,8 @@
+++;
}
-void testMirrorErrors(IsolateMirror mirror) {
- LibraryMirror lib_mirror = mirror.rootLibrary;
+void testMirrorErrors(MirrorSystem mirrors) {
+ LibraryMirror lib_mirror = mirrors.rootLibrary;
Future<InstanceMirror> future =
lib_mirror.invoke('methodWithException', []);
@@ -446,7 +446,7 @@
exit_port = new ReceivePort();
expectedTests = new Set<String>.from(['testRootLibraryMirror',
'testLibrariesMap',
- 'testIsolateMirror',
+ 'testMirrorSystem',
'testIntegerInstanceMirror',
'testStringInstanceMirror',
'testBoolInstanceMirror',
@@ -457,12 +457,13 @@
'testMirrorErrors3']);
// Test that an isolate can reflect on itself.
- isolateMirrorOf(exit_port.toSendPort()).then(testIsolateMirror);
+ mirrorSystemOf(exit_port.toSendPort()).then(testMirrorSystem);
- testIntegerInstanceMirror(mirrorOf(1001));
- testStringInstanceMirror(mirrorOf('This\nis\na\nString'));
- testBoolInstanceMirror(mirrorOf(true));
- testNullInstanceMirror(mirrorOf(null));
- testCustomInstanceMirror(mirrorOf(new MyClass(17)));
- testMirrorErrors(currentIsolateMirror());
+ MirrorSystem mirrors = currentMirrorSystem();
+ testIntegerInstanceMirror(mirrors.mirrorOf(1001));
+ testStringInstanceMirror(mirrors.mirrorOf('This\nis\na\nString'));
+ testBoolInstanceMirror(mirrors.mirrorOf(true));
+ testNullInstanceMirror(mirrors.mirrorOf(null));
+ testCustomInstanceMirror(mirrors.mirrorOf(new MyClass(17)));
+ testMirrorErrors(currentMirrorSystem());
}
« no previous file with comments | « runtime/lib/mirrors_impl.dart ('k') | runtime/tests/vm/dart/isolate_mirror_remote_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698