فهرست منبع

Removing if statement and always testing reverse of x and y.

ankenyr 3 سال پیش
والد
کامیت
6ba7db3d55
1فایلهای تغییر یافته به همراه1 افزوده شده و 4 حذف شده
  1. 1 4
      tests/Jellyfin.Server.Implementations.Tests/Sorting/AiredEpisodeOrderComparerTests.cs

+ 1 - 4
tests/Jellyfin.Server.Implementations.Tests/Sorting/AiredEpisodeOrderComparerTests.cs

@@ -26,10 +26,7 @@ namespace Jellyfin.Server.Implementations.Tests.Sorting
             var cmp = new AiredEpisodeOrderComparer();
             var cmp = new AiredEpisodeOrderComparer();
 
 
             Assert.Equal(expected, cmp.Compare(x, y));
             Assert.Equal(expected, cmp.Compare(x, y));
-            if (expected == 1)
-            {
-                Assert.Equal(-expected, cmp.Compare(y, x));
-            }
+            Assert.Equal(-expected, cmp.Compare(y, x));
         }
         }
 
 
         private class EpisodeBadData : IEnumerable<object?[]>
         private class EpisodeBadData : IEnumerable<object?[]>