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

Unified Diff: tests/lib_2/async/first_regression_test.dart

Issue 2999943002: Migrated test block 168 to Dart 2.0. (Closed)
Patch Set: Fixed package:test crash related issues, addressed Bob's comments. Created 3 years, 4 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 | « tests/lib_2/async/event_helper.dart ('k') | tests/lib_2/async/future_constructor2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib_2/async/first_regression_test.dart
diff --git a/tests/lib_strong/async/first_regression_test.dart b/tests/lib_2/async/first_regression_test.dart
similarity index 66%
rename from tests/lib_strong/async/first_regression_test.dart
rename to tests/lib_2/async/first_regression_test.dart
index 127b64498bed76fe1da01f524089271edf555559..7efcb81e1c9c6b6a3232b099d76a553d565aef8b 100644
--- a/tests/lib_strong/async/first_regression_test.dart
+++ b/tests/lib_2/async/first_regression_test.dart
@@ -7,7 +7,6 @@
library first_regression_test;
import 'dart:async';
-import 'package:unittest/unittest.dart';
class DoubleTransformer<T> implements StreamTransformer<T, T> {
Stream<T> bind(Stream<T> stream) {
@@ -20,13 +19,9 @@ class DoubleTransformer<T> implements StreamTransformer<T, T> {
}
}
-main() {
- test("Double event before first", () {
- // This should not crash. Did crash by trying to complete future more
- // than once.
- new Stream.fromIterable([1, 2])
- .transform(new DoubleTransformer())
- .first
- .then(expectAsync((e) {}));
- });
+main() async {
+ // This should not crash. Did crash by trying to complete future more
+ // than once.
+ await (new Stream.fromIterable([1, 2]).transform(new DoubleTransformer()))
+ .first;
}
« no previous file with comments | « tests/lib_2/async/event_helper.dart ('k') | tests/lib_2/async/future_constructor2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698