Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
chainbase_fixture.hpp
Go to the documentation of this file.
1
#include <
chainbase/chainbase.hpp
>
2
#include <
fc/filesystem.hpp
>
3
4
#include <memory>
5
6
namespace
sysio
{
namespace
testing
{
7
13
template
<u
int
64_t MAX_SIZE>
14
struct
chainbase_fixture
{
15
chainbase_fixture
()
16
:
_tempdir
()
17
,
_db
(
std
::make_unique<
chainbase
::
database
>(
_tempdir
.
path
(),
chainbase
::
database
::
read_write
, MAX_SIZE))
18
{
19
}
20
21
~chainbase_fixture
()
22
{
23
_db
.reset();
24
_tempdir
.
remove
();
25
}
26
27
fc::temp_directory
_tempdir
;
28
std::unique_ptr<chainbase::database>
_db
;
29
};
30
31
} }
// sysio::testing
chainbase.hpp
chainbase::database
Definition
chainbase.hpp:253
fc::path
wraps boost::filesystem::path to provide platform independent path manipulation.
Definition
filesystem.hpp:28
fc::temp_directory
Definition
filesystem.hpp:224
fc::temp_file_base::remove
void remove()
Definition
filesystem.cpp:450
filesystem.hpp
chainbase
Definition
apply_context.hpp:11
fc::read_write
@ read_write
Definition
file_mapping.hpp:15
std
Definition
name.hpp:106
sysio
Definition
abi_serializer.cpp:8
testing
Definition
gmock-actions.h:54
sysio::testing::chainbase_fixture
Definition
chainbase_fixture.hpp:14
sysio::testing::chainbase_fixture::chainbase_fixture
chainbase_fixture()
Definition
chainbase_fixture.hpp:15
sysio::testing::chainbase_fixture::~chainbase_fixture
~chainbase_fixture()
Definition
chainbase_fixture.hpp:21
sysio::testing::chainbase_fixture::_tempdir
fc::temp_directory _tempdir
Definition
chainbase_fixture.hpp:27
sysio::testing::chainbase_fixture::_db
std::unique_ptr< chainbase::database > _db
Definition
chainbase_fixture.hpp:28
libraries
testing
include
sysio
testing
chainbase_fixture.hpp
Generated by
1.12.0