From: Francis Dupont Date: Wed, 11 Apr 2018 19:20:08 +0000 (+0200) Subject: [master] Final changes from 5374 merge X-Git-Tag: trac5458a_base~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8717ef28ecaa512f13f20e22f3ea3c8f48ff2e39;p=thirdparty%2Fkea.git [master] Final changes from 5374 merge --- diff --git a/src/bin/dhcp4/tests/get_config_unittest.cc b/src/bin/dhcp4/tests/get_config_unittest.cc index a83e6a9915..6cca3383df 100644 --- a/src/bin/dhcp4/tests/get_config_unittest.cc +++ b/src/bin/dhcp4/tests/get_config_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2017-2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -6331,7 +6331,7 @@ const char* UNPARSED_CONFIGS[] = { " },\n" " {\n" " \"boot-file-name\": \"\",\n" -" \"name\": \"three\",\n" +" \"name\": \"two\",\n" " \"next-server\": \"0.0.0.0\",\n" " \"option-data\": [ ],\n" " \"option-def\": [ ],\n" @@ -6339,7 +6339,7 @@ const char* UNPARSED_CONFIGS[] = { " },\n" " {\n" " \"boot-file-name\": \"\",\n" -" \"name\": \"two\",\n" +" \"name\": \"three\",\n" " \"next-server\": \"0.0.0.0\",\n" " \"option-data\": [ ],\n" " \"option-def\": [ ],\n" @@ -6777,24 +6777,24 @@ const char* UNPARSED_CONFIGS[] = { " \"test\": \"'' == ''\"\n" " },\n" " {\n" -" \"comment\": \"a comment\",\n" " \"boot-file-name\": \"\",\n" -" \"name\": \"both\",\n" +" \"name\": \"none\",\n" " \"next-server\": \"0.0.0.0\",\n" " \"option-data\": [ ],\n" " \"option-def\": [ ],\n" -" \"server-hostname\": \"\",\n" -" \"user-context\": {\n" -" \"version\": 1\n" -" }\n" +" \"server-hostname\": \"\"\n" " },\n" " {\n" +" \"comment\": \"a comment\",\n" " \"boot-file-name\": \"\",\n" -" \"name\": \"none\",\n" +" \"name\": \"both\",\n" " \"next-server\": \"0.0.0.0\",\n" " \"option-data\": [ ],\n" " \"option-def\": [ ],\n" -" \"server-hostname\": \"\"\n" +" \"server-hostname\": \"\",\n" +" \"user-context\": {\n" +" \"version\": 1\n" +" }\n" " }\n" " ],\n" " \"control-socket\": {\n" diff --git a/src/bin/dhcp4/tests/get_config_unittest.cc.skel b/src/bin/dhcp4/tests/get_config_unittest.cc.skel index 0f764b31fc..61934f3162 100644 --- a/src/bin/dhcp4/tests/get_config_unittest.cc.skel +++ b/src/bin/dhcp4/tests/get_config_unittest.cc.skel @@ -347,7 +347,9 @@ TEST_P(Dhcp4GetConfigTest, run) { class IntToString { public: std::string operator()(const testing::TestParamInfo& n) { - return to_string(n.param); + std::ostringstream ss; + ss << static_cast(n.param); + return (ss.str()); } }; diff --git a/src/bin/dhcp6/tests/get_config_unittest.cc b/src/bin/dhcp6/tests/get_config_unittest.cc index ee15fc3483..5f3ddccdd6 100644 --- a/src/bin/dhcp6/tests/get_config_unittest.cc +++ b/src/bin/dhcp6/tests/get_config_unittest.cc @@ -6340,16 +6340,16 @@ const char* UNPARSED_CONFIGS[] = { " \"test\": \"'' == ''\"\n" " },\n" " {\n" +" \"name\": \"none\",\n" +" \"option-data\": [ ]\n" +" },\n" +" {\n" " \"comment\": \"a comment\",\n" " \"name\": \"both\",\n" " \"option-data\": [ ],\n" " \"user-context\": {\n" " \"version\": 1\n" " }\n" -" },\n" -" {\n" -" \"name\": \"none\",\n" -" \"option-data\": [ ]\n" " }\n" " ],\n" " \"control-socket\": {\n" diff --git a/src/bin/dhcp6/tests/get_config_unittest.cc.skel b/src/bin/dhcp6/tests/get_config_unittest.cc.skel index 3ac9a3216a..5ed9352ef6 100644 --- a/src/bin/dhcp6/tests/get_config_unittest.cc.skel +++ b/src/bin/dhcp6/tests/get_config_unittest.cc.skel @@ -1,4 +1,4 @@ -// Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2017-2018 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -351,7 +351,9 @@ TEST_P(Dhcp6GetConfigTest, run) { class IntToString { public: std::string operator()(const testing::TestParamInfo& n) { - return to_string(n.param); + std::ostringstream ss; + ss << static_cast(n.param); + return (ss.str()); } }; diff --git a/src/lib/dhcpsrv/tests/host_unittest.cc b/src/lib/dhcpsrv/tests/host_unittest.cc index 79871774db..674bca8009 100644 --- a/src/lib/dhcpsrv/tests/host_unittest.cc +++ b/src/lib/dhcpsrv/tests/host_unittest.cc @@ -1169,6 +1169,7 @@ TEST_F(HostTest, unparse) { "}", host->toElement6()->str()); + // Now the classes are in defined order (vs. alphabetical order). host->addClientClass6("hub"); host->addClientClass6("device"); @@ -1184,7 +1185,7 @@ TEST_F(HostTest, unparse) { host->toElement4()->str()); EXPECT_EQ("{ " - "\"client-classes\": [ \"device\", \"hub\" ], " + "\"client-classes\": [ \"hub\", \"device\" ], " "\"duid\": \"11:12:13:14:15\", " "\"hostname\": \"myhost\", " "\"ip-addresses\": [ ], "