BIND 10 trac2000, updated. 916893ac37eeeb169c90c7cf374630a7cfba127b [2000] Add another toWire() test
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Jan 27 08:36:44 UTC 2014
The branch, trac2000 has been updated
via 916893ac37eeeb169c90c7cf374630a7cfba127b (commit)
from 0408d1e6472105cb9c762ac3ef7082d47dc6a720 (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 916893ac37eeeb169c90c7cf374630a7cfba127b
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Jan 27 14:06:30 2014 +0530
[2000] Add another toWire() test
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/tests/rdata_opt_unittest.cc | 32 +++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
-----------------------------------------------------------------------
diff --git a/src/lib/dns/tests/rdata_opt_unittest.cc b/src/lib/dns/tests/rdata_opt_unittest.cc
index 756f8d3..49d3068 100644
--- a/src/lib/dns/tests/rdata_opt_unittest.cc
+++ b/src/lib/dns/tests/rdata_opt_unittest.cc
@@ -154,6 +154,38 @@ TEST_F(Rdata_OPT_Test, appendPseudoRR) {
const std::vector<uint8_t> buffer((1 << 16) - 1);
EXPECT_THROW(rdata_opt.appendPseudoRR(0x0044, &buffer[0], buffer.size()),
isc::InvalidParameter);
+
+ const uint8_t rdata_opt_wiredata2[] = {
+ // OPTION #1
+ // ` Option code
+ 0x00, 0x42,
+ // ` Option length
+ 0x00, 0x00,
+
+ // OPTION #2
+ // ` Option code
+ 0x00, 0x43,
+ // ` Option length
+ 0x00, 0x05,
+ // ` Option data
+ 'H', 'e', 'l', 'l', 'o',
+
+ // OPTION #3
+ // ` Option code
+ 0x00, 0x42,
+ // ` Option length
+ 0x00, 0x05,
+ // ` Option data
+ 'H', 'e', 'l', 'l', 'o'
+ };
+
+ obuffer.clear();
+ rdata_opt.toWire(obuffer);
+
+ EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
+ obuffer.getData(),
+ obuffer.getLength(),
+ rdata_opt_wiredata2, sizeof(rdata_opt_wiredata2));
}
TEST_F(Rdata_OPT_Test, getPseudoRRs) {
More information about the bind10-changes
mailing list