-
Notifications
You must be signed in to change notification settings - Fork 139
hongbo/coverage add #2437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hongbo/coverage add #2437
Conversation
Empty test files should be removed or contain actual test contentCategory Potential overflow check logic may be incorrect in checked_mul testCategory Test documentation could be more specific about when to use inspect vs assert_eqCategory
|
b2ef504
to
ed7ed62
Compare
…nBit 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. **hashset/hashset_coverage_test.mbt**: Coverage-focused hashset tests (5 test cases) 5. **char/char_coverage_test.mbt**: Comprehensive character tests (7 test cases)
ed7ed62
to
0726d8c
Compare
Pull Request Test Coverage Report for Build 320Details
💛 - Coveralls |
} | ||
|
||
///| | ||
/// TODO: there is a bug in `checked_mul` that it does not handle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @peter-jerry-ye the checked_mul is buggy, see the test here
inspect
for tests and when to useassert_eq