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

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

Issue 2220983002: Fix return type for JoinMulticast. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « runtime/bin/socket_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/raw_datagram_socket_test.dart
diff --git a/tests/standalone/io/raw_datagram_socket_test.dart b/tests/standalone/io/raw_datagram_socket_test.dart
index 20d841e19515068223f8b0a0636182137eb9a533..f3168fb4f4b4e815a7dd9810c1acc24924a57322 100644
--- a/tests/standalone/io/raw_datagram_socket_test.dart
+++ b/tests/standalone/io/raw_datagram_socket_test.dart
@@ -195,6 +195,25 @@ testLoopbackMulticast() {
}
}
+testLoopbackMulticastError() {
+ var bindAddress = InternetAddress.ANY_IP_V4;
+ var multicastAddress = new InternetAddress("228.0.0.4");
+ asyncStart();
+ Future.wait([
+ RawDatagramSocket.bind(bindAddress, 0, reuseAddress: false),
+ RawDatagramSocket.bind(bindAddress, 0, reuseAddress: false)])
+ .then((values) {
+ var sender = values[0];
+ var receiver = values[1];
+ Expect.throws(
+ () { sender.joinMulticast(new InternetAddress("127.0.0.1")); },
+ (e) => e is! TypeError);
+ sender.close();
+ receiver.close();
+ asyncEnd();
+ });
+}
+
testSendReceive(InternetAddress bindAddress, int dataSize) {
asyncStart();
@@ -320,6 +339,7 @@ main() {
}
testBroadcast();
testLoopbackMulticast();
+ testLoopbackMulticastError();
testSendReceive(InternetAddress.LOOPBACK_IP_V4, 1000);
testSendReceive(InternetAddress.LOOPBACK_IP_V6, 1000);
if (!Platform.isMacOS) {
« no previous file with comments | « runtime/bin/socket_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698