BIND 10 trac3173, updated. 82a00e6ef79987b9de80c0b63950a8389592b3dc [3173] Improved comments in the CommandOptions unit tests.

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Sep 23 13:16:03 UTC 2013


The branch, trac3173 has been updated
       via  82a00e6ef79987b9de80c0b63950a8389592b3dc (commit)
       via  97c7bb8690967c253151462c72af68ec64da3bea (commit)
       via  33b1dda3335b747ca6fa0fb3fa421b50de867ce3 (commit)
      from  ef4ae0b32f759f25ba8fc20f1213406115fc6502 (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 82a00e6ef79987b9de80c0b63950a8389592b3dc
Author: Marcin Siodelski <marcin at isc.org>
Date:   Mon Sep 23 15:15:17 2013 +0200

    [3173] Improved comments in the CommandOptions unit tests.

commit 97c7bb8690967c253151462c72af68ec64da3bea
Author: Marcin Siodelski <marcin at isc.org>
Date:   Mon Sep 23 14:59:13 2013 +0200

    [3173] Minor: fixed typos in perfdhcp files.

commit 33b1dda3335b747ca6fa0fb3fa421b50de867ce3
Author: Marcin Siodelski <marcin at isc.org>
Date:   Mon Sep 23 14:53:24 2013 +0200

    [3173] Refactor: rename ADDRESS_ONLY and PREFIX_ONLY in LeaseType.

-----------------------------------------------------------------------

Summary of changes:
 tests/tools/perfdhcp/command_options.cc            |   16 ++--
 tests/tools/perfdhcp/command_options.h             |   15 ++--
 tests/tools/perfdhcp/test_control.cc               |    8 +-
 tests/tools/perfdhcp/test_control.h                |   20 ++---
 .../perfdhcp/tests/command_options_unittest.cc     |   89 +++++++++++++-------
 .../tools/perfdhcp/tests/test_control_unittest.cc  |   14 +--
 6 files changed, 95 insertions(+), 67 deletions(-)

-----------------------------------------------------------------------
diff --git a/tests/tools/perfdhcp/command_options.cc b/tests/tools/perfdhcp/command_options.cc
index f23a433..64de43d 100644
--- a/tests/tools/perfdhcp/command_options.cc
+++ b/tests/tools/perfdhcp/command_options.cc
@@ -33,7 +33,7 @@ namespace isc {
 namespace perfdhcp {
 
 CommandOptions::LeaseType::LeaseType()
-    : type_(ADDRESS_ONLY) {
+    : type_(ADDRESS) {
 }
 
 CommandOptions::LeaseType::LeaseType(const Type lease_type)
@@ -58,10 +58,10 @@ CommandOptions::LeaseType::set(const Type lease_type) {
 void
 CommandOptions::LeaseType::fromCommandLine(const std::string& cmd_line_arg) {
     if (cmd_line_arg == "address-only") {
-        type_ = ADDRESS_ONLY;
+        type_ = ADDRESS;
 
     } else if (cmd_line_arg == "prefix-only") {
-        type_ = PREFIX_ONLY;
+        type_ = PREFIX;
 
     } else if (cmd_line_arg == "address-and-prefix") {
         type_ = ADDRESS_AND_PREFIX;
@@ -76,9 +76,9 @@ CommandOptions::LeaseType::fromCommandLine(const std::string& cmd_line_arg) {
 std::string
 CommandOptions::LeaseType::toText() const {
     switch (type_) {
-    case ADDRESS_ONLY:
+    case ADDRESS:
         return ("address-only (IA_NA option added to the client's request)");
-    case PREFIX_ONLY:
+    case PREFIX:
         return ("prefix-only (IA_PD option added to the client's request)");
     case ADDRESS_AND_PREFIX:
         return ("address-and-prefix (Both IA_NA and IA_PD options added to the"
@@ -109,7 +109,7 @@ CommandOptions::reset() {
     // will need to reset all members many times to perform unit tests
     ipversion_ = 0;
     exchange_mode_ = DORA_SARR;
-    lease_type_.set(LeaseType::ADDRESS_ONLY);
+    lease_type_.set(LeaseType::ADDRESS);
     rate_ = 0;
     report_delay_ = 0;
     clients_num_ = 0;
@@ -682,11 +682,11 @@ CommandOptions::validate() const {
           "-6 (IPv6) must be set to use -c");
     check((getExchangeMode() == DO_SA) && (getNumRequests().size() > 1),
           "second -n<num-request> is not compatible with -i");
-    check((getIpVersion() == 4) && !getLeaseType().is(LeaseType::ADDRESS_ONLY),
+    check((getIpVersion() == 4) && !getLeaseType().is(LeaseType::ADDRESS),
           "-6 option must be used if lease type other than '-e address-only'"
           " is specified");
     check(!getTemplateFiles().empty() &&
-          !getLeaseType().is(LeaseType::ADDRESS_ONLY),
+          !getLeaseType().is(LeaseType::ADDRESS),
           "template files may be only used with '-e address-only'");
     check((getExchangeMode() == DO_SA) && (getDropTime()[1] != 1.),
           "second -d<drop-time> is not compatible with -i");
diff --git a/tests/tools/perfdhcp/command_options.h b/tests/tools/perfdhcp/command_options.h
index 242d1a5..7431057 100644
--- a/tests/tools/perfdhcp/command_options.h
+++ b/tests/tools/perfdhcp/command_options.h
@@ -1,3 +1,4 @@
+
 // Copyright (C) 2012-2013 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
@@ -42,8 +43,8 @@ public:
 
         /// The lease type code.
         enum Type {
-            ADDRESS_ONLY,
-            PREFIX_ONLY,
+            ADDRESS,
+            PREFIX,
             ADDRESS_AND_PREFIX
         };
 
@@ -68,8 +69,8 @@ public:
         /// specified from the command line, the address or prefix
         /// (IA_NA or IA_PD) option should be sent to the server.
         /// For example, if user specified '-e address-and-prefix' in the
-        /// command line this function will return true for both ADDRESS_ONLY
-        /// and PREFIX_ONLY, because both address and prefix is requested from
+        /// command line this function will return true for both ADDRESS
+        /// and PREFIX, because both address and prefix is requested from
         /// the server.
         ///
         /// \param lease_type A lease type.
@@ -481,7 +482,7 @@ private:
     /// Indicates number of -d<value> parameters specified by user.
     /// If this value goes above 2, command line parsing fails.
     uint8_t drop_time_set_;
-    /// Time to elapse before request is lost. The fisrt value of
+    /// Time to elapse before request is lost. The first value of
     /// two-element vector refers to DO/SA exchanges,
     /// second value refers to RA/RR. Default values are { 1, 1 }
     std::vector<double> drop_time_;
@@ -518,12 +519,12 @@ private:
     /// Indicates that we take server id from first received packet.
     bool use_first_;
     /// Packet template file names. These files store template packets
-    /// that are used for initiating echanges. Template packets
+    /// that are used for initiating exchanges. Template packets
     /// read from files are later tuned with variable data.
     std::vector<std::string> template_file_;
     /// Offset of transaction id in template files. First vector
     /// element points to offset for DISCOVER/SOLICIT messages,
-    /// second element points to trasaction id offset for
+    /// second element points to transaction id offset for
     /// REQUEST messages
     std::vector<int> xid_offset_;
     /// Random value offset in templates. Random value offset
diff --git a/tests/tools/perfdhcp/test_control.cc b/tests/tools/perfdhcp/test_control.cc
index acbc619..4f9f63e 100644
--- a/tests/tools/perfdhcp/test_control.cc
+++ b/tests/tools/perfdhcp/test_control.cc
@@ -105,7 +105,7 @@ TestControl::copyIaOptions(const Pkt6Ptr& pkt_from, Pkt6Ptr& pkt_to) {
     }
     // IA_NA
     if (CommandOptions::instance().getLeaseType()
-        .includes(CommandOptions::LeaseType::ADDRESS_ONLY)) {
+        .includes(CommandOptions::LeaseType::ADDRESS)) {
         OptionPtr option = pkt_from->getOption(D6O_IA_NA);
         if (!option) {
             isc_throw(OptionNotFound, "IA_NA option not found in the"
@@ -115,7 +115,7 @@ TestControl::copyIaOptions(const Pkt6Ptr& pkt_from, Pkt6Ptr& pkt_to) {
     }
     // IA_PD
     if (CommandOptions::instance().getLeaseType()
-        .includes(CommandOptions::LeaseType::PREFIX_ONLY)) {
+        .includes(CommandOptions::LeaseType::PREFIX)) {
         OptionPtr option = pkt_from->getOption(D6O_IA_PD);
         if (!option) {
             isc_throw(OptionNotFound, "IA_PD option not found in the"
@@ -1789,12 +1789,12 @@ TestControl::sendSolicit6(const TestControlSocket& socket,
 
     // IA_NA
     if (CommandOptions::instance().getLeaseType()
-        .includes(CommandOptions::LeaseType::ADDRESS_ONLY)) {
+        .includes(CommandOptions::LeaseType::ADDRESS)) {
         pkt6->addOption(Option::factory(Option::V6, D6O_IA_NA));
     }
     // IA_PD
     if (CommandOptions::instance().getLeaseType()
-        .includes(CommandOptions::LeaseType::PREFIX_ONLY)) {
+        .includes(CommandOptions::LeaseType::PREFIX)) {
         pkt6->addOption(Option::factory(Option::V6, D6O_IA_PD));
     }
 
diff --git a/tests/tools/perfdhcp/test_control.h b/tests/tools/perfdhcp/test_control.h
index 99fb698..ad2e31f 100644
--- a/tests/tools/perfdhcp/test_control.h
+++ b/tests/tools/perfdhcp/test_control.h
@@ -167,7 +167,7 @@ public:
         /// \param socket socket descriptor.
         TestControlSocket(const int socket);
 
-        /// \brief Destriuctor of the socket wrapper class.
+        /// \brief Destructor of the socket wrapper class.
         ///
         /// Destructor closes wrapped socket.
         ~TestControlSocket();
@@ -204,7 +204,7 @@ public:
     /// The default generator pointer.
     typedef boost::shared_ptr<NumberGenerator> NumberGeneratorPtr;
 
-    /// \brief Sequential numbers generatorc class.
+    /// \brief Sequential numbers generator class.
     class SequentialGenerator : public NumberGenerator {
     public:
         /// \brief Constructor.
@@ -220,7 +220,7 @@ public:
             }
         }
 
-        /// \brief Generate number sequentialy.
+        /// \brief Generate number sequentially.
         ///
         /// \return generated number.
         virtual uint32_t generate() {
@@ -248,7 +248,7 @@ public:
     /// brief\ Run performance test.
     ///
     /// Method runs whole performance test. Command line options must
-    /// be parsed prior to running this function. Othewise function will
+    /// be parsed prior to running this function. Otherwise function will
     /// throw exception.
     ///
     /// \throw isc::InvalidOperation if command line options are not parsed.
@@ -287,7 +287,7 @@ protected:
     /// only via \ref instance method.
     TestControl();
 
-    /// \brief Check if test exit condtitions fulfilled.
+    /// \brief Check if test exit conditions fulfilled.
     ///
     /// Method checks if the test exit conditions are fulfilled.
     /// Exit conditions are checked periodically from the
@@ -389,7 +389,7 @@ protected:
 
     /// \brief Factory function to create DHCPv4 Request List option.
     ///
-    /// This factory function creayes DHCPv4 PARAMETER_REQUEST_LIST option
+    /// This factory function creates DHCPv4 PARAMETER_REQUEST_LIST option
     /// instance with the following set of requested options:
     /// - DHO_SUBNET_MASK,
     /// - DHO_BROADCAST_ADDRESS,
@@ -545,7 +545,7 @@ protected:
     /// \brief Process received DHCPv6 packet.
     ///
     /// Method performs processing of the received DHCPv6 packet,
-    /// updates statistics and responsds to the server if required,
+    /// updates statistics and responds to the server if required,
     /// e.g. when ADVERTISE packet arrives, this function will initiate
     /// REQUEST message to the server.
     ///
@@ -596,7 +596,7 @@ protected:
     /// \brief Register option factory functions for DHCPv4 or DHCPv6.
     ///
     /// Method registers option factory functions for DHCPv4 or DHCPv6,
-    /// depending in whch mode test is currently running.
+    /// depending in which mode test is currently running.
     void registerOptionFactories() const;
 
 
@@ -630,7 +630,7 @@ protected:
     /// type and keeps them around until test finishes. Then they
     /// are printed to the user. If packet of specified type has
     /// been already stored this function perfroms no operation.
-    /// This function does not perform sainty check if packet
+    /// This function does not perform sanity check if packet
     /// pointer is valid. Make sure it is before calling it.
     ///
     /// \param pkt packet to be stored.
@@ -869,7 +869,7 @@ private:
     /// \warning
     ///
     /// \param [in] pkt_from A packet from which options should be copied.
-    /// \parma [out] pkt_to A packet to which options should be copied.
+    /// \param [out] pkt_to A packet to which options should be copied.
     ///
     /// \throw isc::perfdhcp::OptionNotFound if a required option is not
     /// found in the packet from which options should be copied.
diff --git a/tests/tools/perfdhcp/tests/command_options_unittest.cc b/tests/tools/perfdhcp/tests/command_options_unittest.cc
index 3b14527..d323782 100644
--- a/tests/tools/perfdhcp/tests/command_options_unittest.cc
+++ b/tests/tools/perfdhcp/tests/command_options_unittest.cc
@@ -28,82 +28,110 @@ using namespace isc;
 using namespace isc::perfdhcp;
 using namespace boost::posix_time;
 
+// Verify that default constructor sets lease type to the expected value.
 TEST(LeaseTypeTest, defaultConstructor) {
     CommandOptions::LeaseType lease_type;
-    EXPECT_TRUE(lease_type.is(CommandOptions::LeaseType::ADDRESS_ONLY));
+    EXPECT_TRUE(lease_type.is(CommandOptions::LeaseType::ADDRESS));
 }
 
+// Verify that the constructor sets the lease type to the specified value.
 TEST(LeaseTypeTest, constructor) {
     CommandOptions::LeaseType
-        lease_type1(CommandOptions::LeaseType::ADDRESS_ONLY);
-    EXPECT_TRUE(lease_type1.is(CommandOptions::LeaseType::ADDRESS_ONLY));
+        lease_type1(CommandOptions::LeaseType::ADDRESS);
+    EXPECT_TRUE(lease_type1.is(CommandOptions::LeaseType::ADDRESS));
 
     CommandOptions::LeaseType
-        lease_type2(CommandOptions::LeaseType::PREFIX_ONLY);
-    EXPECT_TRUE(lease_type2.is(CommandOptions::LeaseType::PREFIX_ONLY));
+        lease_type2(CommandOptions::LeaseType::PREFIX);
+    EXPECT_TRUE(lease_type2.is(CommandOptions::LeaseType::PREFIX));
 }
 
+// Verify that the lease type can be modified using set() function.
 TEST(LeaseTypeTest, set) {
     CommandOptions::LeaseType
-        lease_type(CommandOptions::LeaseType::ADDRESS_ONLY);
-    EXPECT_TRUE(lease_type.is(CommandOptions::LeaseType::ADDRESS_ONLY));
+        lease_type(CommandOptions::LeaseType::ADDRESS);
+    EXPECT_TRUE(lease_type.is(CommandOptions::LeaseType::ADDRESS));
 
-    lease_type.set(CommandOptions::LeaseType::PREFIX_ONLY);
-    EXPECT_TRUE(lease_type.is(CommandOptions::LeaseType::PREFIX_ONLY));
+    lease_type.set(CommandOptions::LeaseType::PREFIX);
+    EXPECT_TRUE(lease_type.is(CommandOptions::LeaseType::PREFIX));
 }
 
+// Verify that the includes() function returns true when the lease type
+// specified with the function argument is the same as the lease type
+// encapsulated by the LeaseType object on which include function is called
+// or when the lease type value encapsulated by this object is
+// ADDRESS_AND_PREFIX.
 TEST(LeaseTypeTest, includes) {
-    CommandOptions::LeaseType
-        lease_type(CommandOptions::LeaseType::ADDRESS_ONLY);
-    ASSERT_TRUE(lease_type.is(CommandOptions::LeaseType::ADDRESS_ONLY));
-    EXPECT_TRUE(lease_type.includes(CommandOptions::LeaseType::ADDRESS_ONLY));
-    EXPECT_FALSE(lease_type.includes(CommandOptions::LeaseType::PREFIX_ONLY));
+    // Lease type: ADDRESS
+    CommandOptions::LeaseType lease_type(CommandOptions::LeaseType::ADDRESS);
+    // Lease type IS ADDRESS.
+    ASSERT_TRUE(lease_type.is(CommandOptions::LeaseType::ADDRESS));
+    // Lease type includes the ADDRESS.
+    EXPECT_TRUE(lease_type.includes(CommandOptions::LeaseType::ADDRESS));
+    // Lease type does not include PREFIX.
+    EXPECT_FALSE(lease_type.includes(CommandOptions::LeaseType::PREFIX));
+    // Lease type does not include ADDRESS_AND_PREFIX.
     EXPECT_FALSE(
         lease_type.includes(CommandOptions::LeaseType::ADDRESS_AND_PREFIX)
     );
 
-    lease_type.set(CommandOptions::LeaseType::PREFIX_ONLY);
-    EXPECT_FALSE(lease_type.includes(CommandOptions::LeaseType::ADDRESS_ONLY));
-    EXPECT_TRUE(lease_type.includes(CommandOptions::LeaseType::PREFIX_ONLY));
+    // Do the same check for PREFIX.
+    lease_type.set(CommandOptions::LeaseType::PREFIX);
+    EXPECT_FALSE(lease_type.includes(CommandOptions::LeaseType::ADDRESS));
+    EXPECT_TRUE(lease_type.includes(CommandOptions::LeaseType::PREFIX));
     EXPECT_FALSE(
         lease_type.includes(CommandOptions::LeaseType::ADDRESS_AND_PREFIX)
     );
 
+    // When lease type is set to 'address-and-prefix' it means that client
+    // requests both address and prefix (IA_NA and IA_PD). Therefore, the
+    // LeaseType::includes() function should return true for both ADDRESS
+    // and PREFIX.
     lease_type.set(CommandOptions::LeaseType::ADDRESS_AND_PREFIX);
-    EXPECT_TRUE(lease_type.includes(CommandOptions::LeaseType::ADDRESS_ONLY));
-    EXPECT_TRUE(lease_type.includes(CommandOptions::LeaseType::PREFIX_ONLY));
+    EXPECT_TRUE(lease_type.includes(CommandOptions::LeaseType::ADDRESS));
+    EXPECT_TRUE(lease_type.includes(CommandOptions::LeaseType::PREFIX));
     EXPECT_TRUE(
         lease_type.includes(CommandOptions::LeaseType::ADDRESS_AND_PREFIX)
     );
 
 }
 
-
+// Verify that the LeaseType::fromCommandLine() function parses the lease-type
+// argument specified as -e<lease-type>.
 TEST(LeaseTypeTest, fromCommandLine) {
     CommandOptions::LeaseType
-        lease_type(CommandOptions::LeaseType::ADDRESS_ONLY);
-    ASSERT_TRUE(lease_type.is(CommandOptions::LeaseType::ADDRESS_ONLY));
+        lease_type(CommandOptions::LeaseType::ADDRESS);
+    ASSERT_TRUE(lease_type.is(CommandOptions::LeaseType::ADDRESS));
 
     lease_type.fromCommandLine("prefix-only");
-    ASSERT_TRUE(lease_type.is(CommandOptions::LeaseType::PREFIX_ONLY));
+    ASSERT_TRUE(lease_type.is(CommandOptions::LeaseType::PREFIX));
 
     lease_type.fromCommandLine("address-only");
-    EXPECT_TRUE(lease_type.is(CommandOptions::LeaseType::ADDRESS_ONLY));
+    EXPECT_TRUE(lease_type.is(CommandOptions::LeaseType::ADDRESS));
+
+    lease_type.fromCommandLine("address-and-prefix");
+    EXPECT_TRUE(lease_type.is(CommandOptions::LeaseType::ADDRESS_AND_PREFIX));
 
     EXPECT_THROW(lease_type.fromCommandLine("bogus-parameter"),
                  isc::InvalidParameter);
 
 }
 
+// Verify that the LeaseType::toText() function returns the textual
+// representation of the lease type specified.
 TEST(LeaseTypeTest, toText) {
     CommandOptions::LeaseType lease_type;
-    ASSERT_TRUE(lease_type.is(CommandOptions::LeaseType::ADDRESS_ONLY));
+    ASSERT_TRUE(lease_type.is(CommandOptions::LeaseType::ADDRESS));
     EXPECT_EQ("address-only (IA_NA option added to the client's request)",
               lease_type.toText());
 
-    lease_type.set(CommandOptions::LeaseType::PREFIX_ONLY);
+    lease_type.set(CommandOptions::LeaseType::PREFIX);
     EXPECT_EQ("prefix-only (IA_PD option added to the client's request)",
               lease_type.toText());
+
+    lease_type.set(CommandOptions::LeaseType::ADDRESS_AND_PREFIX);
+    EXPECT_EQ("address-and-prefix (Both IA_NA and IA_PD options added to the"
+              " client's request)", lease_type.toText());
+
 }
 
 /// \brief Test Fixture Class
@@ -138,8 +166,7 @@ protected:
         EXPECT_NO_THROW(process("perfdhcp 192.168.0.1"));
         EXPECT_EQ(4, opt.getIpVersion());
         EXPECT_EQ(CommandOptions::DORA_SARR, opt.getExchangeMode());
-        EXPECT_TRUE(opt.getLeaseType()
-                    .is(CommandOptions::LeaseType::ADDRESS_ONLY));
+        EXPECT_TRUE(opt.getLeaseType().is(CommandOptions::LeaseType::ADDRESS));
         EXPECT_EQ(0, opt.getRate());
         EXPECT_EQ(0, opt.getReportDelay());
         EXPECT_EQ(0, opt.getClientsNum());
@@ -267,17 +294,17 @@ TEST_F(CommandOptionsTest, LeaseType) {
     ASSERT_NO_THROW(process("perfdhcp -6 -l etx -e address-only all"));
     EXPECT_EQ(6, opt.getIpVersion());
     EXPECT_EQ("etx", opt.getLocalName());
-    EXPECT_TRUE(opt.getLeaseType().is(CommandOptions::LeaseType::ADDRESS_ONLY));
+    EXPECT_TRUE(opt.getLeaseType().is(CommandOptions::LeaseType::ADDRESS));
     // Check that the -e address-only works for IPv4.
     ASSERT_NO_THROW(process("perfdhcp -4 -l etx -e address-only all"));
     EXPECT_EQ(4, opt.getIpVersion());
     EXPECT_EQ("etx", opt.getLocalName());
-    EXPECT_TRUE(opt.getLeaseType().is(CommandOptions::LeaseType::ADDRESS_ONLY));
+    EXPECT_TRUE(opt.getLeaseType().is(CommandOptions::LeaseType::ADDRESS));
     // Check that the -e prefix-only works.
     ASSERT_NO_THROW(process("perfdhcp -6 -l etx -e prefix-only all"));
     EXPECT_EQ(6, opt.getIpVersion());
     EXPECT_EQ("etx", opt.getLocalName());
-    EXPECT_TRUE(opt.getLeaseType().is(CommandOptions::LeaseType::PREFIX_ONLY));
+    EXPECT_TRUE(opt.getLeaseType().is(CommandOptions::LeaseType::PREFIX));
     // Check that -e prefix-only must not coexist with -4 option.
     EXPECT_THROW(process("perfdhcp -4 -l ethx -e prefix-only all"),
                  InvalidParameter);
diff --git a/tests/tools/perfdhcp/tests/test_control_unittest.cc b/tests/tools/perfdhcp/tests/test_control_unittest.cc
index 5f7ecd5..8fe872d 100644
--- a/tests/tools/perfdhcp/tests/test_control_unittest.cc
+++ b/tests/tools/perfdhcp/tests/test_control_unittest.cc
@@ -40,7 +40,7 @@ using namespace isc::perfdhcp;
 class NakedTestControl: public TestControl {
 public:
 
-    /// \brief Incremental transaction id generaator.
+    /// \brief Incremental transaction id generator.
     ///
     /// This is incremental transaction id generator. It overrides
     /// the default transaction id generator that generates transaction
@@ -123,7 +123,7 @@ public:
     /// truncated.
     ///
     /// \param filename template file to be created.
-    /// \param buffer with binary datato be stored in file.
+    /// \param buffer with binary data to be stored in file.
     /// \param size target size of the file.
     /// \param invalid_chars inject invalid chars to the template file.
     /// \return true if file creation successful.
@@ -283,7 +283,7 @@ public:
 
     /// brief Test generation of mulitple DUIDs
     ///
-    /// Thie method checks the generation of multiple DUIDs. Number
+    /// This method checks the generation of multiple DUIDs. Number
     /// of iterations depends on the number of simulated clients.
     /// It is expected that DUID's size is 14 (consists of DUID-LLT
     /// HW type field, 4 octets of time value and MAC address). The
@@ -497,7 +497,7 @@ public:
 
         // Incremental transaction id generator will generate
         // predictable values of transaction id for each iteration.
-        // This is important because we need to simulate reponses
+        // This is important because we need to simulate responses
         // from the server and use the same transaction ids as in
         // packets sent by client.
         TestControl::NumberGeneratorPtr
@@ -656,13 +656,13 @@ private:
         boost::shared_ptr<Pkt6> advertise(new Pkt6(DHCPV6_ADVERTISE, transid));
         // Add IA_NA if requested by the client.
         if (CommandOptions::instance().getLeaseType()
-            .includes(CommandOptions::LeaseType::ADDRESS_ONLY)) {
+            .includes(CommandOptions::LeaseType::ADDRESS)) {
             OptionPtr opt_ia_na = Option::factory(Option::V6, D6O_IA_NA);
             advertise->addOption(opt_ia_na);
         }
         // Add IA_PD if requested by the client.
         if (CommandOptions::instance().getLeaseType()
-            .includes(CommandOptions::LeaseType::PREFIX_ONLY)) {
+            .includes(CommandOptions::LeaseType::PREFIX)) {
             OptionPtr opt_ia_pd = Option::factory(Option::V6, D6O_IA_PD);
             advertise->addOption(opt_ia_pd);
         }
@@ -754,7 +754,7 @@ TEST_F(TestControlTest, Options4) {
 
     // Get the option buffer. It should hold the combination of values
     // listed in requested_options array. However their order can be
-    // different in general so we need to search each value separatelly.
+    // different in general so we need to search each value separately.
     const OptionBuffer& requested_options_buf =
         opt_requested_options->getData();
     EXPECT_EQ(requested_options_ref.size(), requested_options_buf.size());



More information about the bind10-changes mailing list