]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4204fd] Reverted hex->bin change (missed trac4204fd_reverted
authorFrancis Dupont <fdupont@isc.org>
Fri, 27 Nov 2015 12:03:03 +0000 (13:03 +0100)
committerFrancis Dupont <fdupont@isc.org>
Fri, 27 Nov 2015 12:03:03 +0000 (13:03 +0100)
src/lib/dhcp/option.cc
src/lib/dhcpsrv/tests/client_class_def_parser_unittest.cc

index c571a9f43eb67f792e13fb50ac01e675f69c98c8..4caf4bb48845e452b2b959850a8ca28965d56151 100644 (file)
@@ -229,7 +229,7 @@ Option::toBinary(const bool include_header) {
         pack(buf);
 
     } catch (const std::exception &ex) {
-        isc_throw(OutOfRange, "unable to obtain binary representation"
+        isc_throw(OutOfRange, "unable to obtain hexadecimal representation"
                   " of option " << getType() << ": " << ex.what());
     }
     const uint8_t* option_data = static_cast<const uint8_t*>(buf.getData());
index ed2e36e43343dfcb7081bb2af57fa27193bae38b..eb71b2c5511dff717b8a7d19f7402307c02dcdf2 100644 (file)
@@ -182,19 +182,19 @@ TEST_F(ExpressionParserTest, validExpressionWithOptionName4) {
                               "hundred4");
 }
 
-// Verifies that given a valid expression using .bin operator for option, the
+// Verifies that given a valid expression using .hex operator for option, the
 // ExpressionParser produces an Expression which can be evaluated against
 // a v4 packet.
-TEST_F(ExpressionParserTest, validExpressionWithBin4) {
-    testValidExpression<Pkt4>(Option::V4, "\"option[12].bin == 0x68756E6472656434\"",
+TEST_F(ExpressionParserTest, validExpressionWithHex4) {
+    testValidExpression<Pkt4>(Option::V4, "\"option[12].hex == 0x68756E6472656434\"",
                               "hundred4");
 }
 
-// Verifies that the option name can be used together with .bin operator in
+// Verifies that the option name can be used together with .hex operator in
 // the evaluated expression.
-TEST_F(ExpressionParserTest, validExpressionWithOptionNameAndBin4) {
+TEST_F(ExpressionParserTest, validExpressionWithOptionNameAndHex4) {
     testValidExpression<Pkt6>(Option::V4,
-                              "\"option[host-name].bin == 0x68756E6472656434\"",
+                              "\"option[host-name].text == 0x68756E6472656434\"",
                               "hundred4");
 }
 
@@ -212,19 +212,19 @@ TEST_F(ExpressionParserTest, validExpressionWithOptionName6) {
                               "hundred6");
 }
 
-// Verifies that given a valid expression using .bin operator for option, the
+// Verifies that given a valid expression using .hex operator for option, the
 // ExpressionParser produces an Expression which can be evaluated against
 // a v6 packet.
-TEST_F(ExpressionParserTest, validExpressionWithBin6) {
-    testValidExpression<Pkt6>(Option::V6, "\"option[59].bin == 0x68756E6472656436\"",
+TEST_F(ExpressionParserTest, validExpressionWithHex6) {
+    testValidExpression<Pkt6>(Option::V6, "\"option[59].hex == 0x68756E6472656436\"",
                               "hundred6");
 }
 
-// Verifies that the option name can be used together with .bin operator in
+// Verifies that the option name can be used together with .hex operator in
 // the evaluated expression.
-TEST_F(ExpressionParserTest, validExpressionWithOptionNameAndBin6) {
+TEST_F(ExpressionParserTest, validExpressionWithOptionNameAndHex6) {
     testValidExpression<Pkt6>(Option::V6,
-                              "\"option[bootfile-url].bin == 0x68756E6472656436\"",
+                              "\"option[bootfile-url].text == 0x68756E6472656436\"",
                               "hundred6");
 }