From: Amos Jeffries Date: Fri, 29 Jan 2010 11:27:54 +0000 (+1300) Subject: More portable rfc1035 unit test X-Git-Tag: SQUID_3_1_0_16~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b4ad41c159d56191b77f2dd7bafcc066899f9d15;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); }