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

Side by Side Diff: tests/lib/async/stream_last_where_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library stream_controller_async_test; 5 library stream_controller_async_test;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import 'dart:async'; 8 import 'dart:async';
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 import 'event_helper.dart'; 10 import 'event_helper.dart';
11 import 'stream_state_helper.dart'; 11 import 'stream_state_helper.dart';
12 12
13 class A { const A(); } 13 class A {
14 class B extends A { const B(); } 14 const A();
15 }
16
17 class B extends A {
18 const B();
19 }
15 20
16 main() { 21 main() {
17 Events sentEvents = new Events()..close(); 22 Events sentEvents = new Events()..close();
18 23
19 // Make sure that lastWhere allows to return instances of types that are 24 // Make sure that lastWhere allows to return instances of types that are
20 // different than the generic type of the stream. 25 // different than the generic type of the stream.
21 test("lastWhere with super class", () { 26 test("lastWhere with super class", () {
22 StreamController c = new StreamController<B>(); 27 StreamController c = new StreamController<B>();
23 Future f = c.stream.lastWhere((x) => false, defaultValue: () => const A()); 28 Future f = c.stream.lastWhere((x) => false, defaultValue: () => const A());
24 f.then(expectAsync((v) { Expect.equals(const A(), v); })); 29 f.then(expectAsync((v) {
30 Expect.equals(const A(), v);
31 }));
25 sentEvents.replay(c); 32 sentEvents.replay(c);
26 }); 33 });
27 } 34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698