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

moonbitlang / core / 319
90%
main: 97%

Build:
Build:
LAST BUILD BRANCH: Guest0x0/merge-iter
DEFAULT BRANCH: main
Ran 13 Jul 2025 07:46AM UTC
Jobs 1
Files 237
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Jul 2025 07:45AM UTC coverage: 89.53% (+0.2%) from 89.325%
319

Pull #2437

github

bobzhang
Question: I have successfully increased the test coverage for the MoonBit standard library by creating comprehensive tests for multiple packages. Here's a summary of the improvements:

## Coverage Improvements:

**Overall Coverage**: Increased from **5,225/5,778 (90.4%)** to **5,238/5,778 (90.6%)**

### Files with Improved Coverage:

1. **immut/array/tree_utils.mbt**: 28/34 → 30/34 (coverage: 88.2%)
   - Added comprehensive whitebox tests for tree utility functions
   - Tested: `is_node()`, `is_leaf()`, `left_child()`, `right_child()`, `leaf_elements()`, `node_children()`, `local_size()`, `size()`

2. **strconv/number.mbt**: 82/97 → 84/97 (coverage: 86.6%)
   - Added whitebox tests for number parsing utilities
   - Tested: `parse_inf_nan()` with various cases including infinity, NaN, signed values, case-insensitive parsing
   - Tested: `checked_mul()` with edge cases including zero, one, and overflow scenarios

3. **hashset/hashset.mbt**: 173/186 → 180/186 (coverage: 96.8%)
   - Added comprehensive test cases for set operations
   - Tested: `is_disjoint()` with different set sizes, `is_subset()` with size comparisons, large set operations

4. **immut/array/utils.mbt**: Enhanced coverage through new whitebox tests
   - Tested utility functions: `immutable_set()`, `immutable_push()`, `shr_as_uint()`, `radix_indexing()`, `get_branch_index()`, `copy_sizes()`, `min()`

5. **char/char.mbt**: Enhanced with comprehensive character classification tests
   - Tested edge cases for ASCII classification, digit validation with different radixes, Unicode whitespace characters, numeric character testing, printable character validation, case conversion, and punctuation testing

## Test Files Created:

1. **immut/array/tree_utils_wbtest.mbt**: Whitebox tests for tree utilities (10 test cases)
2. **immut/array/utils_wbtest2.mbt**: Whitebox tests for array utilities (8 test cases)
3. **strconv/number_wbtest.mbt**: Whitebox tests for number parsing (7 test cases)
4. **has... (continued)
Pull Request #2437: hongbo/coverage add

3489 of 3897 relevant lines covered (89.53%)

198842.76 hits per line

Jobs
ID Job ID Ran Files Coverage
1 319.1 13 Jul 2025 07:46AM UTC 238
89.6
GitHub Action Run
Source Files on build 319
  • Tree
  • List 237
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #2437
  • PR Base - main (#313)
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