Fixes RawReceivePort.hashCode

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1386253003 .
This commit is contained in:
Zachary Anderson 2015-10-08 13:06:49 -07:00
parent e292918cff
commit bb7f3a7501
2 changed files with 7 additions and 1 deletions

View file

@ -127,7 +127,7 @@ class _RawReceivePortImpl implements RawReceivePort {
}
int get hashCode {
return sendPort.hashCode();
return sendPort.hashCode;
}
Uri get remotePortUri => new Uri.https('localhost', '55');

View file

@ -31,6 +31,12 @@ main([args, port]) {
});
});
test("raw receive hashCode", () {
RawReceivePort port = new RawReceivePort();
expect(port.hashCode is int, true);
port.close();
});
test("raw receive twice - change handler", () {
RawReceivePort port = new RawReceivePort();
Isolate.spawn(remote2, port.sendPort);