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

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

Issue 20066004: Change the return value of setField to be in line with non-reflective assignments. Complete unwrapp… (Closed) Base URL: http://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
« no previous file with comments | « runtime/lib/mirrors_impl.dart ('k') | tests/lib/lib.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 476
477 void testMirrorErrors(MirrorSystem mirrors) { 477 void testMirrorErrors(MirrorSystem mirrors) {
478 LibraryMirror lib_mirror = mirrors.isolate.rootLibrary; 478 LibraryMirror lib_mirror = mirrors.isolate.rootLibrary;
479 479
480 lib_mirror.invokeAsync(const Symbol('methodWithException'), []) 480 lib_mirror.invokeAsync(const Symbol('methodWithException'), [])
481 .then((InstanceMirror retval) { 481 .then((InstanceMirror retval) {
482 // Should not reach here. 482 // Should not reach here.
483 Expect.isTrue(false); 483 Expect.isTrue(false);
484 }) 484 })
485 .catchError((error) { 485 .catchError((error) {
486 Expect.isTrue(error is MirroredUncaughtExceptionError); 486 Expect.isTrue(error is MyException);
487 Expect.equals(const Symbol('MyException'),
488 error.exception_mirror.type.simpleName);
489 Expect.equals('MyException: from methodWithException', 487 Expect.equals('MyException: from methodWithException',
490 error.exception_string); 488 error.toString());
491 Expect.isTrue(error.stacktrace.toString().contains(
492 'isolate_mirror_local_test.dart'));
493 testDone('testMirrorErrors1'); 489 testDone('testMirrorErrors1');
494 }); 490 });
495 491
496 lib_mirror.invokeAsync(const Symbol('methodWithError'), []) 492 lib_mirror.invokeAsync(const Symbol('methodWithError'), [])
497 .then((InstanceMirror retval) { 493 .then((InstanceMirror retval) {
498 // Should not reach here. 494 // Should not reach here.
499 Expect.isTrue(false); 495 Expect.isTrue(false);
500 }) 496 })
501 .catchError((error) { 497 .catchError((error) {
502 Expect.isTrue(error is MirroredCompilationError); 498 Expect.isTrue(error is MirroredCompilationError);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 // Test that an isolate can reflect on itself. 535 // Test that an isolate can reflect on itself.
540 mirrorSystemOf(exit_port.toSendPort()).then(testMirrorSystem); 536 mirrorSystemOf(exit_port.toSendPort()).then(testMirrorSystem);
541 537
542 testIntegerInstanceMirror(reflect(1001)); 538 testIntegerInstanceMirror(reflect(1001));
543 testStringInstanceMirror(reflect('This\nis\na\nString')); 539 testStringInstanceMirror(reflect('This\nis\na\nString'));
544 testBoolInstanceMirror(reflect(true)); 540 testBoolInstanceMirror(reflect(true));
545 testNullInstanceMirror(reflect(null)); 541 testNullInstanceMirror(reflect(null));
546 testCustomInstanceMirror(reflect(new MyClass(17))); 542 testCustomInstanceMirror(reflect(new MyClass(17)));
547 testMirrorErrors(currentMirrorSystem()); 543 testMirrorErrors(currentMirrorSystem());
548 } 544 }
OLDNEW
« no previous file with comments | « runtime/lib/mirrors_impl.dart ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698