Commit graph

5 commits

Author SHA1 Message Date
Glen Mével
13db1c31e9 tests/CCHeap: add tests 2024-07-31 16:03:06 +02:00
Glen Mével
92676f5513 tests/CCHeap: reorder tests 2024-07-31 03:27:52 +02:00
Glen Mével
78e67a9f4a tests/CCHeap: improve existing tests
- label all tests
- decouple tests about different heap functions
- random instances now have better coverage of possible cases:
  + more variability in size
    (previously, some tests were limited to a fixed size)
  + high probability of duplicates
    (previously, the probability of duplicates was negligible,
    because elements were drawn uniformly from the full `int` range)
- the test for `of_list, take_exn` is now more precise
  (added a duplicate element)
- the test for `to_list_sorted` is now more precise
  (checks that the resulting list is what we want,
  instead of just checking that it is sorted)
- the test for `filter` is now more precise
  (also checks that no element has been spuriously dropped)
- more uniform style for easier reading, using `|>`
2024-07-31 03:27:52 +02:00
Simon Cruanes
10865eaced reformat 2022-07-04 13:36:06 -04:00
Simon Cruanes
b695918e99
move all core tests to new testlib 2022-07-02 00:29:25 -04:00