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

Unified Diff: tests/isolate/src/APIv2_unresolvedPortsStandaloneTest.dart

Issue 10226008: Revert "unittest step 3 and 4: remove TestFramework.dart, make test.dart use" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: tests/isolate/src/APIv2_unresolvedPortsStandaloneTest.dart
diff --git a/tests/isolate/src/APIv2_unresolvedPortsTest.dart b/tests/isolate/src/APIv2_unresolvedPortsStandaloneTest.dart
similarity index 57%
rename from tests/isolate/src/APIv2_unresolvedPortsTest.dart
rename to tests/isolate/src/APIv2_unresolvedPortsStandaloneTest.dart
index 76bf2a603ac584b23238d95050e2437e033c3983..73f57cc965d75052d38b67bbb067cd77865d60e3 100644
--- a/tests/isolate/src/APIv2_unresolvedPortsTest.dart
+++ b/tests/isolate/src/APIv2_unresolvedPortsStandaloneTest.dart
@@ -5,7 +5,6 @@
// spawns multiple isolates and sends unresolved ports between them.
#library('unresolved_ports');
#import('dart:isolate');
-#import('../../../lib/unittest/unittest.dart');
// This test does the following:
// - main spawns two isolates: 'tim' and 'beth'
@@ -31,23 +30,21 @@ bobIsolate() {
}
main() {
- test('Message chain with unresolved ports', () {
- ReceivePort port = new ReceivePort();
- port.receive(expectAsync2((msg, _) {
- expect(msg).equals('main says: Beth, find out if Tim is coming.'
- + '\nBeth says: Tim are you coming? And Bob?'
- + '\nTim says: Can you tell "main" that we are all coming?'
- + '\nBob says: we are all coming!');
- port.close();
- }));
-
- SendPort tim = spawnFunction(timIsolate);
- SendPort beth = spawnFunction(bethIsolate);
-
- beth.send(
- // because tim is created asynchronously, here we are sending an
- // unresolved port:
- ['main says: Beth, find out if Tim is coming.', tim],
- port.toSendPort());
+ ReceivePort port = new ReceivePort();
+ port.receive((msg, _) {
+ Expect.equals('main says: Beth, find out if Tim is coming.'
+ + '\nBeth says: Tim are you coming? And Bob?'
+ + '\nTim says: Can you tell "main" that we are all coming?'
+ + '\nBob says: we are all coming!', msg);
+ port.close();
});
+
+ SendPort tim = spawnFunction(timIsolate);
+ SendPort beth = spawnFunction(bethIsolate);
+
+ beth.send(
+ // because tim is created asynchronously, here we are sending an
+ // unresolved port:
+ ['main says: Beth, find out if Tim is coming.', tim],
+ port.toSendPort());
}
« no previous file with comments | « tests/isolate/src/APIv2_unresolvedPortsStandaloneNegativeTest.dart ('k') | tests/isolate/src/APIv2_unresolvedPortsTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698