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

Side by Side Diff: tests/lib/convert/chunked_conversion1_test.dart

Issue 2529393002: Make core libraries use generic method syntax. (Closed)
Patch Set: Merge to head Created 4 years 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
« sdk/lib/internal/sort.dart ('K') | « sdk/lib/math/rectangle.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
11 11
12 abstract class MyChunkedIntSink extends ChunkedConversionSink<int> { 12 abstract class MyChunkedIntSink extends ChunkedConversionSink<List<int>> {
13 MyChunkedIntSink(); 13 MyChunkedIntSink();
14 factory MyChunkedIntSink.from(sink) = IntAdapterSink; 14 factory MyChunkedIntSink.from(sink) = IntAdapterSink;
15 factory MyChunkedIntSink.withCallback(callback) { 15 factory MyChunkedIntSink.withCallback(callback) {
16 var sink = new ChunkedConversionSink.withCallback(callback); 16 var sink = new ChunkedConversionSink.withCallback(callback);
17 return new MyChunkedIntSink.from(sink); 17 return new MyChunkedIntSink.from(sink);
18 } 18 }
19 19
20 add(int i); 20 add(int i);
21 close(); 21 close();
22 22
(...skipping 222 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
« sdk/lib/internal/sort.dart ('K') | « sdk/lib/math/rectangle.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698