• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moonbitlang / core / 1289

22 Sep 2025 03:59PM UTC coverage: 89.443% (-0.2%) from 89.604%
1289

Pull #2755

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)
Pull Request #2755: hongbo/factor out slice

70 of 91 new or added lines in 2 files covered. (76.92%)

1 existing line in 1 file now uncovered.

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

81.94
/array/sort_by.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

© 2026 Coveralls, Inc