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
{{ message }}
Repository navigation
Commit 50764b0
Browse filesBrowse the repository at this point in the historyBrowse files
fixup! test: contracts of IndexedList and IIndexedList, and the stable sorting contract
Tests of the sequence inputs, shared where every implementer has the function. The shared tests run for
`FlatList`, `IndexedList` and `IIndexedList`, and for `Queue`, `IQueue`, `Stack` and `IStack` once they
derive the contracts:
- `SeqCreationContract`: `ofSeq` rejects a default flat list given as a sequence with what it throws for
a null sequence (`FlatList`, `IndexedList`, `Queue`, `Stack`).
- `SeqLikeTransformationContract`: `concat` and `transpose`, in one data-row test each, reject a null
sequence of collections with `ArgumentNullException` that names the parameter of FSharp.Core (`arrays`
for `Array`, `lists` for `List`, mapped to the name of the module), and reject a default flat list given
as the sequence with what they throw for a null one. `List.concat` fails with `NullReferenceException`
for `null`, so the test asserts the exception of the module and not the one of the oracle.
- `SeqLikePartitioningContract`: `except` rejects a default flat list given as the items to exclude with
what it throws for null items, on an empty and on a non-empty input.
- `IndexedContract`: `insertManyAt` rejects null values and a default flat list with `ArgumentNullException`
for `values`, and checks the index before the values as `Array.insertManyAt` and `List.insertManyAt` do.
`Inputs.DefaultFlatListAsSeq` is the input of these tests.
Only the indexed list and its interface module have the next ones: `ListMembersContract` checks that
`removeMany` and `removeManyWith` reject null items and a default flat list, on an empty and on a
non-empty collection, and that they check the collection before the items.
The rest is per module, for what a contract over integers cannot say: the tables of `IndexedListTests`,
`IIndexedListTests` and `IndexedListBuilderTests` have the rows of a default flat list of strings given as
a sequence of objects, the order of the checks, and, for `IIndexedList`, a default flat list as an element
of the sequence of lists of `concat` and `transpose`. `IndexedListBuilderTests` replaces the table of null
values by one with a row for each function and each input, and checks that `insertManyAt` checks the index
before the values. `IndexedListComputationExpressionTests` has a table for `yield!` and `for`. The tests
that a flat list that is not default still passes as a sequence of objects are in the same classes.
`IIndexedListTests.insertManyAt rejects null values with the name of the parameter` is gone: the contract
of `insertManyAt` covers it for every module.
Breaking each fix once in a copy of the sources (28 changes: the check back to a null check, the check
removed, the checks in the old order, the check of an element removed) fails the tests in every case.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
0 commit comments