MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / JSONPrettyPrint

Function JSONPrettyPrint

src/test/script_tests.cpp:402–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400};
401
402std::string JSONPrettyPrint(const UniValue& univalue)
403{
404 std::string ret = univalue.write(4);
405 // Workaround for libunivalue pretty printer, which puts a space between comma's and newlines
406 size_t pos = 0;
407 while ((pos = ret.find(" \n", pos)) != std::string::npos) {
408 ret.replace(pos, 2, "\n");
409 pos++;
410 }
411 return ret;
412}
413}
414
415BOOST_AUTO_TEST_CASE(script_build)

Callers 2

BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_FOREACHFunction · 0.85

Calls 2

findMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected