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

Side by Side Diff: sdk/lib/core/expect.dart

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
OLDNEW
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 part of dart.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * Expect is used for tests that do not want to make use of the 8 * Expect is used for tests that do not want to make use of the
9 * Dart unit test library - for example, the core language tests. 9 * Dart unit test library - for example, the core language tests.
10 * Third parties are discouraged from using this, and should use 10 * Third parties are discouraged from using this, and should use
11 * the expect() function in the unit test library instead for 11 * the expect() function in the unit test library instead for
12 * test assertions. 12 * test assertions.
13 */ 13 */
14 class Expect { 14 class ExpectOld {
15 /** 15 /**
16 * Checks whether the expected and actual values are equal (using `==`). 16 * Checks whether the expected and actual values are equal (using `==`).
17 */ 17 */
18 static void equals(var expected, var actual, [String reason = null]) { 18 static void equals(var expected, var actual, [String reason = null]) {
19 if (expected == actual) return; 19 if (expected == actual) return;
20 String msg = _getMessage(reason); 20 String msg = _getMessage(reason);
21 _fail("Expect.equals(expected: <$expected>, actual: <$actual>$msg) fails."); 21 _fail("Expect.equals(expected: <$expected>, actual: <$actual>$msg) fails.");
22 } 22 }
23 23
24 /** 24 /**
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 290
291 bool _identical(a, b) => identical(a, b); 291 bool _identical(a, b) => identical(a, b);
292 292
293 typedef bool _CheckExceptionFn(exception); 293 typedef bool _CheckExceptionFn(exception);
294 294
295 class ExpectException implements Exception { 295 class ExpectException implements Exception {
296 ExpectException(this.message); 296 ExpectException(this.message);
297 String toString() => message; 297 String toString() => message;
298 String message; 298 String message;
299 } 299 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698