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

Side by Side Diff: runtime/tests/vm/dart/isolate_mirror_local_test.dart

Issue 18259021: Introduce StackTraceOnThrowMixin. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // Dart test program for checking implemention of MirrorSystem when 5 // Dart test program for checking implemention of MirrorSystem when
6 // inspecting the current isolate. 6 // inspecting the current isolate.
7 // 7 //
8 // VMOptions=--enable_type_checks 8 // VMOptions=--enable_type_checks
9 9
10 library isolate_mirror_local_test; 10 library isolate_mirror_local_test;
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // TODO(ahe): toString() test disabled for now as Symbols are 100% opaque. 320 // TODO(ahe): toString() test disabled for now as Symbols are 100% opaque.
321 // Expect.equals("ClassMirror on 'List'", list_intf.toString()); 321 // Expect.equals("ClassMirror on 'List'", list_intf.toString());
322 322
323 // Lookup a class from a library and make sure it is sane. 323 // Lookup a class from a library and make sure it is sane.
324 ClassMirror oom_cls = core_lib.members[const Symbol('OutOfMemoryError')]; 324 ClassMirror oom_cls = core_lib.members[const Symbol('OutOfMemoryError')];
325 Expect.isTrue(oom_cls is ClassMirror); 325 Expect.isTrue(oom_cls is ClassMirror);
326 Expect.equals(const Symbol('OutOfMemoryError'), oom_cls.simpleName); 326 Expect.equals(const Symbol('OutOfMemoryError'), oom_cls.simpleName);
327 Expect.equals(const Symbol('dart.core.OutOfMemoryError'), 327 Expect.equals(const Symbol('dart.core.OutOfMemoryError'),
328 oom_cls.qualifiedName); 328 oom_cls.qualifiedName);
329 Expect.isFalse(oom_cls.isPrivate); 329 Expect.isFalse(oom_cls.isPrivate);
330 Expect.equals(const Symbol('Object'), oom_cls.superclass.simpleName); 330 Expect.equals(const Symbol('Error'), oom_cls.superclass.simpleName);
331 Expect.isTrue(oom_cls.defaultFactory == null); 331 Expect.isTrue(oom_cls.defaultFactory == null);
332 Expect.equals(const Symbol('dart.core'), oom_cls.owner.simpleName); 332 Expect.equals(const Symbol('dart.core'), oom_cls.owner.simpleName);
333 Expect.isTrue(oom_cls.isClass); 333 Expect.isTrue(oom_cls.isClass);
334 Expect.equals(const Symbol('Error'), oom_cls.superinterfaces[0].simpleName); 334 Expect.isTrue(oom_cls.superinterfaces.isEmpty);
335 // TODO(ahe): toString() test disabled for now as Symbols are 100% opaque. 335 // TODO(ahe): toString() test disabled for now as Symbols are 100% opaque.
336 // Expect.equals("ClassMirror on 'OutOfMemoryError'", 336 // Expect.equals("ClassMirror on 'OutOfMemoryError'",
337 // oom_cls.toString()); 337 // oom_cls.toString());
338 testDone('testLibrariesMap'); 338 testDone('testLibrariesMap');
339 } 339 }
340 340
341 void testMirrorSystem(MirrorSystem mirrors) { 341 void testMirrorSystem(MirrorSystem mirrors) {
342 Expect.isTrue(mirrors.isolate.debugName.contains('main')); 342 Expect.isTrue(mirrors.isolate.debugName.contains('main'));
343 testRootLibraryMirror(mirrors.isolate.rootLibrary); 343 testRootLibraryMirror(mirrors.isolate.rootLibrary);
344 testLibrariesMap(mirrors.libraries); 344 testLibrariesMap(mirrors.libraries);
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 // Test that an isolate can reflect on itself. 535 // Test that an isolate can reflect on itself.
536 mirrorSystemOf(exit_port.toSendPort()).then(testMirrorSystem); 536 mirrorSystemOf(exit_port.toSendPort()).then(testMirrorSystem);
537 537
538 testIntegerInstanceMirror(reflect(1001)); 538 testIntegerInstanceMirror(reflect(1001));
539 testStringInstanceMirror(reflect('This\nis\na\nString')); 539 testStringInstanceMirror(reflect('This\nis\na\nString'));
540 testBoolInstanceMirror(reflect(true)); 540 testBoolInstanceMirror(reflect(true));
541 testNullInstanceMirror(reflect(null)); 541 testNullInstanceMirror(reflect(null));
542 testCustomInstanceMirror(reflect(new MyClass(17))); 542 testCustomInstanceMirror(reflect(new MyClass(17)));
543 testMirrorErrors(currentMirrorSystem()); 543 testMirrorErrors(currentMirrorSystem());
544 } 544 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698