Jonathan Olsson
09/19/2023, 8:35 AMJonathan Olsson
09/19/2023, 8:40 AMshouldBeMonotonicallyDecreasing
seems to do the work:
Didn't find it in documentation though, or perhaps I am blind? 😛Copy codelistOf(10, 9, 8, 8, 6).shouldBeMonotonicallyDecreasing()
LeoColman
09/19/2023, 12:26 PMJonathan Olsson
09/19/2023, 12:27 PMLeoColman
09/19/2023, 12:27 PMlist.shouldBeSortedBy { transform }
I'd use this guyLeoColman
09/19/2023, 12:28 PMlist.reverse().shouldBeSorted()
LeoColman
09/19/2023, 12:29 PMlist.shouldBeSortedDesc()
if you want to open a ticket for thatJonathan Olsson
09/19/2023, 12:33 PMJonathan Olsson
09/19/2023, 12:33 PMJonathan Olsson
09/19/2023, 12:34 PMKlitos Kyriacou
09/19/2023, 12:51 PMlist.asReversed()
which iterates in reverse order without actually creating a reversed list.