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/lib/convert/chunked_conversion1_test.dart

Issue 54723007: Fix warnings in library-tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 7 years, 1 month 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 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import 'dart:convert'; 5 import 'dart:convert';
6 6
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 8
9 // This test implements a new special interface that can be used to 9 // This test implements a new special interface that can be used to
10 // send data more efficiently between two converters. 10 // send data more efficiently between two converters.
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 class IntAdapterSink extends MyChunkedIntSink { 27 class IntAdapterSink extends MyChunkedIntSink {
28 final _sink; 28 final _sink;
29 IntAdapterSink(this._sink); 29 IntAdapterSink(this._sink);
30 add(o) => _sink.add(o); 30 add(o) => _sink.add(o);
31 close() => _sink.close(); 31 close() => _sink.close();
32 specialI(o) => add(o); 32 specialI(o) => add(o);
33 } 33 }
34 34
35 class MyChunkedBoolSink extends ChunkedConversionSink<bool> { 35 abstract class MyChunkedBoolSink extends ChunkedConversionSink<bool> {
36 MyChunkedBoolSink(); 36 MyChunkedBoolSink();
37 factory MyChunkedBoolSink.from(sink) = BoolAdapterSink; 37 factory MyChunkedBoolSink.from(sink) = BoolAdapterSink;
38 factory MyChunkedBoolSink.withCallback(callback) { 38 factory MyChunkedBoolSink.withCallback(callback) {
39 var sink = new ChunkedConversionSink.withCallback(callback); 39 var sink = new ChunkedConversionSink.withCallback(callback);
40 return new MyChunkedBoolSink.from(sink); 40 return new MyChunkedBoolSink.from(sink);
41 } 41 }
42 42
43 add(bool b); 43 add(bool b);
44 close(); 44 close();
45 45
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 intSink.add(-3); 245 intSink.add(-3);
246 intSink.add(3); 246 intSink.add(3);
247 intSink.close(); 247 intSink.close();
248 Expect.isTrue(hasExecuted); 248 Expect.isTrue(hasExecuted);
249 Expect.equals(0, specialBCounter); 249 Expect.equals(0, specialBCounter);
250 specialBCounter = 0; 250 specialBCounter = 0;
251 Expect.equals(1, specialICounter); 251 Expect.equals(1, specialICounter);
252 specialICounter = 0; 252 specialICounter = 0;
253 hasExecuted = false; 253 hasExecuted = false;
254 } 254 }
OLDNEW
« no previous file with comments | « tests/lib/async/zone_debug_test.dart ('k') | tests/lib/convert/chunked_conversion_json_decode1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698