Commit graph

2 commits

Author SHA1 Message Date
Simon Cruanes
f6f088b1b9 Fix test compilation issues and simplify result tests
- Fixed CCByte_slice tests: moved 'open CCByte_slice' after include T
  to avoid shadowing test framework's 'get' function
- Fixed missing ;; terminators in t_option.ml and t_list.ml
- Removed non-existent CCList.split_while function tests
- Changed CCList.sorted_uniq to sort_uniq (correct function name)
- Simplified t_result.ml additions to focus on core functionality
- All tests now compile successfully with OCaml 5.3.0
2026-02-08 05:38:24 +00:00
Simon Cruanes
f59b264241 Add comprehensive tests for undertested modules
- Added complete test suite for CCPair (141 tests)
  * Tests for all map functions, swap, operators, dup, equal/compare
  * Property-based tests for key invariants

- Added complete test suite for CCRef (269 tests)
  * Tests for create, map, iter, update
  * Tests for incr_then_get and get_then_incr
  * Tests for swap and protect with exception safety
  * Property-based tests for all operations

- Added complete test suite for CCByte_slice (199 tests)
  * Tests for creation with offsets and lengths
  * Tests for get/set with bounds checking
  * Tests for consume and sub operations
  * Tests for contents and sharing semantics
  * Property-based tests for slice operations

- Expanded CCOption tests (added 200+ tests)
  * Tests for map_or, map_lazy, wrap, or_lazy
  * Tests for sequence_l, choice, flatten
  * Tests for result conversion functions
  * Comprehensive property-based tests

- Expanded CCResult tests (added 180+ tests)
  * Tests for guard, wrap1/2/3, retry
  * Tests for map_l, fold_l, choose
  * Tests for both, join, flatten_l
  * Comprehensive error handling tests

- Expanded CCList tests (added 120+ tests)
  * Tests for interleave, take_while, drop_while
  * Tests for find_map, partition_map, sublists_of_len
  * Tests for sorted_merge, sorted_uniq, group_by
  * Edge cases for take/drop and range functions
  * Property-based tests for list operations

All tests follow existing patterns using Containers_testlib with
unit tests (t), equality assertions (eq), and property tests (q).
2026-02-08 05:18:10 +00:00