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

areeve pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-dotnet.git


The following commit(s) were added to refs/heads/main by this push:
     new f49331f  chore: Fix test warnings about skipping duplicate test cases 
(#272)
f49331f is described below

commit f49331fff8082cbbed904bd1d0741787413bd7e7
Author: Adam Reeve <[email protected]>
AuthorDate: Mon Feb 23 16:51:00 2026 +1300

    chore: Fix test warnings about skipping duplicate test cases (#272)
    
    `ExampleDates` contains dates as `DateTime` values with the same day
    number but different kind, and the kind is dropped when converting to
    `DateOnly`, so this leads to duplicate test data values.
    
    This adds a new `ExampleDateOnlyDates` function without duplicates.
---
 test/Apache.Arrow.Tests/Date32ArrayTests.cs    | 2 +-
 test/Apache.Arrow.Tests/Date64ArrayTests.cs    | 2 +-
 test/Apache.Arrow.Tests/TestDateAndTimeData.cs | 9 +++++++++
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/test/Apache.Arrow.Tests/Date32ArrayTests.cs 
b/test/Apache.Arrow.Tests/Date32ArrayTests.cs
index 6e4742c..65812d1 100644
--- a/test/Apache.Arrow.Tests/Date32ArrayTests.cs
+++ b/test/Apache.Arrow.Tests/Date32ArrayTests.cs
@@ -33,7 +33,7 @@ namespace Apache.Arrow.Tests
 
 #if NET6_0_OR_GREATER
         public static IEnumerable<object[]> GetDateOnlyData() =>
-            TestDateAndTimeData.ExampleDates.Select(d => new object[] { 
DateOnly.FromDateTime(d) });
+            TestDateAndTimeData.ExampleDateOnlyDates.Select(d => new object[] 
{ d });
 #endif
 
         public class AppendNull
diff --git a/test/Apache.Arrow.Tests/Date64ArrayTests.cs 
b/test/Apache.Arrow.Tests/Date64ArrayTests.cs
index 22ae08a..0b78787 100644
--- a/test/Apache.Arrow.Tests/Date64ArrayTests.cs
+++ b/test/Apache.Arrow.Tests/Date64ArrayTests.cs
@@ -35,7 +35,7 @@ namespace Apache.Arrow.Tests
 
 #if NET6_0_OR_GREATER
         public static IEnumerable<object[]> GetDateOnlyData() =>
-            TestDateAndTimeData.ExampleDates.Select(d => new object[] { 
DateOnly.FromDateTime(d) });
+            TestDateAndTimeData.ExampleDateOnlyDates.Select(d => new object[] 
{ d });
 #endif
 
         public class AppendNull
diff --git a/test/Apache.Arrow.Tests/TestDateAndTimeData.cs 
b/test/Apache.Arrow.Tests/TestDateAndTimeData.cs
index 8a8f76b..e923938 100644
--- a/test/Apache.Arrow.Tests/TestDateAndTimeData.cs
+++ b/test/Apache.Arrow.Tests/TestDateAndTimeData.cs
@@ -59,6 +59,15 @@ namespace Apache.Arrow.Tests
             from kind in _exampleKinds
             select DateTime.SpecifyKind(date, kind);
 
+#if NET6_0_OR_GREATER
+        /// <summary>
+        /// Gets a collection of example dates (i.e. with a zero time 
component) as DateOnly values.
+        /// </summary>
+        public static IEnumerable<DateOnly> ExampleDateOnlyDates =>
+            from date in _exampleDates
+            select DateOnly.FromDateTime(date);
+#endif
+
         /// <summary>
         /// Gets a collection of example times
         /// </summary>

Reply via email to