/// \brief Returns the size of associated data.
///
/// This just returns whatever was passed to the constructor as size.
- size_t getSize() const;
+ size_t getSize() const { return (size_); }
private:
const NameAction name_action_;
const DataAction data_action_;
boost::bind(renderNameField, &renderer,
additionalRequired(rrtype), _1, _2),
boost::bind(appendData, &data, ¤t, _1, _2));
+ // The size matches
+ EXPECT_EQ(encoded_data.size(), reader.getSize());
if (start_sig) {
current = NULL;
reader.nextSig();
// Render the name and the sigs
renderer.writeName(dummy_name2);
renderer.writeData(&data[0], data.size());
+ // The size matches even after use
+ EXPECT_EQ(encoded_data.size(), reader.getSize());
}
};