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

Unified Diff: tests/corelib/print_test.dart

Issue 60553002: Add test that makes sure print deals with broken toStrings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add corelib test. Created 7 years, 1 month 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 | « no previous file | tests/lib/async/print_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/print_test.dart
diff --git a/tests/lib/mirrors/unmangled_type_test.dart b/tests/corelib/print_test.dart
similarity index 61%
copy from tests/lib/mirrors/unmangled_type_test.dart
copy to tests/corelib/print_test.dart
index dbc6b62437908677c6fb6c1dab670b8d0dd7d2b6..7139d75e2f7c498b6317a3c6df52158a186dbdbd 100644
--- a/tests/lib/mirrors/unmangled_type_test.dart
+++ b/tests/corelib/print_test.dart
@@ -2,14 +2,20 @@
// 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.
-import 'dart:mirrors';
-
import 'package:expect/expect.dart';
-class Foo {
+class A {
+ toString() {
+ if (false
+ || true /// 01: runtime error
+ ) {
+ return 499;
+ } else {
+ return "ok";
+ }
+ }
}
main() {
- Expect.stringEquals('Foo', '${new Foo().runtimeType}');
- Expect.stringEquals('foo', MirrorSystem.getName(new Symbol('foo')));
+ print(new A());
}
« no previous file with comments | « no previous file | tests/lib/async/print_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698