Tests for ContactManagersPluginInfo schema validation with derived type support.
More...
|
|
schema | mergeConfig (config) |
| |
|
| EXPECT_TRUE (errors.empty())<<[&] |
| |
|
| EXPECT_FALSE (errors.empty()) |
| |
|
| for (const auto &e :errors) |
| |
|
| EXPECT_TRUE (found_derive_error)<< "Expected a derived-type or schema-not-found error" |
| |
|
| EXPECT_TRUE (found_class_error)<< "Expected an error about missing 'class' field" |
| |
|
YAML::Node | discrete_plugins (YAML::NodeType::Map) |
| |
|
YAML::Node | plugins (YAML::NodeType::Map) |
| |
|
YAML::Node | plugin_info (YAML::NodeType::Map) |
| |
|
| EXPECT_TRUE (found_plugins_error)<< "Expected an error about 'plugins' having the wrong type" |
| |
|
| EXPECT_TRUE (std::any_of(errors.begin(), errors.end(), [](const auto &error) { return error.find("discrete_plugins.plugins") !=std::string::npos &&error.find("required") !=std::string::npos;})) |
| |
|
| EXPECT_TRUE (schema.validate().empty()) |
| |
| std::filesystem::path | file_path (__FILE__) |
| |
|
int | main (int argc, char **argv) |
| |
|
| YAML::Node | config |
| |
|
auto | errors = schema.validate() |
| |
|
bool | found_derive_error = false |
| |
|
bool | found_class_error = false |
| |
|
| discrete_plugins ["default"] = "BulletDiscreteSimpleManager" |
| |
|
| plugin_info ["class"] = "BulletDiscreteSimpleManagerFactory" |
| |
|
| plugins ["BulletDiscreteSimpleManager"] = plugin_info |
| |
|
bool | found_plugins_error = false |
| |
|
std::filesystem::path | config_path = file_path.parent_path() / "contact_manager_plugins.yaml" |
| |
|
YAML::Node | full_config = YAML::LoadFile(config_path.string()) |
| |
Tests for ContactManagersPluginInfo schema validation with derived type support.
- Author
- Levi Armstrong
- Date
- April 4, 2026
- Copyright
- Copyright (c) 2026, Levi Armstrong
- License
- Software License Agreement (Apache License)
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
◆ file_path()
| std::filesystem::path file_path |
( |
__FILE__ |
| ) |
|
Initial value:{
Namespace owning boost's hash_is_avalanching, and defined iff boost has the trait at all.
Definition allowed_collision_matrix.h:15
◆ config
Initial value:= YAML::Load(R"(
search_paths:
- /usr/local/lib
search_libraries:
- tesseract_collision_bullet_factories
discrete_plugins:
default: BulletDiscreteBVHManager
plugins:
BulletDiscreteBVHManager:
class: BulletDiscreteBVHManagerFactory
config:
share_pool_allocators: false
BulletDiscreteSimpleManager:
class: BulletDiscreteSimpleManagerFactory
FCLDiscreteBVHManager:
class: FCLDiscreteBVHManagerFactory
continuous_plugins:
default: BulletCastBVHManager
plugins:
BulletCastBVHManager:
class: BulletCastBVHManagerFactory
BulletCastSimpleManager:
class: BulletCastSimpleManagerFactory
)")