Index: runtime/vm/port_test.cc |
=================================================================== |
--- runtime/vm/port_test.cc (revision 35191) |
+++ runtime/vm/port_test.cc (working copy) |
@@ -135,11 +135,16 @@ |
TEST_CASE(PortMap_PostMessageInvalidPort) { |
turnidge
2014/04/22 18:40:45
Change test name to PostMessageClosedPort?
Ivan Posva
2014/04/22 21:28:30
A closed port is an invalid port, but I agree that
|
+ // Create a port id and make it invalid. |
+ PortTestMessageHandler handler; |
+ Dart_Port port = PortMap::CreatePort(&handler); |
+ PortMap::ClosePort(port); |
+ |
const char* message = "msg"; |
intptr_t message_len = strlen(message) + 1; |
EXPECT(!PortMap::PostMessage(new Message( |
- 0, reinterpret_cast<uint8_t*>(strdup(message)), message_len, |
+ port, reinterpret_cast<uint8_t*>(strdup(message)), message_len, |
Message::kNormalPriority))); |
} |