Index: tests/standalone/io/socket_ipv6_test.dart |
diff --git a/tests/standalone/io/socket_ipv6_test.dart b/tests/standalone/io/socket_ipv6_test.dart |
index bded728d20319557ebc4ec702987378f0740aa90..e3a2e9120e8417a862ce8ca31cabff3a9bb45194 100644 |
--- a/tests/standalone/io/socket_ipv6_test.dart |
+++ b/tests/standalone/io/socket_ipv6_test.dart |
@@ -5,6 +5,7 @@ |
import 'dart:io'; |
import "package:async_helper/async_helper.dart"; |
+import "package:expect/expect.dart"; |
const ANY = InternetAddressType.ANY; |
@@ -13,6 +14,8 @@ void testIPv6toIPv6() { |
InternetAddress.lookup("::0", type: ANY).then((serverAddr) { |
InternetAddress.lookup("::1", type: ANY).then((clientAddr) { |
ServerSocket.bind(serverAddr.first, 0).then((server) { |
+ Expect.equals('::0', server.address.host); |
+ Expect.equals('::', server.address.address); |
server.listen((socket) { |
socket.destroy(); |
server.close(); |
@@ -30,6 +33,8 @@ void testIPv4toIPv6() { |
asyncStart(); |
InternetAddress.lookup("::0", type: ANY).then((serverAddr) { |
ServerSocket.bind(serverAddr.first, 0).then((server) { |
+ Expect.equals('::0', server.address.host); |
+ Expect.equals('::', server.address.address); |
server.listen((socket) { |
socket.destroy(); |
server.close(); |
@@ -46,6 +51,8 @@ void testIPv6toIPv4() { |
asyncStart(); |
InternetAddress.lookup("::1", type: ANY).then((clientAddr) { |
ServerSocket.bind("127.0.0.1", 0).then((server) { |
+ Expect.equals('127.0.0.1', server.address.host); |
+ Expect.equals('127.0.0.1', server.address.address); |
server.listen((socket) { |
throw "Unexpected socket"; |
}); |
@@ -60,6 +67,8 @@ void testIPv6toIPv4() { |
void testIPv4toIPv4() { |
asyncStart(); |
ServerSocket.bind("127.0.0.1", 0).then((server) { |
+ Expect.equals('127.0.0.1', server.address.host); |
+ Expect.equals('127.0.0.1', server.address.address); |
server.listen((socket) { |
socket.destroy(); |
server.close(); |
@@ -87,7 +96,7 @@ void testIPv6Lookup() { |
void testIPv4Lookup() { |
asyncStart(); |
InternetAddress.lookup("127.0.0.1").then((list) { |
- if (list.length < 0) throw "no addresse"; |
+ if (list.length < 0) throw "no address"; |
for (var entry in list) { |
if (entry.type != InternetAddressType.IP_V4) { |
throw "Wrong IP type"; |
@@ -104,7 +113,7 @@ void testIPv4toIPv6_IPV6Only() { |
ServerSocket.bind(serverAddr.first, 0, v6Only: true) |
.then((server) { |
server.listen((socket) { |
- throw "Unexpcted socket"; |
+ throw "Unexpected socket"; |
}); |
Socket.connect("127.0.0.1", server.port).catchError((error) { |
server.close(); |