Changeset View
Changeset View
Standalone View
Standalone View
src/test/dbwrapper_tests.cpp
Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | BOOST_AUTO_TEST_CASE(iterator_ordering) { | ||||
} | } | ||||
} | } | ||||
struct StringContentsSerializer { | struct StringContentsSerializer { | ||||
// Used to make two serialized objects the same while letting them have a | // Used to make two serialized objects the same while letting them have a | ||||
// different lengths. This is a terrible idea. | // different lengths. This is a terrible idea. | ||||
std::string str; | std::string str; | ||||
StringContentsSerializer() {} | StringContentsSerializer() {} | ||||
StringContentsSerializer(const std::string &inp) : str(inp) {} | explicit StringContentsSerializer(const std::string &inp) : str(inp) {} | ||||
StringContentsSerializer &operator+=(const std::string &s) { | StringContentsSerializer &operator+=(const std::string &s) { | ||||
str += s; | str += s; | ||||
return *this; | return *this; | ||||
} | } | ||||
StringContentsSerializer &operator+=(const StringContentsSerializer &s) { | StringContentsSerializer &operator+=(const StringContentsSerializer &s) { | ||||
return *this += s.str; | return *this += s.str; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |