23 #include <boost/test/unit_test.hpp> 37 o.max_open_files = 256;
38 o.create_if_missing =
true;
41 ldb::Status status = ldb::DB::Open(o, td.
path(), &db);
42 BOOST_REQUIRE(status.ok() && db);
53 odb.insert(
h256(42), &value);
63 odb.insert(
h256(41), &value);
76 o.max_open_files = 256;
77 o.create_if_missing =
true;
80 ldb::Status status = ldb::DB::Open(o, td.
path(), &db);
81 BOOST_REQUIRE(status.ok() && db);
88 odb.insert(
h256(42), &value);
89 odb.insert(
h256(0), &value);
92 odb.insertAux(
h256(42), &valueAux);
93 odb.insertAux(
h256(0), &valueAux);
117 o.max_open_files = 256;
118 o.create_if_missing =
true;
121 ldb::Status status = ldb::DB::Open(o, td.
path(), &db);
122 BOOST_REQUIRE(status.ok() && db);
127 odb.insert(
h256(43), &value);
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
std::hash for asio::adress
std::string toString(string32 const &_s)
Make normal string from fixed-length string.
bytes fromHex(std::string const &_s, WhenError _throw=WhenError::DontThrow)
BOOST_AUTO_TEST_CASE(basicUsage)
std::vector< byte > bytes
#define BOOST_FIXTURE_TEST_SUITE(a, b)
std::string const & path() const
#define BOOST_CHECK_EQUAL(v1, v2)
#define BOOST_AUTO_TEST_SUITE_END()
temporary directory implementation It creates temporary directory in the given path.
Helper functions to work with json::spirit and test files.
#define BOOST_CHECK(expr)