diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 9a94c95e8..7ccb5f05d 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -35,6 +35,7 @@ CompileExample("t12_default_ports") CompileExample("t13_access_by_ref") CompileExample("t14_subtree_model") CompileExample("t15_nodes_mocking") +CompileExample("t15_nodes_mocking_strict_failure") CompileExample("t16_global_blackboard") CompileExample("t17_blackboard_backup") CompileExample("t18_waypoints") diff --git a/examples/t15_nodes_mocking.cpp b/examples/t15_nodes_mocking.cpp index 805a46b95..6e6007066 100644 --- a/examples/t15_nodes_mocking.cpp +++ b/examples/t15_nodes_mocking.cpp @@ -39,7 +39,7 @@ const char* xml_text = R"( /** * @brief In this example we will see how we can substitute some nodes - * in the Tree above with + * in the Tree above with mocks. * @param argc * @param argv * @return diff --git a/examples/t15_nodes_mocking_strict_failure.cpp b/examples/t15_nodes_mocking_strict_failure.cpp new file mode 100644 index 000000000..c3374ba5e --- /dev/null +++ b/examples/t15_nodes_mocking_strict_failure.cpp @@ -0,0 +1,143 @@ +#include "dummy_nodes.h" + +#include "behaviortree_cpp/bt_factory.h" + +// clang-format off +namespace +{ +const char* xml_text = R"( + + + + + + + + +