diff options
Diffstat (limited to 'o3d/core/cross/message_commands_test.cc')
-rw-r--r-- | o3d/core/cross/message_commands_test.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/o3d/core/cross/message_commands_test.cc b/o3d/core/cross/message_commands_test.cc index 3e089aa..8bdecfb 100644 --- a/o3d/core/cross/message_commands_test.cc +++ b/o3d/core/cross/message_commands_test.cc @@ -143,7 +143,7 @@ TEST_F(MessageCommandsTest, MessageUpdateTexture2DRect) { EXPECT_EQ(10, msg2.msg.pitch); } -TEST_F(MessageCommandsTest, MessageRenderTest) { +TEST_F(MessageCommandsTest, MessageRender) { EXPECT_EQ(static_cast<int>(imc::RENDER), 7); EXPECT_EQ(0u, offsetof(MessageRender::Msg, message_id)); MessageRender msg; @@ -151,6 +151,19 @@ TEST_F(MessageCommandsTest, MessageRenderTest) { EXPECT_EQ(4u, sizeof msg.msg); } +TEST_F(MessageCommandsTest, MessageGetVersion) { + EXPECT_EQ(static_cast<int>(imc::GET_VERSION), 8); + EXPECT_EQ(0u, offsetof(MessageGetVersion::Msg, message_id)); + MessageGetVersion msg; + EXPECT_EQ(imc::GET_VERSION, msg.msg.message_id); + EXPECT_EQ(4u, sizeof msg.msg); + const char* kVersion = "0.1.2.3"; + MessageGetVersion::Response response(kVersion); + EXPECT_EQ(0u, offsetof(MessageGetVersion::ResponseData, version)); + EXPECT_EQ(128u, sizeof(MessageGetVersion::ResponseData)); // NOLINT + EXPECT_STREQ(kVersion, response.data.version); +} + } // namespace o3d |