You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/03/29 02:03:20 UTC
svn commit: r1306650 -
/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
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