| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import 'dart:collection'; | 5 import 'dart:collection'; |
| 6 | 6 |
| 7 import 'package:matcher/matcher.dart'; | 7 import 'package:matcher/matcher.dart'; |
| 8 import 'package:matcher/src/pretty_print.dart'; | 8 import 'package:matcher/src/pretty_print.dart'; |
| 9 import 'package:test/test.dart' show group, test, expect; | 9 import 'package:test/test.dart' show group, test, expect; |
| 10 | 10 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 expect(prettyPrint([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], maxItems: 10), | 113 expect(prettyPrint([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], maxItems: 10), |
| 114 equals("[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]")); | 114 equals("[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]")); |
| 115 }); | 115 }); |
| 116 | 116 |
| 117 test("that's over maxItems", () { | 117 test("that's over maxItems", () { |
| 118 expect(prettyPrint([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], maxItems: 9), | 118 expect(prettyPrint([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], maxItems: 9), |
| 119 equals("[0, 1, 2, 3, 4, 5, 6, 7, ...]")); | 119 equals("[0, 1, 2, 3, 4, 5, 6, 7, ...]")); |
| 120 }); | 120 }); |
| 121 | 121 |
| 122 test("that's recursive", () { | 122 test("that's recursive", () { |
| 123 var list = [1, 2, 3]; | 123 var list = <dynamic>[1, 2, 3]; |
| 124 list.add(list); | 124 list.add(list); |
| 125 expect(prettyPrint(list), equals("[1, 2, 3, (recursive)]")); | 125 expect(prettyPrint(list), equals("[1, 2, 3, (recursive)]")); |
| 126 }); | 126 }); |
| 127 }); | 127 }); |
| 128 | 128 |
| 129 group("with a map", () { | 129 group("with a map", () { |
| 130 test('containing primitive objects', () { | 130 test('containing primitive objects', () { |
| 131 expect(prettyPrint({'foo': 1, 'bar': true}), | 131 expect(prettyPrint({'foo': 1, 'bar': true}), |
| 132 equals("{'foo': 1, 'bar': true}")); | 132 equals("{'foo': 1, 'bar': true}")); |
| 133 }); | 133 }); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 test("that's not a list", () { | 226 test("that's not a list", () { |
| 227 expect(prettyPrint([1, 2, 3, 4].map((n) => n * 2)), | 227 expect(prettyPrint([1, 2, 3, 4].map((n) => n * 2)), |
| 228 equals("MappedListIterable:[2, 4, 6, 8]")); | 228 equals("MappedListIterable:[2, 4, 6, 8]")); |
| 229 }); | 229 }); |
| 230 | 230 |
| 231 test("that's not a list and has a private name", () { | 231 test("that's not a list and has a private name", () { |
| 232 expect(prettyPrint(new _PrivateNameIterable()), equals("?:[1, 2, 3]")); | 232 expect(prettyPrint(new _PrivateNameIterable()), equals("?:[1, 2, 3]")); |
| 233 }); | 233 }); |
| 234 }); | 234 }); |
| 235 } | 235 } |
| OLD | NEW |