]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4097a] Added check of other options to Dhcp4ParserTest.optionDataDefaultsGlobal
authorFrancis Dupont <fdupont@isc.org>
Wed, 25 Nov 2015 10:47:01 +0000 (11:47 +0100)
committerFrancis Dupont <fdupont@isc.org>
Wed, 25 Nov 2015 10:47:01 +0000 (11:47 +0100)
src/bin/dhcp4/tests/config_parser_unittest.cc

index 6ba213d238f76b9cf0c348abe1726be597dbbb0d..02d4e3bedcf263689131acf37f06f886fbe122ba 100644 (file)
@@ -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