Skip to content
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

add min/maximum(abs) #196

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

add min/maximum(abs) #196

wants to merge 2 commits into from

Conversation

aplavin
Copy link
Contributor

@aplavin aplavin commented Nov 25, 2024

No description provided.

@aplavin aplavin changed the title min/maximum(abs) add min/maximum(abs) Nov 25, 2024
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 62.50000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 94.84%. Comparing base (13c76e1) to head (37e0c1a).
Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
src/IntervalSets.jl 62.50% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #196      +/-   ##
==========================================
- Coverage   99.11%   94.84%   -4.27%     
==========================================
  Files           6        6              
  Lines         225      291      +66     
==========================================
+ Hits          223      276      +53     
- Misses          2       15      +13     

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

src/IntervalSets.jl Outdated Show resolved Hide resolved
Copy link
Collaborator

@hyrodium hyrodium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added a comment to improve the test coverage. Other changes look great to me!

Comment on lines +123 to +124
@test extrema(abs, iv"[-3, 2)") == (0, 3)
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a bit tedious, but could you add tests like this?

Suggested change
@test extrema(abs, iv"[-3, 2)") == (0, 3)
end
@test extrema(abs, iv"[-3, 2)") == (0, 3)
@test_throws ArgumentError minimum(abs, 2..1)
@test_throws ArgumentError minimum(abs, iv"(1,2)")
@test_throws ArgumentError minimum(abs, iv"[-3,-1)")
@test_throws ArgumentError minimum(abs, iv"(1,3]")
@test_throws ArgumentError maximum(abs, 2..1)
@test_throws ArgumentError maximum(abs, iv"(1,2)")
@test_throws ArgumentError maximum(abs, iv"(-3,-1]")
@test_throws ArgumentError maximum(abs, iv"[1,3)")
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants