Browse Source

[1924] Combine the elementsEqual variants together

One of them is a relict of previous tests and is no longer needed, so
have only one.
Michal 'vorner' Vaner 12 years ago
parent
commit
60b36bdabd
1 changed files with 3 additions and 11 deletions
  1. 3 11
      src/lib/cc/tests/session_unittests.cc

+ 3 - 11
src/lib/cc/tests/session_unittests.cc

@@ -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