BIND 10 trac2168, updated. 8f422c21d3ea53c7f30bfd1548036331558bbf7d [2168] Remove UnitTestUtil::matchWireData()

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Jan 15 05:20:18 UTC 2014


The branch, trac2168 has been updated
       via  8f422c21d3ea53c7f30bfd1548036331558bbf7d (commit)
      from  1d34831c4d70162e769625278dd8c901ad21f42d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8f422c21d3ea53c7f30bfd1548036331558bbf7d
Author: Mukund Sivaraman <muks at isc.org>
Date:   Wed Jan 15 10:49:16 2014 +0530

    [2168] Remove UnitTestUtil::matchWireData()

-----------------------------------------------------------------------

Summary of changes:
 src/lib/dns/tests/unittest_util.cc |   27 ---------------------------
 src/lib/dns/tests/unittest_util.h  |   22 ----------------------
 2 files changed, 49 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/tests/unittest_util.cc b/src/lib/dns/tests/unittest_util.cc
index 66d49a8..bf4c8cb 100644
--- a/src/lib/dns/tests/unittest_util.cc
+++ b/src/lib/dns/tests/unittest_util.cc
@@ -132,33 +132,6 @@ UnitTestUtil::readWireData(const string& datastr,
 }
 
 ::testing::AssertionResult
-UnitTestUtil::matchWireData(const char*, const char*, const char*, const char*,
-                            const void* data1, size_t len1,
-                            const void* data2, size_t len2)
-{
-    ::testing::Message msg;
-    size_t cmplen = min(len1, len2);
-
-    for (size_t i = 0; i < cmplen; i++) {
-        int ch1 = static_cast<const uint8_t*>(data1)[i];
-        int ch2 = static_cast<const uint8_t*>(data2)[i];
-        if (ch1 != ch2) {
-            msg << "Wire data mismatch at " << i << "th byte\n"
-                << "  Actual: " << ch1 << "\n"
-                << "Expected: " << ch2 << "\n";
-            return (::testing::AssertionFailure(msg));
-        }
-    }
-    if (len1 != len2) {
-        msg << "Wire data mismatch in length:\n"
-            << "  Actual: " << len1 << "\n"
-            << "Expected: " << len2 << "\n";
-        return (::testing::AssertionFailure(msg));
-    }
-    return (::testing::AssertionSuccess());
-}
-
-::testing::AssertionResult
 UnitTestUtil::matchName(const char*, const char*,
                         const isc::dns::Name& name1,
                         const isc::dns::Name& name2)
diff --git a/src/lib/dns/tests/unittest_util.h b/src/lib/dns/tests/unittest_util.h
index f50df14..1d65f8d 100644
--- a/src/lib/dns/tests/unittest_util.h
+++ b/src/lib/dns/tests/unittest_util.h
@@ -46,28 +46,6 @@ public:
                              std::vector<unsigned char>& data);
 
     ///
-    /// Compare len1 bytes of data1 with len2 bytes of data2 as binary data.
-    ///
-    /// If they don't match report the point of mismatch in the google test
-    /// format.  This method is expected to be used from the EXPECT_PRED_FORMAT4
-    /// macro of google test as follows:
-    /// \code EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
-    ///                           actual_data, actual_data_len,
-    ///                           expected_data, expected_data_len); \endcode
-    /// Parameters from dataexp1 to lenexp2 are passed via the macro but will
-    /// be ignored by this method.
-    /// Note: newer versions of google test supports the direct use of
-    /// AssertionResult with the EXPECT_TRUE macro, which would be more
-    /// intuitive, but to be as compatible as possible we use the more primitive
-    /// macro, i.e., EXPECT_PRED_FORMAT4.
-    ///
-    static ::testing::AssertionResult
-    matchWireData(const char* dataexp1, const char* lenexp1,
-                  const char* dataexp2, const char* lenexp2,
-                  const void* data1, size_t len1,
-                  const void* data2, size_t len2);
-
-    ///
     /// Compare two names.
     ///
     /// This check method uses \c Name::compare() for comparison, which performs



More information about the bind10-changes mailing list