commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1306313 - /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
Date Wed, 28 Mar 2012 13:32:14 GMT
Author: sebb
Date: Wed Mar 28 13:32:14 2012
New Revision: 1306313

URL: http://svn.apache.org/viewvc?rev=1306313&view=rev
Log:
Give a bit more detail when reporting an error

Modified:
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java

Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java?rev=1306313&r1=1306312&r2=1306313&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java Wed
Mar 28 13:32:14 2012
@@ -189,20 +189,24 @@ public class CSVPrinterTest {
 
     public static boolean equals(String[][] a, List<CSVRecord> b) {
         if (a.length != b.size()) {
+            System.out.println("expected length  :" + a.length);
+            System.out.println("got              :" + b.size());
             return false;
         }
         for (int i = 0; i < a.length; i++) {
             String[] linea = a[i];
             String[] lineb = b.get(i).values();
             if (linea.length != lineb.length) {
+                System.out.println("[" + i + "] expected length  :" + linea.length);
+                System.out.println("[" + i + "] got              :" + lineb.length);
                 return false;
             }
             for (int j = 0; j < linea.length; j++) {
                 String aval = linea[j];
                 String bval = lineb[j];
                 if (!aval.equals(bval)) {
-                    System.out.println("expected  :" + printable(aval));
-                    System.out.println("got       :" + printable(bval));
+                    System.out.println("[" + i + "," + j + "] expected  :" + printable(aval));
+                    System.out.println("[" + i + "," + j + "] got       :" + printable(bval));
                     return false;
                 }
             }



Mime
View raw message