Return-Path: X-Original-To: apmail-poi-commits-archive@minotaur.apache.org Delivered-To: apmail-poi-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D7FDB9CC4 for ; Sat, 15 Oct 2011 11:58:18 +0000 (UTC) Received: (qmail 97142 invoked by uid 500); 15 Oct 2011 11:58:18 -0000 Delivered-To: apmail-poi-commits-archive@poi.apache.org Received: (qmail 97104 invoked by uid 500); 15 Oct 2011 11:58:18 -0000 Mailing-List: contact commits-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@poi.apache.org Delivered-To: mailing list commits@poi.apache.org Received: (qmail 97097 invoked by uid 99); 15 Oct 2011 11:58:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Oct 2011 11:58:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Oct 2011 11:58:16 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id EC62623888FE for ; Sat, 15 Oct 2011 11:57:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1183626 - /poi/trunk/src/testcases/org/apache/poi/hpsf/basic/TestWrite.java Date: Sat, 15 Oct 2011 11:57:54 -0000 To: commits@poi.apache.org From: nick@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111015115754.EC62623888FE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: nick Date: Sat Oct 15 11:57:54 2011 New Revision: 1183626 URL: http://svn.apache.org/viewvc?rev=1183626&view=rev Log: Improve HPSF test failure message Modified: poi/trunk/src/testcases/org/apache/poi/hpsf/basic/TestWrite.java Modified: poi/trunk/src/testcases/org/apache/poi/hpsf/basic/TestWrite.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hpsf/basic/TestWrite.java?rev=1183626&r1=1183625&r2=1183626&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/hpsf/basic/TestWrite.java (original) +++ poi/trunk/src/testcases/org/apache/poi/hpsf/basic/TestWrite.java Sat Oct 15 11:57:54 2011 @@ -607,7 +607,13 @@ public class TestWrite extends TestCase variantType, codepage); if (objRead instanceof byte[]) { - final int diff = diff((byte[]) value, (byte[]) objRead); + byte[] valueB = (byte[])value; + byte[] readB = (byte[])objRead; + if (valueB.length != readB.length) + fail("Byte arrays are different length - expected " + valueB.length + + " but found " + readB.length); + + final int diff = diff(valueB, readB); if (diff >= 0) fail("Byte arrays are different. First different byte is at " + "index " + diff + "."); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org For additional commands, e-mail: commits-help@poi.apache.org