commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1306650 - /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
Date Thu, 29 Mar 2012 00:03:20 GMT
Author: sebb
Date: Thu Mar 29 00:03:19 2012
New Revision: 1306650

URL: http://svn.apache.org/viewvc?rev=1306650&view=rev
Log:
Test multiple adjacent comments

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

Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java?rev=1306650&r1=1306649&r2=1306650&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java Thu Mar
29 00:03:19 2012
@@ -333,11 +333,13 @@ public class CSVParserTest {
                 + "a,b\n"            // 1)
                 + "\"\n\",\" \"\n"   // 2)
                 + "#,\"\"\n"         // 3)
+                + "# Final comment\n"// 4)
                 ;
         String[][] res = {
                 {"a", "b"},
                 {"\n", " "},
                 {"#", ""},
+                {"# Final comment"}
         };
 
         CSVFormat format = CSVFormat.DEFAULT;
@@ -347,7 +349,7 @@ public class CSVParserTest {
         List<CSVRecord> records = parser.getRecords();
         assertTrue(records.size() > 0);
 
-        assertTrue(CSVPrinterTest.equals(res, records));
+        assertTrue("Failed to parse without comments", CSVPrinterTest.equals(res, records));
 
         String[][] res_comments = {
                 {"a", "b"},
@@ -358,7 +360,7 @@ public class CSVParserTest {
         parser = new CSVParser(code, format);
         records = parser.getRecords();
         
-        assertTrue(CSVPrinterTest.equals(res_comments, records));
+        assertTrue("Failed to parse with comments",CSVPrinterTest.equals(res_comments, records));
     }
 
     @Test



Mime
View raw message