| OLD | NEW |
| 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 // This file is for pretty-print tests that rely on the names of various Dart | 5 // This file is for pretty-print tests that rely on the names of various Dart |
| 6 // types. These tests will fail when run in minified dart2js, since the names | 6 // types. These tests will fail when run in minified dart2js, since the names |
| 7 // will be mangled. A version of this file that works in minified dart2js is in | 7 // will be mangled. A version of this file that works in minified dart2js is in |
| 8 // pretty_print_minified_test.dart. | 8 // pretty_print_minified_test.dart. |
| 9 | 9 |
| 10 library matcher.print_unminified_test; | 10 library matcher.print_unminified_test; |
| 11 | 11 |
| 12 import 'dart:collection'; | 12 import 'dart:collection'; |
| 13 | 13 |
| 14 import 'package:matcher/matcher.dart'; | 14 import 'package:matcher/matcher.dart'; |
| 15 import 'package:matcher/src/pretty_print.dart'; | 15 import 'package:matcher/src/pretty_print.dart'; |
| 16 import 'package:unittest/unittest.dart' show test, group; | 16 import 'package:unittest/unittest.dart' show test, group, expect; |
| 17 | 17 |
| 18 class DefaultToString {} | 18 class DefaultToString {} |
| 19 | 19 |
| 20 class CustomToString { | 20 class CustomToString { |
| 21 String toString() => "string representation"; | 21 String toString() => "string representation"; |
| 22 } | 22 } |
| 23 | 23 |
| 24 class _PrivateName { | 24 class _PrivateName { |
| 25 String toString() => "string representation"; | 25 String toString() => "string representation"; |
| 26 } | 26 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 51 test("that's not a list", () { | 51 test("that's not a list", () { |
| 52 expect(prettyPrint([1, 2, 3, 4].map((n) => n * 2)), | 52 expect(prettyPrint([1, 2, 3, 4].map((n) => n * 2)), |
| 53 equals("MappedListIterable:[2, 4, 6, 8]")); | 53 equals("MappedListIterable:[2, 4, 6, 8]")); |
| 54 }); | 54 }); |
| 55 | 55 |
| 56 test("that's not a list and has a private name", () { | 56 test("that's not a list and has a private name", () { |
| 57 expect(prettyPrint(new _PrivateNameIterable()), equals("?:[1, 2, 3]")); | 57 expect(prettyPrint(new _PrivateNameIterable()), equals("?:[1, 2, 3]")); |
| 58 }); | 58 }); |
| 59 }); | 59 }); |
| 60 } | 60 } |
| OLD | NEW |