| Index: tests/standalone/io/raw_secure_server_socket_argument_test.dart
|
| diff --git a/tests/standalone/io/raw_secure_server_socket_argument_test.dart b/tests/standalone/io/raw_secure_server_socket_argument_test.dart
|
| index 029b75061ab3d1c52f39d4096ac59780b7572240..fde439da6bda681cb39430da2eef7e3ba0710bd7 100644
|
| --- a/tests/standalone/io/raw_secure_server_socket_argument_test.dart
|
| +++ b/tests/standalone/io/raw_secure_server_socket_argument_test.dart
|
| @@ -16,34 +16,30 @@ import "dart:isolate";
|
| const SERVER_ADDRESS = "127.0.0.1";
|
| const CERTIFICATE = "localhost_cert";
|
|
|
| -
|
| void testArguments() {
|
| bool isArgOrTypeError(e) => e is ArgumentError || e is TypeError;
|
| - Expect.throws(() =>
|
| - RawSecureServerSocket.bind(SERVER_ADDRESS, 65536, null),
|
| - isArgOrTypeError);
|
| - Expect.throws(() =>
|
| - RawSecureServerSocket.bind(SERVER_ADDRESS, -1, null),
|
| - isArgOrTypeError);
|
| - Expect.throws(() => RawSecureServerSocket.bind(SERVER_ADDRESS, 0,
|
| - null, backlog: -1),
|
| - isArgOrTypeError);
|
| - Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, null),
|
| - isArgOrTypeError);
|
| - Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, -1),
|
| - isArgOrTypeError);
|
| - Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 345656),
|
| - isArgOrTypeError);
|
| - Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 'hest'),
|
| - isArgOrTypeError);
|
| - Expect.throws(() => RawSecureSocket.connect(null, 0),
|
| - isArgOrTypeError);
|
| - Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 0,
|
| - onBadCertificate: 'hund'),
|
| - isArgOrTypeError);
|
| + Expect.throws(() => RawSecureServerSocket.bind(SERVER_ADDRESS, 65536, null),
|
| + isArgOrTypeError);
|
| + Expect.throws(() => RawSecureServerSocket.bind(SERVER_ADDRESS, -1, null),
|
| + isArgOrTypeError);
|
| + Expect.throws(
|
| + () => RawSecureServerSocket.bind(SERVER_ADDRESS, 0, null, backlog: -1),
|
| + isArgOrTypeError);
|
| + Expect.throws(
|
| + () => RawSecureSocket.connect(SERVER_ADDRESS, null), isArgOrTypeError);
|
| + Expect.throws(
|
| + () => RawSecureSocket.connect(SERVER_ADDRESS, -1), isArgOrTypeError);
|
| + Expect.throws(
|
| + () => RawSecureSocket.connect(SERVER_ADDRESS, 345656), isArgOrTypeError);
|
| + Expect.throws(
|
| + () => RawSecureSocket.connect(SERVER_ADDRESS, 'hest'), isArgOrTypeError);
|
| + Expect.throws(() => RawSecureSocket.connect(null, 0), isArgOrTypeError);
|
| + Expect.throws(
|
| + () =>
|
| + RawSecureSocket.connect(SERVER_ADDRESS, 0, onBadCertificate: 'hund'),
|
| + isArgOrTypeError);
|
| }
|
|
|
| -
|
| main() {
|
| testArguments();
|
| }
|
|
|