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

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

Issue 18496011: Clean up dart:io warnings/errors found by analyzer tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | « sdk/lib/io/string_transformer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/file_fuzz_test.dart
diff --git a/tests/standalone/io/file_fuzz_test.dart b/tests/standalone/io/file_fuzz_test.dart
index 81d9d4e289b24f817efba4b2dd98b9d087405766..f90030ed0ecf4f6a359797f7e2d9a61c30eb4b11 100644
--- a/tests/standalone/io/file_fuzz_test.dart
+++ b/tests/standalone/io/file_fuzz_test.dart
@@ -21,15 +21,15 @@ fuzzSyncMethods() {
doItSync(f.lengthSync);
doItSync(f.modifiedSync);
doItSync(f.fullPathSync);
- doItSync(() => f.openRead().listen(() {}, onError: (e) {}));
+ doItSync(() => f.openRead().listen((_) {}, onError: (e) {}));
doItSync(f.readAsBytesSync);
doItSync(f.readAsStringSync);
doItSync(f.readAsLinesSync);
typeMapping.forEach((k2, v2) {
doItSync(() => f.openSync(mode: v2));
doItSync(() => f.openWrite(mode: v2));
- doItSync(() => f.readAsStringSync(v2));
- doItSync(() => f.readAsLinesSync(v2));
+ doItSync(() => f.readAsStringSync(encoding: v2));
+ doItSync(() => f.readAsLinesSync(encoding: v2));
});
});
});
@@ -52,9 +52,9 @@ fuzzAsyncMethods() {
futures.add(doItAsync(f.readAsLines));
futures.add(doItAsync(f.readAsString));
typeMapping.forEach((k2, v2) {
- futures.add(doItAsync(() => f.open(v2)));
- futures.add(doItAsync(() => f.readAsString(v2)));
- futures.add(doItAsync(() => f.readAsLines(v2)));
+ futures.add(doItAsync(() => f.open(mode: v2)));
+ futures.add(doItAsync(() => f.readAsString(encoding: v2)));
+ futures.add(doItAsync(() => f.readAsLines(encoding: v2)));
});
});
});
@@ -76,7 +76,7 @@ fuzzSyncRandomAccessMethods() {
doItSync(() => opened.writeByteSync(v));
});
for (var p in typePermutations(2)) {
- doItSync(() => opened.writeStringSync(p[0], p[1]));
+ doItSync(() => opened.writeStringSync(p[0], encoding: p[1]));
}
for (var p in typePermutations(3)) {
doItSync(() => opened.readIntoSync(p[0], p[1], p[2]));
@@ -104,7 +104,7 @@ fuzzAsyncRandomAccessMethods() {
futures.add(doItAsync(() => opened.writeByte(v)));
});
for (var p in typePermutations(2)) {
- futures.add(doItAsync(() => opened.writeString(p[0], p[1])));
+ futures.add(doItAsync(() => opened.writeString(p[0], encoding: p[1])));
}
for (var p in typePermutations(3)) {
futures.add(doItAsync(() => opened.readInto(p[0], p[1], p[2])));
« no previous file with comments | « sdk/lib/io/string_transformer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698