BIND 10 trac2096, updated. 8131de02fde6e3948a765a37b660e276d0afa146 [2096] The RdataReader::getSize
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Aug 10 11:22:37 UTC 2012
The branch, trac2096 has been updated
via 8131de02fde6e3948a765a37b660e276d0afa146 (commit)
from 6bcd73aa1c0ef3f2ea13b6aa87f003db437d55f0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8131de02fde6e3948a765a37b660e276d0afa146
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Fri Aug 10 13:21:54 2012 +0200
[2096] The RdataReader::getSize
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/memory/rdata_reader.h | 2 +-
.../memory/tests/rdata_serialization_unittest.cc | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/rdata_reader.h b/src/lib/datasrc/memory/rdata_reader.h
index ff63102..a70d675 100644
--- a/src/lib/datasrc/memory/rdata_reader.h
+++ b/src/lib/datasrc/memory/rdata_reader.h
@@ -251,7 +251,7 @@ public:
/// \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_;
diff --git a/src/lib/datasrc/memory/tests/rdata_serialization_unittest.cc b/src/lib/datasrc/memory/tests/rdata_serialization_unittest.cc
index 6f0e8a5..ef6d401 100644
--- a/src/lib/datasrc/memory/tests/rdata_serialization_unittest.cc
+++ b/src/lib/datasrc/memory/tests/rdata_serialization_unittest.cc
@@ -468,6 +468,8 @@ public:
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();
@@ -492,6 +494,8 @@ public:
// 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());
}
};
More information about the bind10-changes
mailing list