-// 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
" },\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"
" },\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"
" \"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"
"}",
host->toElement6()->str());
+ // Now the classes are in defined order (vs. alphabetical order).
host->addClientClass6("hub");
host->addClientClass6("device");
host->toElement4()->str());
EXPECT_EQ("{ "
- "\"client-classes\": [ \"device\", \"hub\" ], "
+ "\"client-classes\": [ \"hub\", \"device\" ], "
"\"duid\": \"11:12:13:14:15\", "
"\"hostname\": \"myhost\", "
"\"ip-addresses\": [ ], "