23 #include <boost/test/unit_test.hpp> 34 cnote <<
"bytesRef copyTo and toString...";
35 dev::bytes originalSequence =
dev::fromHex(
"0102030405060708091011121314151617181920212223242526272829303132");
37 dev::h256 hash32(
"1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347");
38 hash32.ref().copyTo(out);
40 BOOST_CHECK_MESSAGE(out.size() == 32,
"Error wrong result size when h256::ref().copyTo(dev::bytesRef out)");
41 BOOST_CHECK_MESSAGE(out.toBytes() == originalSequence,
"Error when h256::ref().copyTo(dev::bytesRef out)");
A modifiable reference to an existing object or vector in memory.
bytes fromHex(std::string const &_s, WhenError _throw=WhenError::DontThrow)
bool isHex(std::string const &_s) noexcept
std::vector< byte > bytes
BOOST_AUTO_TEST_CASE(rndCode)
#define BOOST_FIXTURE_TEST_SUITE(a, b)
#define BOOST_AUTO_TEST_SUITE_END()
Helper functions to work with json::spirit and test files.
#define BOOST_CHECK(expr)