This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-csv.git


The following commit(s) were added to refs/heads/master by this push:
     new 42b9fdb  CSV-244 Test case failures following CSVFormat#equals() update
42b9fdb is described below

commit 42b9fdb099a438886842795d8b0b325952d9f3e9
Author: Sebb <s...@apache.org>
AuthorDate: Sat Jun 15 14:29:30 2019 +0100

    CSV-244 Test case failures following CSVFormat#equals() update
---
 src/changes/changes.xml                                 |  1 +
 src/test/java/org/apache/commons/csv/CSVFormatTest.java | 11 ++++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d9cd5cf..70c1b8e 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -39,6 +39,7 @@
   </properties>
   <body>
     <release version="1.8" date="2019-MM-DD" description="Feature and bug fix 
release (Java 8)">
+      <action issue="CSV-244" type="fix" dev="sebb">Test case failures 
following CSVFormat#equals() update.</action>
       <action issue="CSV-243" type="fix" dev="sebb">CSVFormat withTrim() and 
withIgnoreSurroundingSpaces() need better docs.</action>
       <action issue="CSV-242" type="fix" dev="sebb">CSVFormat equals() and 
hashCode() don't use all fields.</action>
       <action issue="CSV-241" type="fix" dev="ggregory" due-to="LuckyIlam, 
Gary Gregory">CSVFormat#valiadte() does not account for 
allowDuplicateHeaderNames #43.</action>
diff --git a/src/test/java/org/apache/commons/csv/CSVFormatTest.java 
b/src/test/java/org/apache/commons/csv/CSVFormatTest.java
index dfdaf69..b67cc0f 100644
--- a/src/test/java/org/apache/commons/csv/CSVFormatTest.java
+++ b/src/test/java/org/apache/commons/csv/CSVFormatTest.java
@@ -517,10 +517,11 @@ public class CSVFormatTest {
         final CSVFormat csvFormatTwo = csvFormat.withIgnoreHeaderCase();
         csvFormatTwo.hashCode();
 
-        assertTrue(csvFormatTwo.getIgnoreHeaderCase());
+        assertFalse(csvFormat.getIgnoreHeaderCase());
+        assertTrue(csvFormatTwo.getIgnoreHeaderCase()); // now different
         assertFalse(csvFormatTwo.getTrailingDelimiter());
 
-        assertTrue(csvFormatTwo.equals(csvFormat)); // TODO this fails since 
CSV-242 was applied. Why should they compare equal?
+        assertFalse(csvFormatTwo.equals(csvFormat)); // CSV-244 - should not 
be equal
         assertFalse(csvFormatTwo.getAllowMissingColumnNames());
 
         assertFalse(csvFormatTwo.getTrim());
@@ -969,7 +970,7 @@ public class CSVFormatTest {
         assertNotSame(csvFormat, csvFormatTwo);
         assertNotSame(csvFormatTwo, csvFormat);
 
-        assertTrue(csvFormatTwo.equals(csvFormat)); // TODO this fails since 
CSV-242 was applied. Why should the formats compare equal?
+        assertFalse(csvFormatTwo.equals(csvFormat)); // CSV-244 - should not 
be equal
 
         final String string = csvFormatTwo.format(objectArray);
 
@@ -1031,9 +1032,9 @@ public class CSVFormatTest {
         assertNotSame(csvFormatTwo, csvFormat);
 
         assertNotNull(string);
-        assertTrue(csvFormat.equals(csvFormatTwo));
+        assertFalse(csvFormat.equals(csvFormatTwo)); // CSV-244 - should not 
be equal
 
-        assertTrue(csvFormatTwo.equals(csvFormat));
+        assertFalse(csvFormatTwo.equals(csvFormat)); // CSV-244 - should not 
be equal
         assertEquals(",,,,,,,", string);
 
     }

Reply via email to