• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
Build has been canceled!

moonbitlang / core / 1290

23 Sep 2025 01:27AM UTC coverage: 89.443% (-0.2%) from 89.604%
1290

push

github

bobzhang
Add comprehensive tests for Array::partition function

Added extensive test coverage for the internal partition function used by quicksort:
- Basic partitioning tests with middle pivot and already partitioned arrays
- Edge case tests for empty ranges, single elements, and two-element arrays
- Tests with duplicate values to ensure stable partitioning
- Tests with different pivot positions (first, last, sub-range)
- Special cases: all equal elements and reverse sorted arrays

These tests verify:
- Correct relative position returns (validates previous bug fix)
- Proper partitioning invariant (elements < pivot on left, >= pivot on right)
- Accurate 'partitioned' flag indicating if rearrangement occurred
- Boundary conditions and sub-range operations

All 6 new test blocks pass successfully (215 tests in array package)

9294 of 10391 relevant lines covered (89.44%)

198519.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

89.29
/array/sort.mbt


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc