MCPcopy Create free account
hub / github.com/CleverRaven/Cataclysm-DDA / make_test_node

Function make_test_node

tests/behavior_test.cpp:43–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41} // namespace behavior
42
43static behavior::node_t make_test_node( const std::string &goal, const behavior::status_t *status )
44{
45 behavior::node_t node;
46 if( !goal.empty() ) {
47 node.set_goal( goal );
48 }
49 node.add_predicate( [status]( const behavior::oracle_t *, const std::string & ) {
50 return *status;
51 } );
52 return node;
53}
54
55TEST_CASE( "behavior_tree", "[behavior]" )
56{

Callers 1

behavior_test.cppFile · 0.85

Calls 3

set_goalMethod · 0.80
add_predicateMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected