Remove the maximum string size. (#524)
It wasn't preventing any allocations from happening, so it doesn't seem to serve much purpose. Also remove the tests for the maximum string size. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This commit is contained in:
parent
7859398e97
commit
cdf1b4d17d
3 changed files with 7 additions and 63 deletions
|
@ -1,8 +0,0 @@
|
|||
# config/test_yaml
|
||||
---
|
||||
|
||||
lidar_ns:
|
||||
lidar_1:
|
||||
ros__parameters:
|
||||
id: 10
|
||||
name: "A long string that will not be supported by the yaml parser. The maximum supported length is 256 characters. Anything over that limit will be rejected and therefore this message has to be a bit longer in order to exceed that threshold by just one character."
|
|
@ -363,28 +363,6 @@ TEST(test_file_parser, no_alias_support) {
|
|||
EXPECT_FALSE(res);
|
||||
}
|
||||
|
||||
TEST(test_file_parser, max_string_sz) {
|
||||
rcutils_reset_error();
|
||||
EXPECT_TRUE(rcutils_get_cwd(cur_dir, 1024)) << rcutils_get_error_string().str;
|
||||
rcutils_allocator_t allocator = rcutils_get_default_allocator();
|
||||
char * test_path = rcutils_join_path(cur_dir, "test", allocator);
|
||||
ASSERT_TRUE(NULL != test_path) << rcutils_get_error_string().str;
|
||||
OSRF_TESTING_TOOLS_CPP_SCOPE_EXIT({
|
||||
allocator.deallocate(test_path, allocator.state);
|
||||
});
|
||||
char * path = rcutils_join_path(test_path, "max_string_sz.yaml", allocator);
|
||||
ASSERT_TRUE(NULL != path) << rcutils_get_error_string().str;
|
||||
OSRF_TESTING_TOOLS_CPP_SCOPE_EXIT({
|
||||
allocator.deallocate(path, allocator.state);
|
||||
});
|
||||
ASSERT_TRUE(rcutils_exists(path)) << "No test YAML file found at " << path;
|
||||
rcl_params_t * params_hdl = rcl_yaml_node_struct_init(allocator);
|
||||
ASSERT_TRUE(NULL != params_hdl) << rcutils_get_error_string().str;
|
||||
bool res = rcl_parse_yaml_file(path, params_hdl);
|
||||
fprintf(stderr, "%s\n", rcutils_get_error_string().str);
|
||||
EXPECT_FALSE(res);
|
||||
}
|
||||
|
||||
TEST(test_file_parser, empty_string) {
|
||||
rcutils_reset_error();
|
||||
EXPECT_TRUE(rcutils_get_cwd(cur_dir, 1024)) << rcutils_get_error_string().str;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue