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

Side by Side Diff: tests/html/streams_test.dart

Issue 13548002: Add Iterable.fold (and Stream.fold) which replace `reduce`. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 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 | Annotate | Revision Log
OLDNEW
1 library streams_test; 1 library streams_test;
2 import '../../pkg/unittest/lib/unittest.dart'; 2 import '../../pkg/unittest/lib/unittest.dart';
3 import '../../pkg/unittest/lib/html_config.dart'; 3 import '../../pkg/unittest/lib/html_config.dart';
4 import 'dart:async'; 4 import 'dart:async';
5 import 'dart:html'; 5 import 'dart:html';
6 6
7 class StreamHelper { 7 class StreamHelper {
8 var _a; 8 var _a;
9 StreamHelper() { 9 StreamHelper() {
10 _a = new TextInputElement(); 10 _a = new TextInputElement();
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 }); 187 });
188 188
189 test('map', () { 189 test('map', () {
190 stream.map((_) => null).listen((_) {}); 190 stream.map((_) => null).listen((_) {});
191 }); 191 });
192 192
193 test('reduce', () { 193 test('reduce', () {
194 stream.reduce(null, (a, b) => null).then((_) {}); 194 stream.reduce(null, (a, b) => null).then((_) {});
195 }); 195 });
196 196
197 test('fold', () {
198 stream.fold(null, (a, b) => null).then((_) {});
199 });
200
197 test('contains', () { 201 test('contains', () {
198 stream.contains((_) => true).then((_) {}); 202 stream.contains((_) => true).then((_) {});
199 }); 203 });
200 204
201 test('every', () { 205 test('every', () {
202 stream.every((_) => true).then((_) {}); 206 stream.every((_) => true).then((_) {});
203 }); 207 });
204 208
205 test('any', () { 209 test('any', () {
206 stream.any((_) => true).then((_) {}); 210 stream.any((_) => true).then((_) {});
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 }); 275 });
272 276
273 test('singleWhere', () { 277 test('singleWhere', () {
274 stream.singleWhere((_) => true).then((_) {}); 278 stream.singleWhere((_) => true).then((_) {});
275 }); 279 });
276 280
277 test('elementAt', () { 281 test('elementAt', () {
278 stream.elementAt(0).then((_) {}); 282 stream.elementAt(0).then((_) {});
279 }); 283 });
280 } 284 }
OLDNEW
« no previous file with comments | « tests/corelib/list_reversed_test.dart ('k') | tests/lib/async/stream_controller_async_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698