// Build a test address vector.
uint8_t tmp[] = { 0x01, 0xFF, 0x02, 0xAC, 0x03, 0x0B, 0x07, 0x08 };
- std::vector<uint8_t> bytes(tmp, tmp + (sizeof(tmp)/sizeof(uint8_t)));
+ std::vector<uint8_t> bytes(tmp, tmp + (sizeof(tmp) / sizeof(uint8_t)));
// Verify construction from an HW_ADDRESS id type and address vector.
UserIdPtr id;
// Build a test DUID vector.
uint8_t tmp[] = { 0x01, 0xFF, 0x02, 0xAC, 0x03, 0x0B, 0x07, 0x08 };
- std::vector<uint8_t> bytes(tmp, tmp + (sizeof(tmp)/sizeof(uint8_t)));
+ std::vector<uint8_t> bytes(tmp, tmp + (sizeof(tmp) / sizeof(uint8_t)));
// Verify construction from an DUID id type and address vector.
UserIdPtr id;
// Iterate over a series of requests, sending and receiving one
/// at time.
- size_t num_msgs = sizeof(valid_msgs)/sizeof(char*);
+ size_t num_msgs = sizeof(valid_msgs) / sizeof(char*);
for (size_t i = 0; i < num_msgs; ++i) {
// We are not verifying ability to send, so if we can't test is over.
ASSERT_NO_THROW(sendNcr(valid_msgs[i]));
SimpleSendHandlerPtr ncr_handler(new SimpleSendHandler());
// Tests are based on a list of messages, get the count now.
- size_t num_msgs = sizeof(valid_msgs)/sizeof(char*);
+ size_t num_msgs = sizeof(valid_msgs) / sizeof(char*);
// Create the sender, setting the queue max equal to the number of
// messages we will have in the list.
SimpleSendHandlerPtr ncr_handler(new SimpleSendHandler());
// Tests are based on a list of messages, get the count now.
- size_t num_msgs = sizeof(valid_msgs)/sizeof(char*);
+ size_t num_msgs = sizeof(valid_msgs) / sizeof(char*);
// Create the sender, setting the queue max equal to the number of
// messages we will have in the list.
SimpleSendHandlerPtr ncr_handler(new SimpleSendHandler());
// Tests are based on a list of messages, get the count now.
- size_t num_msgs = sizeof(valid_msgs)/sizeof(char*);
+ size_t num_msgs = sizeof(valid_msgs) / sizeof(char*);
// Create the sender, setting the queue max equal to the number of
// messages we will have in the list.
SimpleSendHandlerPtr ncr_handler(new SimpleSendHandler());
// Tests are based on a list of messages, get the count now.
- size_t num_msgs = sizeof(valid_msgs)/sizeof(char*);
+ size_t num_msgs = sizeof(valid_msgs) / sizeof(char*);
// Create the sender, setting the queue max equal to the number of
// messages we will have in the list.
SimpleSendHandlerPtr ncr_handler(new SimpleSendHandler());
// Tests are based on a list of messages, get the count now.
- size_t num_msgs = sizeof(valid_msgs)/sizeof(char*);
+ size_t num_msgs = sizeof(valid_msgs) / sizeof(char*);
// Create the sender, setting the queue max equal to the number of
// messages we will have in the list.
SimpleSendHandlerPtr ncr_handler(new SimpleSendHandler());
// Tests are based on a list of messages, get the count now.
- size_t num_msgs = sizeof(valid_msgs)/sizeof(char*);
+ size_t num_msgs = sizeof(valid_msgs) / sizeof(char*);
// Create the sender, setting the queue max equal to the number of
// messages we will have in the list.
NameChangeRequestPtr ncr;
// Tests are based on a list of messages, get the count now.
- size_t num_msgs = sizeof(valid_msgs)/sizeof(char*);
+ size_t num_msgs = sizeof(valid_msgs) / sizeof(char*);
// Create two senders with queue max equal to the number of
// messages we will have in the list.
NameChangeRequestPtr ncr;
// Tests are based on a list of messages, get the count now.
- size_t num_msgs = sizeof(valid_msgs)/sizeof(char*);
+ size_t num_msgs = sizeof(valid_msgs) / sizeof(char*);
// Create two senders with queue max equal to the number of
// messages we will have in the list.
EXPECT_TRUE(listener_->amListening());
// Get the number of messages in the list of test messages.
- size_t num_msgs = sizeof(valid_msgs)/sizeof(char*);
+ size_t num_msgs = sizeof(valid_msgs) / sizeof(char*);
// Place the sender into sending state.
ASSERT_NO_THROW(sender_->startSending(io_service_));
EXPECT_TRUE(listener_->amListening());
// Get the number of messages in the list of test messages.
- size_t num_msgs = sizeof(valid_msgs)/sizeof(char*);
+ size_t num_msgs = sizeof(valid_msgs) / sizeof(char*);
// Place the sender into sending state.
ASSERT_NO_THROW(sender_->startSending(io_service_));
TEST(NameChangeRequestTest, invalidMsgChecks) {
// Iterate over the list of JSON strings, attempting to create a
// NameChangeRequest. The attempt should throw a NcrMessageError.
- int num_msgs = sizeof(invalid_msgs)/sizeof(char*);
+ int num_msgs = sizeof(invalid_msgs) / sizeof(char*);
for (int i = 0; i < num_msgs; i++) {
EXPECT_THROW(NameChangeRequest::fromJSON(invalid_msgs[i]),
NcrMessageError) << "Invalid message not caught idx: "
TEST(NameChangeRequestTest, validMsgChecks) {
// Iterate over the list of JSON strings, attempting to create a
// NameChangeRequest. The attempt should succeed.
- int num_msgs = sizeof(valid_msgs)/sizeof(char*);
+ int num_msgs = sizeof(valid_msgs) / sizeof(char*);
for (int i = 0; i < num_msgs; i++) {
EXPECT_NO_THROW(NameChangeRequest::fromJSON(valid_msgs[i]))
<< "Valid message failed, message idx: " << i