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

Side by Side Diff: pkg/unittest/lib/unittest.dart

Issue 22284003: pkg: analysis aided cleanup (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits Created 7 years, 4 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/lib/mirror_matchers.dart ('k') | pkg/unittest/test/matchers_test.dart » ('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 /** 5 /**
6 * A library for writing dart unit tests. 6 * A library for writing dart unit tests.
7 * 7 *
8 * ## Installing ## 8 * ## Installing ##
9 * 9 *
10 * Use [pub][] to install this package. Add the following to your `pubspec.yaml` 10 * Use [pub][] to install this package. Add the following to your `pubspec.yaml`
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 * [Issue 2706](http://dartbug.com/2706)). 139 * [Issue 2706](http://dartbug.com/2706)).
140 * 140 *
141 * [pub]: http://pub.dartlang.org 141 * [pub]: http://pub.dartlang.org
142 * [pkg]: http://pub.dartlang.org/packages/unittest 142 * [pkg]: http://pub.dartlang.org/packages/unittest
143 */ 143 */
144 library unittest; 144 library unittest;
145 145
146 import 'dart:async'; 146 import 'dart:async';
147 import 'dart:collection'; 147 import 'dart:collection';
148 import 'dart:isolate'; 148 import 'dart:isolate';
149 import 'dart:math' show max;
150 import 'matcher.dart'; 149 import 'matcher.dart';
151 export 'matcher.dart'; 150 export 'matcher.dart';
152 151
153 import 'package:stack_trace/stack_trace.dart'; 152 import 'package:stack_trace/stack_trace.dart';
154 153
155 import 'src/utils.dart'; 154 import 'src/utils.dart';
156 part 'src/config.dart'; 155 part 'src/config.dart';
157 part 'src/test_case.dart'; 156 part 'src/test_case.dart';
158 157
159 Configuration _config; 158 Configuration _config;
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 864
866 if (!formatStacks) return trace; 865 if (!formatStacks) return trace;
867 866
868 // Format the stack trace by removing everything above TestCase._runTest, 867 // Format the stack trace by removing everything above TestCase._runTest,
869 // which is usually going to be irrelevant. Also fold together unittest and 868 // which is usually going to be irrelevant. Also fold together unittest and
870 // core library calls so only the function the user called is visible. 869 // core library calls so only the function the user called is visible.
871 return new Trace(trace.frames.takeWhile((frame) { 870 return new Trace(trace.frames.takeWhile((frame) {
872 return frame.package != 'unittest' || frame.member != 'TestCase._runTest'; 871 return frame.package != 'unittest' || frame.member != 'TestCase._runTest';
873 })).terse.foldFrames((frame) => frame.package == 'unittest' || frame.isCore); 872 })).terse.foldFrames((frame) => frame.package == 'unittest' || frame.isCore);
874 } 873 }
OLDNEW
« no previous file with comments | « pkg/unittest/lib/mirror_matchers.dart ('k') | pkg/unittest/test/matchers_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698