From: Marcin Siodelski Date: Tue, 30 Oct 2012 19:44:32 +0000 (+0100) Subject: [2318] Test for very low negative value removed. X-Git-Tag: trac2487_base~28^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c8d6f38ab7cea07e3bc75a5b4cec8207c2db61fd;p=thirdparty%2Fkea.git [2318] Test for very low negative value removed. Test was wrong because fromJSON function filters out low numbers anyway and caused exception when preparing the data for the unit test. --- diff --git a/src/bin/dhcp6/tests/config_parser_unittest.cc b/src/bin/dhcp6/tests/config_parser_unittest.cc index dafe314424..489e3c11e9 100644 --- a/src/bin/dhcp6/tests/config_parser_unittest.cc +++ b/src/bin/dhcp6/tests/config_parser_unittest.cc @@ -571,17 +571,6 @@ TEST_F(Dhcp6ParserTest, optionNameSpaces) { testInvalidOptionParam("option foo", "name"); } -// Verify that very low negative option code is rejected in -// the configuration. -TEST_F(Dhcp6ParserTest, optionCodeNegativeOverflow) { - // Using negative code. If range checking is not applied on the - // value then it may be successfully cast to uint16_t resulting - // in a value of 65531 (which will be accepted). The code should however - // detect that it is actually very low negative value and parsing should - // fail. - testInvalidOptionParam("-4294901765", "code"); -} - // Verify that negative option code is rejected in the configuration. TEST_F(Dhcp6ParserTest, optionCodeNegative) { // Check negative option code -4. This should fail too.