blob: 6d2afb78a75342b6a31272d8197acd2f31fe97b4 [file] [log] [blame]
// Copyright (c) 2011, 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.
/**
* @assertion final SendPort sendPort
* Returns a SendPort that sends to this receive port.
* @description Checks that a new SendPort that sends to this receive port is returned.
* @author msyabro
*/
import "dart:isolate";
import "../../../Utils/expect.dart";
void main() {
ReceivePort rPort = new ReceivePort();
var sPort = rPort.sendPort;
Expect.isTrue(sPort is SendPort);
asyncStart();
rPort.listen((var message) {
rPort.close();
asyncEnd();
});
sPort.send("message1");
}