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

Unified Diff: tests/isolate/unresolved_ports_test.dart

Issue 11415101: Fix unresolved ports negative test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: tests/isolate/unresolved_ports_test.dart
diff --git a/tests/isolate/unresolved_ports_test.dart b/tests/isolate/unresolved_ports_test.dart
index 06f5d5826e9ad9503e9d4713d1a0ca636350ff4e..107200030ff41d2f70e63d51001fb898f5aab2b3 100644
--- a/tests/isolate/unresolved_ports_test.dart
+++ b/tests/isolate/unresolved_ports_test.dart
@@ -15,6 +15,8 @@ import '../../pkg/unittest/lib/unittest.dart';
// by giving 'beth' a send-port to 'tim'.
bethIsolate() {
+ // TODO(sigmund): use expectAsync2 when it is OK to use it within an isolate
+ // (issue #6856)
port.receive((msg, reply) => msg[1].send(
'${msg[0]}\nBeth says: Tim are you coming? And Bob?', reply));
}
@@ -30,7 +32,7 @@ bobIsolate() {
'$msg\nBob says: we are all coming!'));
}
-main() {
+baseTest({bool failForNegativeTest: false}) {
test('Message chain with unresolved ports', () {
ReceivePort port = new ReceivePort();
port.receive(expectAsync2((msg, _) {
@@ -38,6 +40,7 @@ main() {
'\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!'));
+ expect(failForNegativeTest, isFalse);
port.close();
}));
@@ -51,3 +54,5 @@ main() {
port.toSendPort());
});
}
+
+main() => baseTest();

Powered by Google App Engine
This is Rietveld 408576698