6f14d9678a
R=ager@google.com BUG= Review URL: https://codereview.chromium.org//13860006 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21919 260f80e4-7a28-3924-810f-c04153c831b5
28 lines
922 B
Dart
28 lines
922 B
Dart
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
import "package:expect/expect.dart";
|
|
import "dart:io";
|
|
|
|
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();
|
|
}
|