| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/edk/system/message_in_transit_test_utils.h" | 5 #include "mojo/edk/system/message_in_transit_test_utils.h" |
| 6 | 6 |
| 7 #include <stdint.h> |
| 8 |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 8 | 10 |
| 9 namespace mojo { | 11 namespace mojo { |
| 10 namespace edk { | 12 namespace edk { |
| 11 namespace test { | 13 namespace test { |
| 12 | 14 |
| 13 scoped_ptr<MessageInTransit> MakeTestMessage(unsigned id) { | 15 scoped_ptr<MessageInTransit> MakeTestMessage(unsigned id) { |
| 14 return make_scoped_ptr( | 16 return make_scoped_ptr( |
| 15 new MessageInTransit(MessageInTransit::Type::MESSAGE, | 17 new MessageInTransit(MessageInTransit::Type::MESSAGE, |
| 16 static_cast<uint32_t>(sizeof(id)), &id)); | 18 static_cast<uint32_t>(sizeof(id)), &id)); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 28 message->num_bytes() != sizeof(*id)) | 30 message->num_bytes() != sizeof(*id)) |
| 29 return false; | 31 return false; |
| 30 | 32 |
| 31 *id = *static_cast<const unsigned*>(message->bytes()); | 33 *id = *static_cast<const unsigned*>(message->bytes()); |
| 32 return true; | 34 return true; |
| 33 } | 35 } |
| 34 | 36 |
| 35 } // namespace test | 37 } // namespace test |
| 36 } // namespace edk | 38 } // namespace edk |
| 37 } // namespace mojo | 39 } // namespace mojo |
| OLD | NEW |