]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1924] Combine the elementsEqual variants together
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Thu, 7 Feb 2013 09:59:53 +0000 (10:59 +0100)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Thu, 7 Feb 2013 09:59:53 +0000 (10:59 +0100)
One of them is a relict of previous tests and is no longer needed, so
have only one.

src/lib/cc/tests/session_unittests.cc

index 0e47d2fa23cf77033ef4abf8907cc5643c7fb579..8859bfb03bf55a268877c6b4f7158efa39be25cd 100644 (file)
@@ -174,20 +174,12 @@ protected:
     }
 
     // Check two elements are equal
-    void elementsEqual(const ConstElementPtr& expected,
-                       const ConstElementPtr& actual)
-    {
-        EXPECT_TRUE(expected->equals(*actual)) <<
-            "Elements differ, expected: " << expected->toWire() <<
-            ", got: " << actual->toWire();
-    }
-
-    // The same, but with one specified as string
     void elementsEqual(const string& expected,
                        const ConstElementPtr& actual)
     {
-        const ConstElementPtr expected_el(Element::fromJSON(expected));
-        elementsEqual(expected_el, actual);
+        EXPECT_TRUE(Element::fromJSON(expected)->equals(*actual)) <<
+            "Elements differ, expected: " << expected <<
+            ", got: " << actual->toWire();
     }
 
     // Check the session sent a message with the given header. The