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

Unified Diff: tests/isolate/count_stream_test.dart

Issue 27215002: Very simple version of Isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 2 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/isolate/browser/typed_data_message_test.dart ('k') | tests/isolate/count_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/count_stream_test.dart
diff --git a/tests/isolate/count_stream_test.dart b/tests/isolate/count_stream_test.dart
deleted file mode 100644
index 50119ae47d48b53c1e2e089ead688b644ec2e2bb..0000000000000000000000000000000000000000
--- a/tests/isolate/count_stream_test.dart
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library CountTest;
-import '../../pkg/unittest/lib/unittest.dart';
-import 'dart:isolate';
-
-void countMessages() {
- int count = 0;
- IsolateSink replySink;
- bool isFirst = true;
- stream.listen((msg) {
- if (isFirst) {
- replySink = msg;
- isFirst = false;
- return;
- }
- replySink.add(count);
- count++;
- }, onDone: () {
- expect(count, 10);
- replySink.close();
- });
-}
-
-void main() {
- test("count 10 consecutive stream messages", () {
- int count = 0;
- MessageBox box = new MessageBox();
- IsolateSink remote = streamSpawnFunction(countMessages);
- remote.add(box.sink);
- box.stream.listen(expectAsync1((remoteCount) {
- expect(remoteCount, count);
- count++;
- if (count < 10) {
- remote.add(null);
- } else {
- remote.close();
- }
- }, count: 10), onDone: expectAsync0(() {
- expect(count, 10);
- }));
- remote.add(null);
- });
-}
« no previous file with comments | « tests/isolate/browser/typed_data_message_test.dart ('k') | tests/isolate/count_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698