jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
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 GMT
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");
                 }
             }



Mime
View raw message