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

Unified Diff: tests/standalone/io/http_server_socket_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/standalone/io/http_parser_test.dart ('k') | tests/standalone/io/mime_multipart_parser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_server_socket_test.dart
diff --git a/tests/standalone/io/http_server_socket_test.dart b/tests/standalone/io/http_server_socket_test.dart
index cbeaf8a32b6e03091351e89597d767e651b322ec..8644e7c172edd0f28b536a2e72450ea3694234d0 100644
--- a/tests/standalone/io/http_server_socket_test.dart
+++ b/tests/standalone/io/http_server_socket_test.dart
@@ -4,6 +4,7 @@
#import("dart:io");
#import("dart:isolate");
+#import("dart:math");
class ExpectedDataOutputStream implements OutputStream {
ExpectedDataOutputStream(List<int> this._data,
@@ -62,7 +63,7 @@ class SocketMock implements Socket {
List<int> expected,
int cutoff,
bool closeAsError) :
- _hashCode = (Math.random() * (1 << 32)).toInt(),
+ _hashCode = new Random().nextInt(1<< 32),
_read = [] {
_outputStream =
new ExpectedDataOutputStream(expected, cutoff, closeAsError, this);
@@ -84,7 +85,7 @@ class SocketMock implements Socket {
}
int readList(List<int> buffer, int offset, int count) {
- int max = Math.min(count, _data.length);
+ int max = min(count, _data.length);
buffer.setRange(offset, max, _data);
_data = _data.getRange(max, _data.length - max);
return max;
« no previous file with comments | « tests/standalone/io/http_parser_test.dart ('k') | tests/standalone/io/mime_multipart_parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698