simplified usage by merging adapter writer/reader with input/output

adapter and ability to disable checks on deserialization
This commit is contained in:
Mindaugas Vinkelis
2019-06-26 16:12:08 +03:00
committed by Mindaugas Vinkelis
parent 1822796f2e
commit 105aa5f9e5
52 changed files with 1479 additions and 1543 deletions

View File

@@ -50,8 +50,8 @@ TEST(SerializeExtensionValueRange, RequiredBitsIsConstexpr) {
#endif
using BPSer = bitsery::BasicSerializer<bitsery::AdapterWriterBitPackingWrapper<Writer>>;
using BPDes = bitsery::BasicDeserializer<bitsery::AdapterReaderBitPackingWrapper<Reader>>;
using BPSer = SerializationContext::TSerializerBPEnabled;
using BPDes = SerializationContext::TDeserializerBPEnabled;
TEST(SerializeExtensionValueRange, IntegerNegative) {
@@ -206,5 +206,5 @@ TEST(SerializeExtensionValueRange, WhenDataIsInvalidThenReturnMinimumRangeValue)
EXPECT_THAT(ctx.getBufferSize(), Eq(1));
EXPECT_THAT(res1, Eq(4));
EXPECT_THAT(ctx.br->error(), Eq(bitsery::ReaderError::InvalidData));
EXPECT_THAT(ctx.des->adapter().error(), Eq(bitsery::ReaderError::InvalidData));
}