From 965c89d7a29e1a6bb2b794c9ffa4fa1980e84b87 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 19 Aug 2024 14:03:47 +0200 Subject: [PATCH] added: (restart-)serialization test for MixingRateControls --- tests/test_RestartSerialization.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/test_RestartSerialization.cpp b/tests/test_RestartSerialization.cpp index 99492dbe2..4d3b9ec28 100644 --- a/tests/test_RestartSerialization.cpp +++ b/tests/test_RestartSerialization.cpp @@ -246,8 +246,24 @@ BOOST_AUTO_TEST_CASE(FlowGenericProblem) decltype(data_out) data_in(eclState, schedule, gridView); ser.unpack(data_in); const size_t pos2 = ser.position(); - BOOST_CHECK_MESSAGE(pos1 == pos2, "Packed size differ from unpack size for EclGenericProblem"); - BOOST_CHECK_MESSAGE(data_out == data_in, "Deserialized EclGenericProblem differ"); + BOOST_CHECK_MESSAGE(pos1 == pos2, "Packed size differ from unpack size for FlowGenericProblem"); + BOOST_CHECK_MESSAGE(data_out == data_in, "Deserialized FlowGenericProblem differ"); +} + +BOOST_AUTO_TEST_CASE(MixingRateControls) +{ + Opm::Schedule schedule; + using FS = Opm::BlackOilFluidSystem; + auto data_out = Opm::MixingRateControls::serializationTestObject(schedule); + Opm::Serialization::MemPacker packer; + Opm::Serializer ser(packer); + ser.pack(data_out); + const size_t pos1 = ser.position(); + decltype(data_out) data_in(schedule); + ser.unpack(data_in); + const size_t pos2 = ser.position(); + BOOST_CHECK_MESSAGE(pos1 == pos2, "Packed size differ from unpack size for MixingRateControls"); + BOOST_CHECK_MESSAGE(data_out == data_in, "Deserialized MixingRateControls differ"); } #if HAVE_DUNE_FEM