MCPcopy Create free account
hub / github.com/ElementsProject/elements / is_null_key

Function is_null_key

src/test/dbwrapper_tests.cpp:14–21  ·  view source on GitHub ↗

Test if a string consists entirely of null characters

Source from the content-addressed store, hash-verified

12
13// Test if a string consists entirely of null characters
14static bool is_null_key(const std::vector<unsigned char>& key) {
15 bool isnull = true;
16
17 for (unsigned int i = 0; i < key.size(); i++)
18 isnull &= (key[i] == '\x00');
19
20 return isnull;
21}
22
23BOOST_FIXTURE_TEST_SUITE(dbwrapper_tests, BasicTestingSetup)
24

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected