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

Side by Side Diff: pkg/unittest/test/pretty_print_test.dart

Issue 17904009: Hide parent function name in name of closurized function to user. (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 | « pkg/unittest/test/matchers_unminified_test.dart ('k') | runtime/vm/object.h » ('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) 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 'package:unittest/src/pretty_print.dart'; 5 import 'package:unittest/src/pretty_print.dart';
6 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
7 7
8 void main() { 8 void main() {
9 test('with primitive objects', () { 9 test('with primitive objects', () {
10 expect(prettyPrint(12), equals('<12>')); 10 expect(prettyPrint(12), equals('<12>'));
11 expect(prettyPrint(12.13), equals('<12.13>')); 11 expect(prettyPrint(12.13), equals('<12.13>'));
12 expect(prettyPrint(true), equals('<true>')); 12 expect(prettyPrint(true), equals('<true>'));
13 expect(prettyPrint(null), equals('<null>')); 13 expect(prettyPrint(null), equals('<null>'));
14 expect(prettyPrint(() => 12), 14 expect(prettyPrint(() => 12),
15 matches(r'<Closure(: \(dynamic\) => dynamic)?>')); 15 matches(r'<Closure(: \(\) => dynamic)?>'));
16 }); 16 });
17 17
18 group('with a string', () { 18 group('with a string', () {
19 test('containing simple characters', () { 19 test('containing simple characters', () {
20 expect(prettyPrint('foo'), equals("'foo'")); 20 expect(prettyPrint('foo'), equals("'foo'"));
21 }); 21 });
22 22
23 test('containing newlines', () { 23 test('containing newlines', () {
24 expect(prettyPrint('foo\nbar\nbaz'), equals( 24 expect(prettyPrint('foo\nbar\nbaz'), equals(
25 "'foo\\n'\n" 25 "'foo\\n'\n"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 expect(prettyPrint({'0': 1, '2': 3, '4': 5, '6': 7}, maxItems: 4), 172 expect(prettyPrint({'0': 1, '2': 3, '4': 5, '6': 7}, maxItems: 4),
173 equals("{'0': 1, '2': 3, '4': 5, '6': 7}")); 173 equals("{'0': 1, '2': 3, '4': 5, '6': 7}"));
174 }); 174 });
175 175
176 test("that's over maxItems", () { 176 test("that's over maxItems", () {
177 expect(prettyPrint({'0': 1, '2': 3, '4': 5, '6': 7}, maxItems: 3), 177 expect(prettyPrint({'0': 1, '2': 3, '4': 5, '6': 7}, maxItems: 3),
178 equals("{'0': 1, '2': 3, ...}")); 178 equals("{'0': 1, '2': 3, ...}"));
179 }); 179 });
180 }); 180 });
181 } 181 }
OLDNEW
« no previous file with comments | « pkg/unittest/test/matchers_unminified_test.dart ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698