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

Unified Diff: test/result_test.dart

Issue 2161283002: Fix Dart 1.17 strong-mode warnings. (Closed) Base URL: git@github.com:dart-lang/async.git@master
Patch Set: Created 4 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 | « test/restartable_timer_test.dart ('k') | test/stream_completer_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/result_test.dart
diff --git a/test/result_test.dart b/test/result_test.dart
index 7af3fcf3b7fd847bf66a650e32ac82a75272da75..1c5f335b28042da081c0b6675d51b97fe5a6e026 100644
--- a/test/result_test.dart
+++ b/test/result_test.dart
@@ -57,7 +57,7 @@ void main() {
test("complete with value", () {
Result<int> result = new ValueResult<int>(42);
- Completer c = new Completer<int>();
+ var c = new Completer<int>();
c.future.then(expectAsync((int v) { expect(v, equals(42)); }),
onError: (e, s) { fail("Unexpected error"); });
result.complete(c);
@@ -65,7 +65,7 @@ void main() {
test("complete with error", () {
Result<bool> result = new ErrorResult("BAD", stack);
- Completer c = new Completer<bool>();
+ var c = new Completer<bool>();
c.future.then((bool v) { fail("Unexpected value $v"); },
onError: expectAsync((e, s) {
expect(e, equals("BAD"));
@@ -75,7 +75,7 @@ void main() {
});
test("add sink value", () {
- Result<int> result = new ValueResult<int>(42);
+ var result = new ValueResult<int>(42);
EventSink<int> sink = new TestSink(
onData: expectAsync((v) { expect(v, equals(42)); })
);
@@ -189,7 +189,7 @@ void main() {
test("release stream", () {
StreamController<Result<int>> c = new StreamController<Result<int>>();
Stream<int> stream = Result.releaseStream(c.stream);
- List events = [new Result<int>.value(42),
+ var events = [new Result<int>.value(42),
new Result<int>.error("BAD", stack),
new Result<int>.value(37)];
// Expect the data events, and an extra error event.
« no previous file with comments | « test/restartable_timer_test.dart ('k') | test/stream_completer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698