Skip to content

Commit

Permalink
add test cases for UTF-8 encoded strings (#80)
Browse files Browse the repository at this point in the history
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
  • Loading branch information
dirk-thomas authored May 15, 2019
1 parent 0aba5a1 commit 641b579
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test_msgs/include/test_msgs/message_fixtures.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ get_messages_strings()
msg->bounded_string_value = "Hello world!";
messages.push_back(msg);
}
{
auto msg = std::make_shared<test_msgs::msg::Strings>();
msg->string_value = u8"Hell\u00F6 W\u00F6rld!"; // using umlaut
msg->bounded_string_value = u8"Hell\u00F6 W\u00F6rld!"; // using umlaut
messages.push_back(msg);
}
{
auto msg = std::make_shared<test_msgs::msg::Strings>();
msg->string_value = "";
Expand Down
5 changes: 5 additions & 0 deletions test_msgs/src/test_msgs/message_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ def get_msg_strings():
msg.bounded_string_value = 'Hello world!'
msgs.append(msg)

msg = Strings()
msg.string_value = 'Hellö Wörld!'
msg.bounded_string_value = 'Hellö Wörld!'
msgs.append(msg)

msg = Strings()
msg.string_value = ''
# check strings longer then 255 characters
Expand Down

0 comments on commit 641b579

Please sign in to comment.