1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-30 19:04:51 +00:00

fixing test

This commit is contained in:
Carles Fernandez 2015-12-27 11:23:09 +01:00
parent 217ed14b0a
commit c5ab28510b

View File

@ -41,11 +41,12 @@
TEST(Control_Message_Factory_Test, GetQueueMessage) TEST(Control_Message_Factory_Test, GetQueueMessage)
{ {
std::shared_ptr<ControlMessageFactory> factory = std::make_shared<ControlMessageFactory>(); std::shared_ptr<ControlMessageFactory> factory = std::make_shared<ControlMessageFactory>();
gr::message::sptr queue_message = factory->GetQueueMessage(0, 0); gr::message::sptr queue_message = factory->GetQueueMessage(0, 2);
std::shared_ptr<ControlMessage> control_message = std::make_shared<ControlMessage>(); auto control_messages = factory->GetControlMessages(queue_message);
unsigned int expected0 = 0; unsigned int expected0 = 0;
EXPECT_EQ(expected0, control_message->who); unsigned int expected2 = 2;
EXPECT_EQ(expected0, control_message->what); EXPECT_EQ(expected0, control_messages->at(0)->who);
EXPECT_EQ(expected2, control_messages->at(0)->what);
EXPECT_EQ(sizeof(ControlMessage), queue_message->length()); EXPECT_EQ(sizeof(ControlMessage), queue_message->length());
} }