MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / SwitchTest

Method SwitchTest

tests/gtest_switch.cpp:53–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 BT::NodeConfig simple_switch_config_;
52
53 SwitchTest()
54 : action_1("action_1", milliseconds(200))
55 , action_42("action_42", milliseconds(200))
56 , action_def("action_default", milliseconds(200))
57 {
58 BT::PortsRemapping input;
59 input.insert(std::make_pair("variable", "{my_var}"));
60 input.insert(std::make_pair("case_1", "1"));
61 input.insert(std::make_pair("case_2", "42"));
62
63 BT::NodeConfig simple_switch_config_;
64 simple_switch_config_.blackboard = bb;
65 simple_switch_config_.input_ports = input;
66
67 root = std::make_unique<Switch2>("simple_switch", simple_switch_config_);
68
69 root->addChild(&action_1);
70 root->addChild(&action_42);
71 root->addChild(&action_def);
72 }
73 ~SwitchTest() override
74 {
75 root->halt();

Callers

nothing calls this directly

Calls 1

addChildMethod · 0.80

Tested by

no test coverage detected