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

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

Issue 11275054: Modified unittest to use new argument syntax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 * To import this library, specify the relative path to 8 * To import this library, specify the relative path to
9 * pkg/unittest/unittest.dart. 9 * pkg/unittest/unittest.dart.
10 * 10 *
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 * guardAsync(() { 127 * guardAsync(() {
128 * int x = 2 + 3; 128 * int x = 2 + 3;
129 * expect(x, equals(5)); 129 * expect(x, equals(5));
130 * }); 130 * });
131 * // indicate that the asynchronous callback was invoked. 131 * // indicate that the asynchronous callback was invoked.
132 * async.complete(); 132 * async.complete();
133 * }), 0); 133 * }), 0);
134 * }); 134 * });
135 * 135 *
136 */ 136 */
137 #library('unittest'); 137 library unittest;
138 138
139 #import('dart:isolate'); 139 import 'dart:isolate';
140 140
141 #source('collection_matchers.dart'); 141 part 'collection_matchers.dart';
142 #source('config.dart'); 142 part 'config.dart';
143 #source('core_matchers.dart'); 143 part 'core_matchers.dart';
144 #source('description.dart'); 144 part 'description.dart';
145 #source('expect.dart'); 145 part 'expect.dart';
146 #source('future_matchers.dart'); 146 part 'future_matchers.dart';
147 #source('interfaces.dart'); 147 part 'interfaces.dart';
148 #source('map_matchers.dart'); 148 part 'map_matchers.dart';
149 #source('matcher.dart'); 149 part 'matcher.dart';
150 #source('mock.dart'); 150 part 'mock.dart';
151 #source('numeric_matchers.dart'); 151 part 'numeric_matchers.dart';
152 #source('operator_matchers.dart'); 152 part 'operator_matchers.dart';
153 #source('string_matchers.dart'); 153 part 'string_matchers.dart';
154 #source('test_case.dart'); 154 part 'test_case.dart';
155 155
156 /** [Configuration] used by the unittest library. */ 156 /** [Configuration] used by the unittest library. */
157 Configuration _config = null; 157 Configuration _config = null;
158 158
159 Configuration get config => _config; 159 Configuration get config => _config;
160 160
161 /** 161 /**
162 * Set the [Configuration] used by the unittest library. Returns any 162 * Set the [Configuration] used by the unittest library. Returns any
163 * previous configuration. 163 * previous configuration.
164 * TODO: consider deprecating in favor of a setter now we have a getter. 164 * TODO: consider deprecating in favor of a setter now we have a getter.
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 } 886 }
887 887
888 /** Enable a test by ID. */ 888 /** Enable a test by ID. */
889 void enableTest(int testId) => _setTestEnabledState(testId, true); 889 void enableTest(int testId) => _setTestEnabledState(testId, true);
890 890
891 /** Disable a test by ID. */ 891 /** Disable a test by ID. */
892 void disableTest(int testId) => _setTestEnabledState(testId, false); 892 void disableTest(int testId) => _setTestEnabledState(testId, false);
893 893
894 /** Signature for a test function. */ 894 /** Signature for a test function. */
895 typedef void TestFunction(); 895 typedef void TestFunction();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698