db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcai...@apache.org
Subject svn commit: r330596 - /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/
Date Thu, 03 Nov 2005 18:10:00 GMT
Author: mcaisse
Date: Thu Nov  3 10:09:51 2005
New Revision: 330596

URL: http://svn.apache.org/viewcvs?rev=330596&view=rev
Log:
JDO-197 Also changed var names for clarity

Modified:
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestArrayCollections.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestArrayListCollections.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashMapStringKeyCollections.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashMapStringValueCollections.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashSetCollections.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashtableStringKeyCollections.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashtableStringValueCollections.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestLinkedListCollections.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestListCollections.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestMapStringKeyCollections.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestMapStringValueCollections.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestSetCollections.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestTreeMapStringKeyCollections.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestTreeMapStringValueCollections.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestTreeSetCollections.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestVectorCollections.java

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestArrayCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestArrayCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestArrayCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestArrayCollections.java
Thu Nov  3 10:09:51 2005
@@ -146,17 +146,17 @@
         ArrayCollections pi = (ArrayCollections) pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (int i = 0; i < n; ++i) {
-            Object [] compareWith = expectedValue.get(i);
-            Object [] val = pi.get(i);
-            if (val.length != compareWith.length) {
+            Object [] expected = expectedValue.get(i);
+            Object [] actual = pi.get(i);
+            if (actual.length != expected.length) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.length + ", actual size = " + val.length
+                        expected.length + ", actual size = " + actual.length
                         + " . ");
                 continue;
             }
-            if (! Arrays.equals(val, compareWith)) {
+            if (! Arrays.equals(actual, expected)) {
                 sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
             }
         }
         if (sbuf.length() > 0) {

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestArrayListCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestArrayListCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestArrayListCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestArrayListCollections.java
Thu Nov  3 10:09:51 2005
@@ -146,17 +146,17 @@
                 pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (i = 0; i < n; ++i) {
-            Collection compareWith = expectedValue.get(i);
-            Collection val = pi.get(i);
-            if (val.size() != compareWith.size()) {
+            Collection expected = expectedValue.get(i);
+            Collection actual = pi.get(i);
+            if (actual.size() != expected.size()) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.size() + ", actual size = " + val.size()
+                        expected.size() + ", actual size = " + actual.size()
                         + " . ");
                 continue;
             }
-            if (! val.equals(compareWith)) {
+            if (! expected.equals(actual)) {
                 sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
             }
         }
         if (sbuf.length() > 0) {

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashMapStringKeyCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashMapStringKeyCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashMapStringKeyCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashMapStringKeyCollections.java
Thu Nov  3 10:09:51 2005
@@ -155,17 +155,17 @@
                 pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (int i = 0; i < n; ++i) {
-            HashMap compareWith = expectedValue.get(i);
-            HashMap val = pi.get(i);
-            if (val.size() != compareWith.size()) {
+            HashMap expected = expectedValue.get(i);
+            HashMap actual = pi.get(i);
+            if (actual.size() != expected.size()) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.size() + ", actual size = " + val.size()
+                        expected.size() + ", actual size = " + actual.size()
                         + " . ");
                 continue;
             }
-            if (! val.equals(compareWith)) {
+            if (! expected.equals(actual)) {
                 sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
             }
         }
         if (sbuf.length() > 0) {

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashMapStringValueCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashMapStringValueCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashMapStringValueCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashMapStringValueCollections.java
Thu Nov  3 10:09:51 2005
@@ -156,17 +156,17 @@
                 pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (int i = 0; i < n; ++i) {
-            HashMap compareWith = expectedValue.get(i);
-            HashMap val = pi.get(i);
-            if (val.size() != compareWith.size()) {
+            HashMap expected = expectedValue.get(i);
+            HashMap actual = pi.get(i);
+            if (actual.size() != expected.size()) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.size() + ", actual size = " + val.size()
+                        expected.size() + ", actual size = " + actual.size()
                         + " . ");
                 continue;
             }
-            if (! val.equals(compareWith)) {
+            if (! expected.equals(actual)) {
                 sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
             }
         }
         if (sbuf.length() > 0) {

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashSetCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashSetCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashSetCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashSetCollections.java
Thu Nov  3 10:09:51 2005
@@ -145,36 +145,37 @@
                 pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (i = 0; i < n; ++i) {
-            HashSet compareWith = expectedValue.get(i);
-            HashSet val = pi.get(i);
-            if (val.size() != compareWith.size()) {
+            HashSet expected = expectedValue.get(i);
+            HashSet actual = pi.get(i);
+            if (actual.size() != expected.size()) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.size() + ", actual size = " + val.size()
+                        expected.size() + ", actual size = " + actual.size()
                         + " . ");
             }
-            else if (! val.equals(compareWith)) {
+            else if (! expected.equals(actual)) {
                 if (TestUtil.getFieldSpecs(HashSetCollections.fieldSpecs[i]
                             ).equals("BigDecimal")) {
                     // sort values for comparison
-                    TreeSet compareTS = new TreeSet(compareWith);
-                    TreeSet valTS = new TreeSet(val);
-                    Iterator compareIter = compareTS.iterator();
-                    Iterator valIter = valTS.iterator();
-                    for (int j=0; j < compareTS.size(); j++) {
-                        BigDecimal bigDecCompareWith =
-                                (BigDecimal)(compareIter.next());
-                        BigDecimal bigDecVal = (BigDecimal)(valIter.next());
-                                bigDecVal.setScale(bigDecCompareWith.scale());
-                        if ((bigDecCompareWith.compareTo(bigDecVal)) != 0)  {
+                    TreeSet expectedTS = new TreeSet(expected);
+                    TreeSet actualTS = new TreeSet(actual);
+                    Iterator expectedIter = expectedTS.iterator();
+                    Iterator actualIter = actualTS.iterator();
+                    for (int j=0; j < expectedTS.size(); j++) {
+                        BigDecimal bigDecExpected =
+                                (BigDecimal)(expectedIter.next());
+                        BigDecimal bigDecActual =
+                                (BigDecimal)(actualIter.next());
+                                bigDecActual.setScale(bigDecExpected.scale());
+                        if ((bigDecExpected.compareTo(bigDecActual)) != 0)  {
                             sbuf.append("\nFor element " + i + "(" + j +
-                                    "), expected = " + bigDecCompareWith +
-                                    ", actual = " + bigDecVal);
+                                    "), expected = " + bigDecExpected +
+                                    ", actual = " + bigDecActual);
                         }
                     }
                 }
                 else {
                     sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
                 }
 
             }

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashtableStringKeyCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashtableStringKeyCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashtableStringKeyCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashtableStringKeyCollections.java
Thu Nov  3 10:09:51 2005
@@ -156,17 +156,17 @@
                 pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (int i = 0; i < n; ++i) {
-            Hashtable compareWith = expectedValue.get(i);
-            Hashtable val = pi.get(i);
-            if (val.size() != compareWith.size()) {
+            Hashtable expected = expectedValue.get(i);
+            Hashtable actual = pi.get(i);
+            if (actual.size() != expected.size()) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.size() + ", actual size = " + val.size()
+                        expected.size() + ", actual size = " + actual.size()
                         + " . ");
                 continue;
             }
-            if (! val.equals(compareWith)) {
+            if (! expected.equals(actual)) {
                 sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
             }
         }
         if (sbuf.length() > 0) {

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashtableStringValueCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashtableStringValueCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashtableStringValueCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestHashtableStringValueCollections.java
Thu Nov  3 10:09:51 2005
@@ -154,17 +154,17 @@
                 pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (int i = 0; i < n; ++i) {
-            Hashtable compareWith = expectedValue.get(i);
-            Hashtable val = pi.get(i);
-            if (val.size() != compareWith.size()) {
+            Hashtable expected = expectedValue.get(i);
+            Hashtable actual = pi.get(i);
+            if (actual.size() != expected.size()) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.size() + ", actual size = " + val.size()
+                        expected.size() + ", actual size = " + actual.size()
                         + " . ");
                 continue;
             }
-            if (! val.equals(compareWith)) {
+            if (! expected.equals(actual)) {
                 sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
             }
         }
         if (sbuf.length() > 0) {

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestLinkedListCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestLinkedListCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestLinkedListCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestLinkedListCollections.java
Thu Nov  3 10:09:51 2005
@@ -151,34 +151,34 @@
                 pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (i = 0; i < n; ++i) {
-            LinkedList compareWith = expectedValue.get(i);
-            LinkedList val = pi.get(i);
-            if (val.size() != compareWith.size()) {
+            LinkedList expected = expectedValue.get(i);
+            LinkedList actual = pi.get(i);
+            if (actual.size() != expected.size()) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.size() + ", actual size = " + val.size()
+                        expected.size() + ", actual size = " + actual.size()
                         + " . ");
             }
-            else if (! val.equals(compareWith)) {
+            else if (! expected.equals(actual)) {
                 if (TestUtil.getFieldSpecs(LinkedListCollections.fieldSpecs[i]
                             ).equals("BigDecimal")) {
-                    ListIterator compareWithIt = compareWith.listIterator();
-                    ListIterator valIt = val.listIterator();
+                    ListIterator expectedIT = expected.listIterator();
+                    ListIterator actualIt = actual.listIterator();
                     int index = 0;
-                    while (compareWithIt.hasNext()) {
-                        BigDecimal bigDecCompareWith =
-                                (BigDecimal)(compareWithIt.next());
-                        BigDecimal bigDecVal = (BigDecimal)(valIt.next());
-                        if ((bigDecCompareWith.compareTo(bigDecVal)) != 0)  {
+                    while (expectedIT.hasNext()) {
+                        BigDecimal bigDecExpected =
+                                (BigDecimal)(expectedIT.next());
+                        BigDecimal bigDecActual = (BigDecimal)(actualIt.next());
+                        if ((bigDecExpected.compareTo(bigDecActual)) != 0)  {
                             sbuf.append("\nFor element " + i + "(" + index +
-                                    "), expected = " + bigDecCompareWith +
-                                    ", actual = " + bigDecVal);
+                                    "), expected = " + bigDecExpected +
+                                    ", actual = " + bigDecActual);
                         }
                         index++;
                     }
                 }
                 else {
                     sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
                 }
 
             }        }

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestListCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestListCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestListCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestListCollections.java
Thu Nov  3 10:09:51 2005
@@ -156,34 +156,34 @@
                 pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (i = 0; i < n; ++i) {
-            List compareWith = expectedValue.get(i);
-            List val = pi.get(i);
-            if (val.size() != compareWith.size()) {
+            List expected = expectedValue.get(i);
+            List actual = pi.get(i);
+            if (actual.size() != expected.size()) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.size() + ", actual size = " + val.size()
+                        expected.size() + ", actual size = " + actual.size()
                         + " . ");
             }
-            else if (! val.equals(compareWith)) {
+            else if (! expected.equals(actual)) {
                 if (TestUtil.getFieldSpecs(ListCollections.fieldSpecs[i]
                             ).equals("BigDecimal")) {
-                    ListIterator compareWithIt = compareWith.listIterator();
-                    ListIterator valIt = val.listIterator();
+                    ListIterator expectedIt = expected.listIterator();
+                    ListIterator actualIt = actual.listIterator();
                     int index = 0;
-                    while (compareWithIt.hasNext()) {
-                        BigDecimal bigDecCompareWith =
-                                (BigDecimal)(compareWithIt.next());
-                        BigDecimal bigDecVal = (BigDecimal)(valIt.next());
-                        if ((bigDecCompareWith.compareTo(bigDecVal)) != 0)  {
+                    while (expectedIt.hasNext()) {
+                        BigDecimal bigDecExpected =
+                                (BigDecimal)(expectedIt.next());
+                        BigDecimal bigDecActual = (BigDecimal)(actualIt.next());
+                        if ((bigDecExpected.compareTo(bigDecActual)) != 0)  {
                             sbuf.append("\nFor element " + i + "(" + index +
-                                    "), expected = " + bigDecCompareWith +
-                                    ", actual = " + bigDecVal);
+                                    "), expected = " + bigDecExpected +
+                                    ", actual = " + bigDecActual);
                         }
                         index++;
                     }
                 }
                 else {
                     sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
                 }
 
             }

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestMapStringKeyCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestMapStringKeyCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestMapStringKeyCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestMapStringKeyCollections.java
Thu Nov  3 10:09:51 2005
@@ -156,17 +156,17 @@
                 pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (int i = 0; i < n; ++i) {
-            Map compareWith = expectedValue.get(i);
-            Map val = pi.get(i);
-            if (val.size() != compareWith.size()) {
+            Map expected = expectedValue.get(i);
+            Map actual = pi.get(i);
+            if (actual.size() != expected.size()) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.size() + ", actual size = " + val.size()
+                        expected.size() + ", actual size = " + actual.size()
                         + " . ");
                 continue;
             }
-            if (! val.equals(compareWith)) {
+            if (! expected.equals(actual)) {
                 sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
             }
         }
         if (sbuf.length() > 0) {

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestMapStringValueCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestMapStringValueCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestMapStringValueCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestMapStringValueCollections.java
Thu Nov  3 10:09:51 2005
@@ -159,17 +159,17 @@
                 pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (int i = 0; i < n; ++i) {
-            Map compareWith = expectedValue.get(i);
-            Map val = pi.get(i);
-            if (val.size() != compareWith.size()) {
+            Map expected = expectedValue.get(i);
+            Map actual = pi.get(i);
+            if (actual.size() != expected.size()) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.size() + ", actual size = " + val.size()
+                        expected.size() + ", actual size = " + actual.size()
                         + " . ");
                 continue;
             }
-            if (! val.equals(compareWith)) {
+            if (! expected.equals(actual)) {
                 sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
             }
         }
         if (sbuf.length() > 0) {

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestSetCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestSetCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestSetCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestSetCollections.java
Thu Nov  3 10:09:51 2005
@@ -143,36 +143,37 @@
                 pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (i = 0; i < n; ++i) {
-            Set compareWith = expectedValue.get(i);
-            Set val = pi.get(i);
-            if (val.size() != compareWith.size()) {
+            Set expected = expectedValue.get(i);
+            Set actual = pi.get(i);
+            if (actual.size() != expected.size()) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.size() + ", actual size = " + val.size()
+                        expected.size() + ", actual size = " + actual.size()
                         + " . ");
             }
-            else if (! val.equals(compareWith)) {
+            else if (! expected.equals(actual)) {
                 if (TestUtil.getFieldSpecs(SetCollections.fieldSpecs[i]
                             ).equals("BigDecimal")) {
                     // sort values for comparison
-                    TreeSet compareTS = new TreeSet(compareWith);
-                    TreeSet valTS = new TreeSet(val);
-                    Iterator compareIter = compareTS.iterator();
-                    Iterator valIter = valTS.iterator();
-                    for (int j=0; j < compareTS.size(); j++) {
-                        BigDecimal bigDecCompareWith =
-                                (BigDecimal)(compareIter.next());
-                        BigDecimal bigDecVal = (BigDecimal)(valIter.next());
-                                bigDecVal.setScale(bigDecCompareWith.scale());
-                        if ((bigDecCompareWith.compareTo(bigDecVal)) != 0)  {
+                    TreeSet expectedTS = new TreeSet(expected);
+                    TreeSet actualTS = new TreeSet(actual);
+                    Iterator expectedIter = expectedTS.iterator();
+                    Iterator actualIter = actualTS.iterator();
+                    for (int j=0; j < expectedTS.size(); j++) {
+                        BigDecimal bigDecExpected =
+                                (BigDecimal)(expectedIter.next());
+                        BigDecimal bigDecActual =
+                                (BigDecimal)(actualIter.next());
+                                bigDecActual.setScale(bigDecExpected.scale());
+                        if ((bigDecExpected.compareTo(bigDecActual)) != 0)  {
                             sbuf.append("\nFor element " + i + "(" + j +
-                                    "), expected = " + bigDecCompareWith +
-                                    ", actual = " + bigDecVal);
+                                    "), expected = " + bigDecExpected +
+                                    ", actual = " + bigDecActual);
                         }
                     }
                 }
                 else {
                     sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
                 }
 
             }

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestTreeMapStringKeyCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestTreeMapStringKeyCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestTreeMapStringKeyCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestTreeMapStringKeyCollections.java
Thu Nov  3 10:09:51 2005
@@ -153,17 +153,17 @@
                 pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (int i = 0; i < n; ++i) {
-            TreeMap compareWith = expectedValue.get(i);
-            TreeMap val = pi.get(i);
-            if (val.size() != compareWith.size()) {
+            TreeMap expected = expectedValue.get(i);
+            TreeMap actual = pi.get(i);
+            if (actual.size() != expected.size()) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.size() + ", actual size = " + val.size()
+                        expected.size() + ", actual size = " + actual.size()
                         + " . ");
                 continue;
             }
-            if (! val.equals(compareWith)) {
+            if (! expected.equals(actual)) {
                 sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
             }
         }
         if (sbuf.length() > 0) {

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestTreeMapStringValueCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestTreeMapStringValueCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestTreeMapStringValueCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestTreeMapStringValueCollections.java
Thu Nov  3 10:09:51 2005
@@ -152,17 +152,17 @@
                 pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (int i = 0; i < n; ++i) {
-            TreeMap compareWith = expectedValue.get(i);
-            TreeMap val = pi.get(i);
-            if (val.size() != compareWith.size()) {
+            TreeMap expected = expectedValue.get(i);
+            TreeMap actual = pi.get(i);
+            if (actual.size() != expected.size()) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.size() + ", actual size = " + val.size()
+                        expected.size() + ", actual size = " + actual.size()
                         + " . ");
                 continue;
             }
-            if (! val.equals(compareWith)) {
+            if (! expected.equals(actual)) {
                 sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
             }
         }
         if (sbuf.length() > 0) {

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestTreeSetCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestTreeSetCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestTreeSetCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestTreeSetCollections.java
Thu Nov  3 10:09:51 2005
@@ -150,17 +150,17 @@
                 pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (int i = 0; i < n; ++i) {
-            Collection compareWith = expectedValue.get(i);
-            Collection val = pi.get(i);
-            if (val.size() != compareWith.size()) {
+            Collection expected = expectedValue.get(i);
+            Collection actual = pi.get(i);
+            if (actual.size() != expected.size()) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.size() + ", actual size = " + val.size()
+                        expected.size() + ", actual size = " + actual.size()
                         + " . ");
                 continue;
             }
-            if (! val.equals(compareWith)) {
+            if (! expected.equals(actual)) {
                 sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
             }
         }
         if (sbuf.length() > 0) {

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestVectorCollections.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestVectorCollections.java?rev=330596&r1=330595&r2=330596&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestVectorCollections.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestVectorCollections.java
Thu Nov  3 10:09:51 2005
@@ -147,35 +147,36 @@
                 pm.getObjectById(oid, true);
         int n = pi.getLength();
         for (int i = 0; i < n; i++) {
-            Vector compareWith = expectedValue.get(i);
-            Vector val = pi.get(i);
-            if (val.size() != compareWith.size()) {
+            Vector expected = expectedValue.get(i);
+            Vector actual = pi.get(i);
+            if (actual.size() != expected.size()) {
                 sbuf.append("\nFor element " + i + ", expected size = " +
-                        compareWith.size() + ", actual size = " + val.size()
+                        expected.size() + ", actual size = " + actual.size()
                         + " . ");
             }
-            else if (! val.equals(compareWith)) {
+            else if (! expected.equals(actual)) {
                 if (debug) {
                     logger.debug("Field number is " + i);
-                    logger.debug("Persisted vector is " + val);
-                    logger.debug("Expected vector is " + compareWith);
+                    logger.debug("Persisted vector is " + actual);
+                    logger.debug("Expected vector is " + expected);
                 }
                 if (TestUtil.getFieldSpecs(VectorCollections.fieldSpecs[i]
                             ).equals("BigDecimal")) {
-                    for (int j = 0; j < val.size(); j++) {
-                        BigDecimal bigDecVal = (BigDecimal)val.elementAt(j);
-                        BigDecimal bigDecCompareWith =
-                            (BigDecimal)compareWith.elementAt(j);
-                        if ((bigDecCompareWith.compareTo(bigDecVal) != 0)) {
+                    for (int j = 0; j < actual.size(); j++) {
+                        BigDecimal bigDecActual =
+                                (BigDecimal)actual.elementAt(j);
+                        BigDecimal bigDecExpected =
+                            (BigDecimal)expected.elementAt(j);
+                        if ((bigDecExpected.compareTo(bigDecActual) != 0)) {
                             sbuf.append("\nFor element " + i + "(" + j +
-                                    "), expected = " + compareWith +
-                                    ", actual = " + val + " . ");
+                                    "), expected = " + expected +
+                                    ", actual = " + actual + " . ");
                         }
                     }
                 }
                 else {
                     sbuf.append("\nFor element " + i + ", expected = " +
-                        compareWith + ", actual = " + val + " . ");
+                        expected + ", actual = " + actual + " . ");
                 }
             }
 



Mime
View raw message