Index: tests/standalone/io/raw_secure_server_socket_test.dart |
diff --git a/tests/standalone/io/raw_secure_server_socket_test.dart b/tests/standalone/io/raw_secure_server_socket_test.dart |
index 3b3079c830f28e183194f1dc74042ccbd0c4d7ce..058b6c234da7f7a224c1bce87124a07aaa1ad132 100644 |
--- a/tests/standalone/io/raw_secure_server_socket_test.dart |
+++ b/tests/standalone/io/raw_secure_server_socket_test.dart |
@@ -173,7 +173,7 @@ void testSimpleReadWrite() { |
Expect.isTrue(client.available() > 0); |
var buffer = client.read(); |
if (buffer != null) { |
- data.setRange(bytesRead, buffer.length, buffer); |
+ data.setRange(bytesRead, bytesRead + buffer.length, buffer); |
bytesRead += buffer.length; |
for (var value in buffer) { |
Expect.isTrue(value is int); |
@@ -220,7 +220,8 @@ void testSimpleReadWrite() { |
Expect.isTrue(socket.available() > 0); |
var buffer = socket.read(); |
if (buffer != null) { |
- dataReceived.setRange(bytesRead, buffer.length, buffer); |
+ int endIndex = bytesRead + buffer.length; |
+ dataReceived.setRange(bytesRead, endIndex, buffer); |
bytesRead += buffer.length; |
} |
break; |