You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/10/08 20:56:31 UTC

[GitHub] [arrow] eerhardt commented on a change in pull request #8404: ARROW-10238: [C#] List is broken

eerhardt commented on a change in pull request #8404:
URL: https://github.com/apache/arrow/pull/8404#discussion_r502007523



##########
File path: csharp/test/Apache.Arrow.Tests/FieldComparer.cs
##########
@@ -38,5 +39,26 @@ public static bool Equals(Field f1, Field f2)
             }
             return false;
         }
+
+        public static void Compare(Field expected, Field actual)

Review comment:
       They have the same logic, but different purposes.
   
   This one Asserts that the 2 Fields are equal, by going through each property and `Assert.Equal`. When something is not equal, this is a better option because xunit will tell you exactly what and why doesn't equal. The above `Equals` method only returns true or false if the 2 Fields equal. I needed to leave the `Equals` method in because there are a few places that `Assert.False(FieldComparer.Equals(f1, f2))`. Those couldn't be migrated to the `Compare` method because we expect the two instances to be different - so the Asserts would throw.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org