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

Unified Diff: tests/standalone/io/raw_socket_test.dart

Issue 12328104: Change new List(n) to return fixed length list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. Created 7 years, 10 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
Index: tests/standalone/io/raw_socket_test.dart
diff --git a/tests/standalone/io/raw_socket_test.dart b/tests/standalone/io/raw_socket_test.dart
index d14dc9e7d9a5429ea3c5c8b11f8b93a278de1c69..4bc760e08f762c9ea5c574538d57c35cf1408f54 100644
--- a/tests/standalone/io/raw_socket_test.dart
+++ b/tests/standalone/io/raw_socket_test.dart
@@ -137,7 +137,7 @@ void testSimpleReadWrite() {
const messageSize = 1000;
List<int> createTestData() {
- List<int> data = new List.fixedLength(messageSize);
+ List<int> data = new List<int>(messageSize);
for (int i = 0; i < messageSize; i++) {
data[i] = i & 0xff;
}
@@ -156,7 +156,7 @@ void testSimpleReadWrite() {
server.listen((client) {
int bytesRead = 0;
int bytesWritten = 0;
- List<int> data = new List.fixedLength(messageSize);
+ List<int> data = new List<int>(messageSize);
client.writeEventsEnabled = false;
client.listen((event) {
@@ -212,7 +212,7 @@ void testSimpleReadWrite() {
if (bytesWritten < data.length) {
socket.writeEventsEnabled = true;
} else {
- data = new List.fixedLength(messageSize);
+ data = new List<int>(messageSize);
}
break;
case RawSocketEvent.READ_CLOSED:
@@ -332,7 +332,7 @@ testPauseSocket() {
RawServerSocket.bind().then((server) {
Expect.isTrue(server.port > 0);
server.listen((client) {
- List<int> data = new List.fixedLength(messageSize, fill: 0);
+ List<int> data = new List<int>.filled(messageSize, 0);
writeSubscription = client.listen((event) {
switch (event) {
case RawSocketEvent.READ:

Powered by Google App Engine
This is Rietveld 408576698