// Copyright 2018 Hans Dembinski // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include #include #include #include #include #include "utility_serialization.hpp" using namespace boost::histogram; template void test_serialization(const char* filename) { auto a = storage_adaptor(); a.reset(3); a[1] += 1; a[2] += 2; print_xml(filename, a); auto b = storage_adaptor(); BOOST_TEST_NOT(a == b); load_xml(filename, b); BOOST_TEST(a == b); } int main() { test_serialization>( XML_PATH "storage_adaptor_serialization_test_vector_int.xml"); test_serialization>( XML_PATH "storage_adaptor_serialization_test_array_unsigned.xml"); test_serialization>( XML_PATH "storage_adaptor_serialization_test_map_double.xml"); test_serialization>>( XML_PATH "storage_adaptor_serialization_test_vector_thread_safe_int.xml"); return boost::report_errors(); }