| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/message_handler.h" | 5 #include "vm/message_handler.h" |
| 6 #include "vm/port.h" | 6 #include "vm/port.h" |
| 7 #include "vm/unit_test.h" | 7 #include "vm/unit_test.h" |
| 8 | 8 |
| 9 namespace dart { | 9 namespace dart { |
| 10 | 10 |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 EXPECT_EQ(11, handler.message_count()); | 398 EXPECT_EQ(11, handler.message_count()); |
| 399 EXPECT(handler.start_called()); | 399 EXPECT(handler.start_called()); |
| 400 EXPECT(!handler.end_called()); | 400 EXPECT(!handler.end_called()); |
| 401 EXPECT_EQ(port, handler_ports[0]); | 401 EXPECT_EQ(port, handler_ports[0]); |
| 402 for (int i = 1; i < 11; i++) { | 402 for (int i = 1; i < 11; i++) { |
| 403 EXPECT_EQ(ports[i - 1], handler_ports[i]); | 403 EXPECT_EQ(ports[i - 1], handler_ports[i]); |
| 404 } | 404 } |
| 405 handler_peer.decrement_live_ports(); | 405 handler_peer.decrement_live_ports(); |
| 406 EXPECT(!handler.HasLivePorts()); | 406 EXPECT(!handler.HasLivePorts()); |
| 407 PortMap::ClosePorts(&handler); | 407 PortMap::ClosePorts(&handler); |
| 408 delete[] ports; |
| 408 } | 409 } |
| 409 | 410 |
| 410 } // namespace dart | 411 } // namespace dart |
| OLD | NEW |