| 31 | } |
| 32 | |
| 33 | static void DoDecodeEncode(const TPackUnpackCase& case_) { |
| 34 | auto* const codec = NBlockCodecs::Codec(case_.GetCodecName()); |
| 35 | Y_ENSURE(codec); |
| 36 | |
| 37 | TMemoryInput mi(case_.GetData().data(), case_.GetData().size()); |
| 38 | TDecodedInput di(&mi, codec); |
| 39 | TStringStream decoded; |
| 40 | TransferData(&di, &decoded); |
| 41 | TNullOutput no; |
| 42 | TCountingOutput cno(&no); |
| 43 | TCodedOutput co(&cno, codec, case_.GetBufferLength()); |
| 44 | TransferData(&decoded, &co); |
| 45 | co.Flush(); |
| 46 | |
| 47 | Y_ABORT_UNLESS((case_.GetData().size() > 0) == (cno.Counter() > 0)); |
| 48 | Y_ABORT_UNLESS((case_.GetData().size() > 0) == (decoded.Str().size() > 0)); |
| 49 | } |
| 50 | |
| 51 | static void DoEncodeDecode(const TPackUnpackCase& case_) { |
| 52 | auto* const codec = NBlockCodecs::Codec(case_.GetCodecName()); |
no test coverage detected