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

Unified Diff: tests/corelib/list_to_string2_test.dart

Issue 18837002: Move toString() to collection classes. (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 side-by-side diff with in-line comments
Download patch
Index: tests/corelib/list_to_string2_test.dart
diff --git a/tests/compiler/dart2js_extra/regress/4515_3_test.dart b/tests/corelib/list_to_string2_test.dart
similarity index 50%
copy from tests/compiler/dart2js_extra/regress/4515_3_test.dart
copy to tests/corelib/list_to_string2_test.dart
index f224d709ae8c32c5a3a8d497c3bc0147f1fdb86a..9fcf0fac7ac0544fac6f958bb3475c4b385a47bc 100644
--- a/tests/compiler/dart2js_extra/regress/4515_3_test.dart
+++ b/tests/corelib/list_to_string2_test.dart
@@ -4,19 +4,17 @@
import "package:expect/expect.dart";
-class A {
- a(x) => x + 1;
-}
-
-f(p) => p("A");
-
main() {
- A a = new A();
- a.a(1);
- var v = null;
- try {
- v = f(a.a);
- } catch (e) { }
+ List list = [1, 2];
+ list.add(list);
+
+ List list2 = new List(4);
+ list2[0] = 1;
+ list2[1] = 2;
+ list2[2] =list2;
+ list2[3] = list;
+
+ Expect.equals("[1, 2, [...]]", list.toString());
+ Expect.equals("[1, 2, [...], [1, 2, [...]]]", list2.toString());
- Expect.equals(null, v);
-}
+}

Powered by Google App Engine
This is Rietveld 408576698