46 "\x0b\x00\x03\x02\x02\x03\x04\x6e\x61\x6d\x65\x02" 47 "\x03\x03\x61\x67\x65\x03\x03\x02\x03\x04\x66\x72" 48 "\x65\x64\x03\x14\x02\x03\x04\x70\x65\x74\x65\x03" 61 for (
const auto& dyn : roundtrips) {
67 }
catch (
const std::exception& err) {
68 LOG(ERROR) << err.what() <<
"\nInput: " << dyn.typeName() <<
": " << dyn
69 <<
" decoded back as " << decoded.
typeName() <<
": " << decoded
84 <<
"Didn't load template value.\n" 85 <<
"Input: " << template_dynamic.
typeName() <<
": " << template_dynamic
86 <<
" decoded back as " << decoded.
typeName() <<
": " << decoded <<
"\n" 112 LOG(ERROR) <<
"managed to return a length, but only had 3 bytes";
118 EXPECT_EQ(len, 44) <<
"PduLength should be 44, got " << len;
130 for (
uint32_t i = 1;
i < longSerialized.size(); ++
i) {
135 while (j < longSerialized.size()) {
141 auto buf = q.
split(pdu_len);
std::unique_ptr< folly::IOBuf > split(size_t n)
const folly::IOBuf * front() const
void append(std::unique_ptr< folly::IOBuf > &&buf, bool pack=false)
static const dynamic roundtrips[]
#define EXPECT_THROW(statement, expected_exception)
const char * typeName() const
static std::unique_ptr< IOBuf > wrapBuffer(const void *buf, std::size_t capacity)
#define EXPECT_EQ(val1, val2)
size_t decodePduLength(const folly::IOBuf *)
const uint8_t template_blob[]
const value_type * data() const
void hexDump(const void *ptr, size_t size, OutIt out)
static const dynamic template_dynamic
static void array(EmptyArrayTag)
folly::Optional< TemplateMap > templates
std::unordered_map< const folly::dynamic *, folly::dynamic > TemplateMap
folly::dynamic parseBser(folly::StringPiece)
folly::fbstring toBser(folly::dynamic const &, const serialization_opts &)