MCPcopy Create free account
hub / github.com/boostorg/pfr / test_write_read

Function test_write_read

test/core/run/read_write.cpp:14–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12
13template <class T>
14void test_write_read(const T& value) {
15 T result;
16 std::stringstream ss;
17 ss << boost::pfr::io(value);
18 ss >> boost::pfr::io(result);
19 BOOST_TEST_EQ(value.f0, result.f0);
20 BOOST_TEST_EQ(value.f1, result.f1);
21 BOOST_TEST_EQ(value.f2, result.f2);
22 BOOST_TEST_EQ(value.f3, result.f3);
23 BOOST_TEST_EQ(value.f4, result.f4);
24}
25
26template <class T>
27void to_string_test(const T& value, const char* ethalon) {

Callers 1

test_typeFunction · 0.70

Calls 1

ioFunction · 0.85

Tested by

no test coverage detected