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

Unified Diff: tests/corelib/stopwatch_test.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 | « tests/corelib/min_max_test.dart ('k') | tests/isolate/mandel_isolate_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/stopwatch_test.dart
diff --git a/tests/corelib/stopwatch_test.dart b/tests/corelib/stopwatch_test.dart
index af651083511ba53674d3872d77100db6731087b5..e942ea8ecf7556a9c9caa751e674dfab6b9fafe3 100644
--- a/tests/corelib/stopwatch_test.dart
+++ b/tests/corelib/stopwatch_test.dart
@@ -1,14 +1,17 @@
-// 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.
// Dart test program for testing stopwatch support.
+#library('stopwatch_test');
+#import('dart:math');
+
class StopwatchTest {
static bool checkTicking(Stopwatch sw) {
sw.start();
for (int i = 0; i < 10000; i++) {
- Math.parseInt(i.toString());
+ parseInt(i.toString());
if (sw.elapsed() > 0) {
break;
}
@@ -24,7 +27,7 @@ class StopwatchTest {
sw2.start();
int sw2LastElapsed = 0;
for (int i = 0; i < 100000; i++) {
- Math.parseInt(i.toString());
+ parseInt(i.toString());
int v2 = sw.elapsed();
if (v1 != v2) {
return false;
@@ -46,7 +49,7 @@ class StopwatchTest {
Stopwatch sw = new Stopwatch();
sw.start();
for (int i = 0; i < 100000; i++) {
- Math.parseInt(i.toString());
+ parseInt(i.toString());
if (sw.elapsed() > 0) {
break;
}
@@ -55,7 +58,7 @@ class StopwatchTest {
int initial = sw.elapsed();
sw.start();
for (int i = 0; i < 100000; i++) {
- Math.parseInt(i.toString());
+ parseInt(i.toString());
if (sw.elapsed() > initial) {
break;
}
@@ -68,7 +71,7 @@ class StopwatchTest {
Stopwatch sw = new Stopwatch();
sw.start();
for (int i = 0; i < 100000; i++) {
- Math.parseInt(i.toString());
+ parseInt(i.toString());
if (sw.elapsed() > 0) {
break;
}
@@ -78,14 +81,14 @@ class StopwatchTest {
Expect.equals(0, sw.elapsed());
sw.start();
for (int i = 0; i < 100000; i++) {
- Math.parseInt(i.toString());
+ parseInt(i.toString());
if (sw.elapsed() > 0) {
break;
}
}
sw.reset();
for (int i = 0; i < 100000; i++) {
- Math.parseInt(i.toString());
+ parseInt(i.toString());
if (sw.elapsed() > 0) {
break;
}
« no previous file with comments | « tests/corelib/min_max_test.dart ('k') | tests/isolate/mandel_isolate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698