Skip to content

Commit

Permalink
Added small fixed length test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanFabian committed Jan 27, 2025
1 parent 73b3d40 commit 719505a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ros_babel_fish/test/message_decoding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ TEST_F( MessageDecodingTest, arrayTests )
( *msg )["subarrays_fixed"].as<FixedLengthCompoundArrayMessage>();
ASSERT_EQ( msg_subarrays_fixed.elementDatatype(), "ros_babel_fish_test_msgs::msg::TestSubArray" );
ASSERT_EQ( msg_subarrays_fixed.elementName(), "ros_babel_fish_test_msgs/msg/TestSubArray" );

const auto &msg_uint16s = ( *msg )["uint16s"].as<FixedLengthArrayMessage<uint16_t>>();
ASSERT_EQ( msg_uint16s.size(), 32 );
ASSERT_EQ( test_array.uint16s[4], msg_uint16s[4] );
}

int main( int argc, char **argv )
Expand Down

0 comments on commit 719505a

Please sign in to comment.