From: Tomek Mrugalski Date: Fri, 27 Jan 2017 14:17:10 +0000 (+0100) Subject: [5122] Better error handling in unit-test X-Git-Tag: trac5126_base~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e4b31cdd3136de58dd087397e1b475fad006f7e;p=thirdparty%2Fkea.git [5122] Better error handling in unit-test --- diff --git a/src/bin/dhcp6/tests/config_parser_unittest.cc b/src/bin/dhcp6/tests/config_parser_unittest.cc index e844014be1..8ab355323d 100644 --- a/src/bin/dhcp6/tests/config_parser_unittest.cc +++ b/src/bin/dhcp6/tests/config_parser_unittest.cc @@ -410,10 +410,10 @@ public: Subnet6Ptr subnet = CfgMgr::instance().getStagingCfg()->getCfgSubnets6()-> selectSubnet(subnet_address, classify_); if (!subnet) { - /// @todo replace toText() with the use of operator <<. ADD_FAILURE() << "A subnet for the specified address " - << subnet_address.toText() + << subnet_address << " does not exist in Config Manager"; + return (OptionDescriptor(false)); } OptionContainerPtr options = subnet->getCfgOption()->getAll(DHCP6_OPTION_SPACE);