Chromium Code Reviews| Index: tests/standalone/io/security_context_argument_test.dart |
| diff --git a/tests/standalone/io/security_context_argument_test.dart b/tests/standalone/io/security_context_argument_test.dart |
| index 4309fb20974f94586aee688c450ca02efc481f74..4b53ed6d54554d4942a969597c4eb6fb8b53c953 100644 |
| --- a/tests/standalone/io/security_context_argument_test.dart |
| +++ b/tests/standalone/io/security_context_argument_test.dart |
| @@ -9,6 +9,7 @@ String localFile(path) => Platform.script.resolve(path).toFilePath(); |
| bool printException(e) { print(e); return true; } |
| bool argumentError(e) => e is ArgumentError; |
| +bool argumentTypeError(e) => e is ArgumentError || e is TypeError; |
|
Søren Gjesse
2015/10/05 13:25:36
Please call it argumentOrTypeError.
|
| bool tlsException(e) => e is TlsException; |
| void testUsePrivateKeyArguments() { |
| @@ -26,11 +27,11 @@ void testUsePrivateKeyArguments() { |
| Expect.throws(() => c.usePrivateKey( |
| localFile('certificates/server_key_oops.pem'), password: "dartdart"), |
| tlsException); |
| - Expect.throws(() => c.usePrivateKey(1), argumentError); |
| + Expect.throws(() => c.usePrivateKey(1), argumentTypeError); |
| Expect.throws(() => c.usePrivateKey(null), argumentError); |
| Expect.throws(() => c.usePrivateKey( |
| localFile('certificates/server_key_oops.pem'), password: 3), |
| - argumentError); |
| + argumentTypeError); |
| c.usePrivateKey( |
| localFile('certificates/server_key.pem'), password: "dartdart"); |
| } |