From: Amos Jeffries Date: Thu, 21 Jan 2010 07:59:51 +0000 (+1300) Subject: More portable rfc1035 unit test X-Git-Tag: SQUID_3_2_0_1~455 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9761b0bdbb6655d42fa54e583a20a62d97786768;p=thirdparty%2Fsquid.git More portable rfc1035 unit test --- diff --git a/lib/tests/testRFC1035.cc b/lib/tests/testRFC1035.cc index 73c6766e74..953ab1431b 100644 --- a/lib/tests/testRFC1035.cc +++ b/lib/tests/testRFC1035.cc @@ -131,7 +131,8 @@ void testRFC1035::testBugPacketHeadersOnly() /* Test the MessageUnpack function itself */ res = rfc1035MessageUnpack(buf, len, &msg); - CPPUNIT_ASSERT_EQUAL((const char *)"The DNS reply message is corrupt or could not be safely parsed.", rfc1035_error_message); + CPPUNIT_ASSERT(rfc1035_error_message != NULL); + CPPUNIT_ASSERT(0 == memcmp("The DNS reply message is corrupt or could not be safely parsed.", rfc1035_error_message, 63)); CPPUNIT_ASSERT(res < 0); CPPUNIT_ASSERT(msg == NULL); }