31 #include "storages/serializeble_struct_helper.h" 51 BEGIN_NAMED_SERIALIZE_MAP()
52 SERIALIZE_STL_ANSI_STRING(
m_str)
58 END_NAMED_SERIALIZE_MAP()
65 if( b.m_str !=
a.m_str
66 || b.m_uint !=
a.m_uint
67 || b.m_bool !=
a.m_bool
68 || b.m_list_of_str !=
a.m_list_of_str
69 || b.m_list_of_int !=
a.m_list_of_int
70 || b.m_list_of_self !=
a.m_list_of_self
78 test_struct t = boost::value_initialized<test_struct>();
80 t.
m_str =
"ackamdc'kmecemcececmacmecmcm[aicm[oeicm[oeicm[qaicm[qoe";
82 for(
int i = 0; i!=500; i++)
85 for(
int i = 0; i!=500; i++)
88 for(
int i = 0; i!=5; i++)
105 boost::filesystem::path storage_folder = tests_folder;
106 storage_folder /=
"storages";
113 bool res = epee::StorageNamed::load_struct_from_storage_file(
t2, (storage_folder /+
"valid_storage.bin").
string());
116 LOG_PRINT_L0(
"Comparing generated and loaded test struct...");
122 res = epee::StorageNamed::load_struct_from_storage_file(
t3, (storage_folder /+
"invalid_storage_1.bin").
string());
127 res = epee::StorageNamed::load_struct_from_storage_file(
t3, (storage_folder /+
"invalid_storage_2.bin").
string());
131 res = epee::StorageNamed::load_struct_from_storage_file(
t3, (storage_folder /+
"invalid_storage_3.bin").
string());
135 res = epee::StorageNamed::load_struct_from_storage_file(
t3, (storage_folder /+
"invalid_storage_4.bin").
string());
test_struct get_test_struct()
hsection open_section(const std::string §ion_name, hsection hparent_section, bool create_if_notexist=false)
bool test_storages(const std::string &tests_folder)
bool get_value(const std::string &value_name, t_value &val, hsection hparent_section)
std::list< int > m_list_of_int
#define CHECK_AND_ASSERT_MES(expr, fail_ret_val, message)
std::list< std::string > m_list_of_str
unsigned __int64 uint64_t
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
std::list< test_struct > m_list_of_self