Browse Source

[1924] prioritize a method where possible.

JINMEI Tatuya 12 years ago
parent
commit
e931cdc9d8
1 changed files with 10 additions and 9 deletions
  1. 10 9
      src/lib/cc/tests/session_unittests.cc

+ 10 - 9
src/lib/cc/tests/session_unittests.cc

@@ -173,15 +173,6 @@ protected:
         delete tds;
         delete tds;
     }
     }
 
 
-    // Check two elements are equal
-    void elementsEqual(const string& expected,
-                       const ConstElementPtr& actual) const
-    {
-        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
     // Check the session sent a message with the given header. The
     // message is hardcoded.
     // message is hardcoded.
     void checkSentMessage(const string& expected_hdr, const char* description)
     void checkSentMessage(const string& expected_hdr, const char* description)
@@ -192,6 +183,16 @@ protected:
         elementsEqual("{\"test\": 42}", msg.second);
         elementsEqual("{\"test\": 42}", msg.second);
     }
     }
 
 
+private:
+    // Check two elements are equal
+    void elementsEqual(const string& expected,
+                       const ConstElementPtr& actual) const
+    {
+        EXPECT_TRUE(Element::fromJSON(expected)->equals(*actual)) <<
+            "Elements differ, expected: " << expected <<
+            ", got: " << actual->toWire();
+    }
+
 public:
 public:
     // used in the handler test
     // used in the handler test
     // This handler first reads (and ignores) whatever message caused
     // This handler first reads (and ignores) whatever message caused