From: Francis Dupont Date: Wed, 25 Nov 2015 10:47:01 +0000 (+0100) Subject: [4097a] Added check of other options to Dhcp4ParserTest.optionDataDefaultsGlobal X-Git-Tag: trac4204fd_base~2^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52887c0ca1bcd5aed901d342a150aa771ffa60b5;p=thirdparty%2Fkea.git [4097a] Added check of other options to Dhcp4ParserTest.optionDataDefaultsGlobal --- diff --git a/src/bin/dhcp4/tests/config_parser_unittest.cc b/src/bin/dhcp4/tests/config_parser_unittest.cc index 6ba213d238..02d4e3bedc 100644 --- a/src/bin/dhcp4/tests/config_parser_unittest.cc +++ b/src/bin/dhcp4/tests/config_parser_unittest.cc @@ -1887,6 +1887,12 @@ TEST_F(Dhcp4ParserTest, optionDataDefaultsGlobal) { 0x01 }; testOption(*range.first, 23, foo2_expected, sizeof(foo2_expected)); + + // Check that options with other option codes are not returned. + for (uint8_t code = 24; code < 35; ++code) { + range = idx.equal_range(code); + EXPECT_EQ(0, std::distance(range.first, range.second)); + } } // Goal of this test is to verify that subnet option data is configured