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

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

Issue 3001793002: Migrated test block 171 to Dart 2.0. (Closed)
Patch Set: Addressed Bob's comment 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/slow_consumer2_test.dart ('k') | tests/lib_2/async/slow_consumer_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib_2/async/slow_consumer3_test.dart
diff --git a/tests/lib/async/slow_consumer3_test.dart b/tests/lib_2/async/slow_consumer3_test.dart
similarity index 94%
rename from tests/lib/async/slow_consumer3_test.dart
rename to tests/lib_2/async/slow_consumer3_test.dart
index 96ff202fbdd01870504d7e4f03c89e146d40beac..ae83f204e5414a6880ab9e87361b9b33a062bce8 100644
--- a/tests/lib/async/slow_consumer3_test.dart
+++ b/tests/lib_2/async/slow_consumer3_test.dart
@@ -14,11 +14,11 @@ const int KB = 1024;
const int MB = KB * KB;
const int GB = KB * KB * KB;
-class SlowConsumer extends StreamConsumer {
+class SlowConsumer extends StreamConsumer<List<int>> {
int receivedCount = 0;
final int bytesPerSecond;
final int bufferSize;
- final List bufferedData = [];
+ final List<int> bufferedData = [];
int usedBufferSize = 0;
int finalCount;
@@ -60,7 +60,7 @@ class SlowConsumer extends StreamConsumer {
}
}
-Stream<List> dataGenerator(int bytesTotal, int chunkSize) {
+Stream<List<int>> dataGenerator(int bytesTotal, int chunkSize) {
int chunks = bytesTotal ~/ chunkSize;
return new Stream.fromIterable(new Iterable.generate(chunks, (_) {
// This assumes one byte per entry. In practice it will be more.
« no previous file with comments | « tests/lib_2/async/slow_consumer2_test.dart ('k') | tests/lib_2/async/slow_consumer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698