]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
More portable rfc1035 unit test
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 21 Jan 2010 07:59:51 +0000 (20:59 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 21 Jan 2010 07:59:51 +0000 (20:59 +1300)
lib/tests/testRFC1035.cc

index 73c6766e74b61552f9c9f4e6b97fa09fab161fc2..953ab1431b3e1df37c78b78b3e6fd5f8a5f37a01 100644 (file)
@@ -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);
 }