Repository navigation
Commit 738ffaa
fixup! test: contracts of
`StackOps` and `IStackOps` give the stable sorting contract its new functions
`SortIntegersDescending` and `SortIntegersByDescending`. With them, the tests of the contract run
for `Stack` and `IStack` too: the descending sorts of 10 000 integers must allocate less than
3 MB, and `sortByDescending` must call the projection in the comparisons, in the order of
`List.sortByDescending`. The pipeline of the contract (create the stack, sort it, read it)
allocates 1.0 MB with `DescendingSorts` and 7.8 MB with the inline `Seq` sorts.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>Stack and IStack
1 parent 268f0c9 commit 738ffaa
2 files changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
166 | 169 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
216 | 223 | | |
0 commit comments