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 "platform/assert.h" | 5 #include "platform/assert.h" |
6 #include "vm/message_queue.h" | 6 #include "vm/message.h" |
7 #include "vm/unit_test.h" | 7 #include "vm/unit_test.h" |
8 | 8 |
9 namespace dart { | 9 namespace dart { |
10 | 10 |
11 | 11 |
12 // Provide access to private members of MessageQueue for testing. | 12 // Provide access to private members of MessageQueue for testing. |
13 class MessageQueueTestPeer { | 13 class MessageQueueTestPeer { |
14 public: | 14 public: |
15 explicit MessageQueueTestPeer(MessageQueue* queue) : queue_(queue) {} | 15 explicit MessageQueueTestPeer(MessageQueue* queue) : queue_(queue) {} |
16 | 16 |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 Dart_Port port1 = 1; | 280 Dart_Port port1 = 1; |
281 | 281 |
282 EXPECT(!queue_peer.HasMessage()); | 282 EXPECT(!queue_peer.HasMessage()); |
283 queue.Flush(port1); | 283 queue.Flush(port1); |
284 | 284 |
285 // Queue is still empty. | 285 // Queue is still empty. |
286 EXPECT(!queue_peer.HasMessage()); | 286 EXPECT(!queue_peer.HasMessage()); |
287 } | 287 } |
288 | 288 |
289 } // namespace dart | 289 } // namespace dart |
OLD | NEW |