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

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

Issue 107113007: Fix checked mode errors in InternetAddress test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed analyzer expectation Created 7 years 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 | tests/standalone/io/internet_address_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/internet_address_invalid_arguments_test.dart
diff --git a/tests/standalone/io/print_sync_test.dart b/tests/standalone/io/internet_address_invalid_arguments_test.dart
similarity index 50%
copy from tests/standalone/io/print_sync_test.dart
copy to tests/standalone/io/internet_address_invalid_arguments_test.dart
index f709df606fab78cd9e389c85f924a00d5f28a2e1..59610e1f7ae7177582d766eacbceb55ecaf2046d 100644
--- a/tests/standalone/io/print_sync_test.dart
+++ b/tests/standalone/io/internet_address_invalid_arguments_test.dart
@@ -5,14 +5,17 @@
import 'dart:io';
import "package:expect/expect.dart";
-import "package:async_helper/async_helper.dart";
+
+void testIllegalArguments() {
+ var args = [
+ null, 1, 1.1, new Object(), [], {'a' : '127.0.0.1'},
+ "", "." , ":", ":::"];
+ args.forEach((arg) {
+ Expect.throws(() => new InternetAddress(arg),
+ (e) => e is ArgumentError);
+ });
+}
void main() {
- asyncStart();
- Process.run(Platform.executable,
- [Platform.script.resolve('print_sync_script.dart').toFilePath()])
- .then((out) {
- asyncEnd();
- Expect.equals(1002, out.stdout.split('\n').length);
- });
+ testIllegalArguments();
}
« no previous file with comments | « no previous file | tests/standalone/io/internet_address_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698