You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the 0014-loan-comparaison test case, it uses the sort function to sort based on the rate.
Multiple products have the same rate (0.01325 and 0.03250).
The test case assumes that the sort algorithm used by the implementation keep the original order for items when they are equal.
HOWEVER, the sort function second parameter (the precedes function) is a boolean function that return true or false depending if the element precedes but there is no information about equality of objects.
Therefore, some sorting algorithms would not guarantee the order of the elements and this test case is biased toward a sorting that keep the order of the elements and from the spec, it does not mention that this is a requirement.
I would suggest modifying the rates of the products to make sure it fits all sorting algorithms (no duplicate rates).
The text was updated successfully, but these errors were encountered:
Based on the discussion on the meeting: There is a gap in the spec. When considering equality of the sorting function, there is no guarantee with more complex sorting algorithms, that the order of equal items based on the sorting function will stay the same.
In the 0014-loan-comparaison test case, it uses the sort function to sort based on the rate.
Multiple products have the same rate (0.01325 and 0.03250).
The test case assumes that the sort algorithm used by the implementation keep the original order for items when they are equal.
HOWEVER, the sort function second parameter (the precedes function) is a boolean function that return true or false depending if the element precedes but there is no information about equality of objects.
Therefore, some sorting algorithms would not guarantee the order of the elements and this test case is biased toward a sorting that keep the order of the elements and from the spec, it does not mention that this is a requirement.
I would suggest modifying the rates of the products to make sure it fits all sorting algorithms (no duplicate rates).
The text was updated successfully, but these errors were encountered: