MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / sendConsoleCmd

Method sendConsoleCmd

source/tests/mocks/ODClientTest.cpp:483–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481}
482
483void ODClientTest::sendConsoleCmd(const std::string& cmd)
484{
485 std::vector<std::string> tokens;
486 boost::algorithm::split(tokens,
487 cmd, boost::algorithm::is_space(),
488 boost::algorithm::token_compress_on);
489 uint32_t nb = tokens.size();
490
491 ODPacket packSend;
492 packSend << ClientNotificationType::askExecuteConsoleCommand << nb;
493 for(const std::string& token : tokens)
494 packSend << token;
495
496 send(packSend);
497}

Callers 3

BOOST_AUTO_TEST_CASEFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 1

splitFunction · 0.85

Tested by

no test coverage detected