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

fix: use is_nan #641

Merged
merged 1 commit into from
Jan 2, 2024
Merged

Conversation

vil02
Copy link
Member

@vil02 vil02 commented Dec 31, 2023

Description

First of all: all the best for the new year (according to Gregorian calendar)!

This PR changes the tests of the log to use is_nan. This change makes the tests more direct (i.e. we really want to check that log returns nan and not that rust panics probably due to comparing two nan's.).

@mihaubuhai - please have a look.

Checklist:

  • I ran bellow commands using the latest version of rust nightly.
  • I ran cargo clippy --all -- -D warnings just before my last commit and fixed any issue that was found.
  • I ran cargo fmt just before my last commit.
  • I ran cargo test just before my last commit and all tests passed.
  • I checked COUNTRIBUTING.md and my code follows its guidelines.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c522e60) 94.52% compared to head (a4caf8a) 94.53%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #641   +/-   ##
=======================================
  Coverage   94.52%   94.53%           
=======================================
  Files         282      282           
  Lines       22606    22606           
=======================================
+ Hits        21369    21371    +2     
+ Misses       1237     1235    -2     

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

@vil02 vil02 marked this pull request as ready for review December 31, 2023 11:40
@mihaubuhai
Copy link
Contributor

Yes :))) Didn't crossed my mind to think this way, thank you for looking into it!!!

Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@siriak siriak merged commit be71a36 into TheAlgorithms:master Jan 2, 2024
4 checks passed
@vil02 vil02 deleted the use_is_nan_in_tests_of_log branch January 2, 2024 12:17
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.

None yet

4 participants