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

Function RegisterTestTick

tests/test_helper.hpp:15–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14template <size_t N>
15inline void RegisterTestTick(BT::BehaviorTreeFactory& factory,
16 const std::string& name_prefix,
17 std::array<int, N>& tick_counters)
18{
19 for(size_t i = 0; i < tick_counters.size(); i++)
20 {
21 tick_counters[i] = false;
22 char str[100];
23 (void)snprintf(str, sizeof str, "%s%c", name_prefix.c_str(), char('A' + i));
24 int* counter_ptr = &(tick_counters[i]);
25 factory.registerSimpleAction(str, std::bind(&TestTick, counter_ptr));
26 }
27}
28
29#endif // TEST_HELPER_HPP

Callers 12

SetUpMethod · 0.85
TESTFunction · 0.85
SetUpMethod · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
SetUpMethod · 0.85
TESTFunction · 0.85
TESTFunction · 0.85

Calls 3

bindFunction · 0.85
registerSimpleActionMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected