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

Side by Side Diff: runtime/tests/vm/src/IsolateMirrorBusyTest.dart

Issue 9420038: Heartbeat implementation of dart:mirrors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4 //
5 // Dart test program for checking implemention of IsolateMirror.
6
7 #library('IsolateMirrorBusyTest');
8
9 #import('dart:mirrors');
siva 2012/02/18 01:25:55 Since mirrors are part of the corelib at least in
turnidge 2012/03/07 20:00:14 Has your opinion on this changed after the recent
siva 2012/03/08 22:24:02 We are treating 'dart:mirrors' as an external libr
10
11 class BusyIsolate extends Isolate {
12 void busy() {
13 // TODO(turnidge): Get rid of this function once we check for
14 // interrupts on backwards branches.
15 }
16 void main() {
17 while (true) {
18 busy();
19 }
20 }
21 }
22
23 void testIsolateMirror(port) {
24 isolateMirrorOf(port).then((IsolateMirror mirror) {
25 Expect.isTrue(mirror.debugName.contains("BusyIsolate"));
26 });
27 }
28
29 void main() {
30 // Test that I can reflect on a busy isolate.
31 new BusyIsolate().spawn().then(testIsolateMirror);
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698