Return-Path: Delivered-To: apmail-incubator-jackrabbit-commits-archive@www.apache.org Received: (qmail 64584 invoked from network); 30 Sep 2005 13:51:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Sep 2005 13:51:46 -0000 Received: (qmail 63872 invoked by uid 500); 30 Sep 2005 13:51:45 -0000 Mailing-List: contact jackrabbit-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-commits@incubator.apache.org Received: (qmail 63813 invoked by uid 500); 30 Sep 2005 13:51:44 -0000 Delivered-To: apmail-incubator-jackrabbit-cvs@incubator.apache.org Received: (qmail 63797 invoked by uid 99); 30 Sep 2005 13:51:44 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 30 Sep 2005 06:51:44 -0700 Received: (qmail 64453 invoked by uid 65534); 30 Sep 2005 13:51:24 -0000 Message-ID: <20050930135124.64452.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r292733 - /incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java Date: Fri, 30 Sep 2005 13:51:23 -0000 To: jackrabbit-cvs@incubator.apache.org From: mreutegg@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: mreutegg Date: Fri Sep 30 06:51:20 2005 New Revision: 292733 URL: http://svn.apache.org/viewcvs?rev=292733&view=rev Log: JCR-156: Review test cases and cross check with 1.0 specification - sort check in AbstractQueryTest.evaluateResultOrder() is broken. Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java?rev=292733&r1=292732&r2=292733&view=diff ============================================================================== --- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java (original) +++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java Fri Sep 30 06:51:20 2005 @@ -212,16 +212,16 @@ // need to re-aquire rows, {@link #getSize} may consume elements. rows = queryResult.getRows(); int changeCnt = 0; - String last = ""; + String last = descending ? "\uFFFF" : ""; while (rows.hasNext()) { String value = rows.nextRow().getValue(propName).getString(); int cp = value.compareTo(last); // if value changed evaluate if the ordering is correct if (cp != 0) { changeCnt++; - if (cp == 1 && descending) { + if (cp > 0 && descending) { fail("Repository doesn't order properly descending"); - } else if (cp == -1 && !descending) { + } else if (cp < 0 && !descending) { fail("Repository doesn't order properly ascending"); } }