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; |