8 #include <boost/test/unit_test.hpp>
14 auto data_dir = SetDataDir(
"flatfile_test");
27 auto data_dir = SetDataDir(
"flatfile_test");
30 std::string line1(
"A purely peer-to-peer version of electronic cash would allow online "
31 "payments to be sent directly from one party to another without going "
32 "through a financial institution.");
33 std::string line2(
"Digital signatures provide part of the solution, but the main benefits are "
34 "lost if a trusted third party is still required to prevent double-spending.");
88 auto data_dir = SetDataDir(
"flatfile_test");
108 auto data_dir = SetDataDir(
"flatfile_test");
Non-refcounted RAII wrapper for FILE*.
FlatFileSeq represents a sequence of numbered files storing raw data.
fs::path FileName(const FlatFilePos &pos) const
Get the name of the file at the given position.
size_t Allocate(const FlatFilePos &pos, size_t add_size, bool &out_of_space)
Allocate additional space in a file after the given starting position.
bool Flush(const FlatFilePos &pos, bool finalize=false)
Commit a file to disk, and optionally truncate off extra pre-allocated bytes if final.
FILE * Open(const FlatFilePos &pos, bool read_only=false)
Open a handle to the file at the given position.
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(flatfile_filename)
#define BOOST_CHECK_THROW(stmt, excMatch)
#define BOOST_FIXTURE_TEST_SUITE(a, b)
#define BOOST_CHECK_EQUAL(v1, v2)
#define BOOST_CHECK(expr)
unsigned int GetSerializeSize(const std::array< T, N > &item)
array
#define LIMITED_STRING(obj, n)