Index: tests/standalone/io/secure_socket_argument_test.dart |
diff --git a/tests/standalone/io/secure_socket_argument_test.dart b/tests/standalone/io/secure_socket_argument_test.dart |
index 5e59c0611f1f4e4272758d639be3c6f151f50459..6caf84ef2a78039c0ec1797157d670f1ea6f7d03 100644 |
--- a/tests/standalone/io/secure_socket_argument_test.dart |
+++ b/tests/standalone/io/secure_socket_argument_test.dart |
@@ -5,9 +5,23 @@ |
import "package:expect/expect.dart"; |
import "dart:io"; |
-void main() { |
+void testInitialzeArguments() { |
Expect.throws(() => SecureSocket.initialize(database: "foo.txt")); |
Expect.throws(() => SecureSocket.initialize(password: false)); |
Expect.throws(() => SecureSocket.initialize(useBuiltinRoots: 7)); |
+} |
+ |
+void testServerSocketArguments() { |
+ Expect.throws(() => |
+ SecureServerSocket.bind(SERVER_ADDRESS, 65536, 5, CERTIFICATE)); |
+ Expect.throws(() => |
+ SecureServerSocket.bind(SERVER_ADDRESS, -1, CERTIFICATE)); |
+ Expect.throws(() => |
+ SecureServerSocket.bind(SERVER_ADDRESS, 0, -1, CERTIFICATE)); |
+} |
+ |
+void main() { |
+ testInitialzeArguments(); |
SecureSocket.initialize(); |
+ testServerSocketArguments(); |
} |