]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[(no branch, rebasing 1897-add-d2-server-hook-syntax)] [#1897] Fixed D2GetConfigTest...
authorFrancis Dupont <fdupont@isc.org>
Wed, 2 Jun 2021 16:21:36 +0000 (18:21 +0200)
committerFrancis Dupont <fdupont@isc.org>
Thu, 3 Jun 2021 09:29:56 +0000 (11:29 +0200)
src/bin/d2/tests/get_config_unittest.cc

index a0d2c28d9da1c67671b8e8019f8669eac60136b0..74c152447e332838301f0328225c0fa8f4b4a8cf 100644 (file)
@@ -273,10 +273,11 @@ TEST_F(D2GetConfigTest, sample1) {
         // check that unparsed and expected values match
         EXPECT_TRUE(isEquivalent(unparsed, jsonj));
         // check on pretty prints too
-        std::string current = prettyPrint(unparsed, 0, 4) + "\n";
-        EXPECT_EQ(expected, current);
-        if (expected != current) {
-            expected = current;
+        std::string current = prettyPrint(unparsed, 0, 4);
+        std::string expected2 = prettyPrint(jsonj, 0, 4);
+        EXPECT_EQ(expected2, current);
+        if (expected2 != current) {
+            expected = current + "\n";
         }
     }