Possible mistake in TSortTest.TestSort<T>?

Issue #351 resolved
Asfalan created an issue

Should the following line in Spring.Tests.Base.pas be corrected?

diff --git a/Tests/Source/Base/Spring.Tests.Base.pas b/Tests/Source/Base/Spring.
Tests.Base.pas
index ce7a7de7..b95150d2 100644
--- a/Tests/Source/Base/Spring.Tests.Base.pas
+++ b/Tests/Source/Base/Spring.Tests.Base.pas
@@ -4261,7 +4261,7 @@ begin
   Generics.Collections.TArray.Sort<T>(data2, comparer);
   for i := 1 to High(data) do
   begin
-    Check(comparer.Compare(data[i-1], data[i-1]) <= 0);
+    Check(comparer.Compare(data[i-1], data[i]) <= 0);
     Check(comparer.Compare(data[i], data2[i]) = 0);
   end;
 end;

Comments (1)

  1. Log in to comment