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

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

Issue 1389633003: Fixed checked-mode error in security_context_argument_test. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/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");
}
« 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