Skip to content

feat: accept any type of range in range assertions#21

Merged
haraldmaida merged 2 commits into
mainfrom
fix/accept-any-type-of-range-in-range-assertions
Apr 21, 2025
Merged

feat: accept any type of range in range assertions#21
haraldmaida merged 2 commits into
mainfrom
fix/accept-any-type-of-range-in-range-assertions

Conversation

@haraldmaida
Copy link
Copy Markdown
Member

Currently assertions that take a range as expected value support only RangeInclusive. This shall be enhanced to support more types of ranges.

The assertions is_in_range, is_not_in_range, has_length_in_range and has_char_count_in_range have been changed to support any type of range from the Rust core lib. More precisely, any type that implements core::ops::RangeBounds is now supported.

@haraldmaida haraldmaida added the enhancement New feature or request label Apr 21, 2025
@haraldmaida haraldmaida self-assigned this Apr 21, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2025

Codecov Report

Attention: Patch coverage is 93.24324% with 5 lines in your changes missing coverage. Please review.

Project coverage is 94.05%. Comparing base (3c2bc2e) to head (101986c).

Files with missing lines Patch % Lines
src/range/mod.rs 87.50% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
- Coverage   94.15%   94.05%   -0.10%     
==========================================
  Files          24       24              
  Lines        2224     2272      +48     
  Branches     2224     2272      +48     
==========================================
+ Hits         2094     2137      +43     
- Misses        124      129       +5     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@haraldmaida haraldmaida merged commit 600f6d5 into main Apr 21, 2025
16 of 18 checks passed
@haraldmaida haraldmaida deleted the fix/accept-any-type-of-range-in-range-assertions branch April 21, 2025 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant