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

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

Issue 947133002: Add detailed error message to socket_source_address_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/socket_source_address_test.dart
diff --git a/tests/standalone/io/socket_source_address_test.dart b/tests/standalone/io/socket_source_address_test.dart
index a341568f299de79e20191a107f17da17438ee29f..4b95433e2bc4350dcc02fe14dc5c4c038a9dac4e 100644
--- a/tests/standalone/io/socket_source_address_test.dart
+++ b/tests/standalone/io/socket_source_address_test.dart
@@ -23,28 +23,30 @@ Future throws(Function f, Function check) async {
}
Future testArguments(connectFunction) async {
+ var sourceAddress;
asyncStart();
var server = await ServerSocket.bind(InternetAddress.LOOPBACK_IP_V4, 0);
- server.listen((_) { throw 'Connection unexpected'; },
- onDone: () => asyncEnd());
+ server.listen((_) {
+ throw 'Unexpected connection from address $sourceAddress';
+ }, onDone: () => asyncEnd());
asyncStart();
// Illegal type for sourceAddress.
- for (var sourceAddress in ['www.google.com', 'abc']) {
+ for (sourceAddress in ['www.google.com', 'abc']) {
await throws(() => connectFunction('127.0.0.1',
server.port,
sourceAddress: sourceAddress),
(e) => e is ArgumentError);
}
// Unsupported local address.
- for (var sourceAddress in ['8.8.8.8', new InternetAddress('8.8.8.8')]) {
+ for (sourceAddress in ['8.8.8.8', new InternetAddress('8.8.8.8')]) {
await throws(() => connectFunction('127.0.0.1',
server.port,
sourceAddress: sourceAddress),
(e) => e is SocketException);
}
// Address family mismatch.
- for (var sourceAddress in ['::1', InternetAddress.LOOPBACK_IP_V6]) {
+ for (sourceAddress in ['::1', InternetAddress.LOOPBACK_IP_V6]) {
await throws(() => connectFunction('127.0.0.1',
server.port,
sourceAddress: sourceAddress),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698