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

Unified Diff: corelib/src/expect.dart

Issue 10829459: Deprecate Math object in corelib in favor of dart:math library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « corelib/src/corelib_sources.gypi ('k') | corelib/src/implementation/date.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: corelib/src/expect.dart
diff --git a/corelib/src/expect.dart b/corelib/src/expect.dart
index 0af6ab4100bc9a68cad6e97fa1adce43ce6327d4..6e073812791aa7608cd2b93300a57aa640d58b5d 100644
--- a/corelib/src/expect.dart
+++ b/corelib/src/expect.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -82,7 +82,7 @@ class Expect {
[num tolerance = null,
String reason = null]) {
if (tolerance === null) {
- tolerance = (expected / Math.pow(10.0, 4.0)).abs();
+ tolerance = (expected / pow(10.0, 4.0)).abs();
}
// Note: use !( <= ) rather than > so we fail on NaNs
if ((expected - actual).abs() <= tolerance) return;
@@ -107,7 +107,7 @@ class Expect {
*/
static void listEquals(List expected, List actual, [String reason = null]) {
String msg = _getMessage(reason);
- int n = Math.min(expected.length, actual.length);
+ int n = min(expected.length, actual.length);
for (int i = 0; i < n; i++) {
if (expected[i] != actual[i]) {
_fail('Expect.listEquals(at index $i, '
« no previous file with comments | « corelib/src/corelib_sources.gypi ('k') | corelib/src/implementation/date.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698