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 a test to compare negative numbers #25

Merged
merged 3 commits into from
Nov 22, 2019
Merged

Conversation

eg15
Copy link
Contributor

@eg15 eg15 commented Nov 21, 2019

Looks like I found a bug.
"-1000000000 < -1" returns 0 (false) on my machine which is obviously wrong.
The fix will follow.

@codecov
Copy link

codecov bot commented Nov 21, 2019

Codecov Report

Merging #25 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #25   +/-   ##
=======================================
  Coverage   99.71%   99.71%           
=======================================
  Files          16       16           
  Lines        3478     3478           
=======================================
  Hits         3468     3468           
  Misses         10       10
Impacted Files Coverage Δ
src/num.c 99.41% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 38cc514...96518d8. Read the comment docs.

@gavinhoward
Copy link
Owner

Yes, you did find a bug.

Your fix looks great, and your tests do as well. I just have two requests:

  1. Move your tests and results into files called comp.txt and comp_results.txt.
  2. Change the name in tests/bc/all.txt.

I want you to do this because I am going to write a more comprehensive set of tests for comparisons in general to make sure I did not miss anything else.

If you don't have the time to do this, I could always pull it and do the change myself.

@eg15
Copy link
Contributor Author

eg15 commented Nov 21, 2019

Just finished, thank you.

BTW it looks like busybox guys took your code and kept the bug in their modified version.
Just fixed it there as well: https://bugs.busybox.net/show_bug.cgi?id=12336

Then it should be fixed in Alpine (that's where I encountered it this morning).

@gavinhoward
Copy link
Owner

busybox didn't exactly take my code; I gave them my code, when it had a lot more bugs as well. Unfortunately, they decided to go their own way with it, so I don't really contribute back. (They added even more bugs.)

I will merge this when I get home from work. I should have a release out after testing, which could take up to a week. I don't expect this to take that long to test, since it's so small, but I may find other problems.

@gavinhoward gavinhoward merged commit 96518d8 into gavinhoward:master Nov 22, 2019
@gavinhoward
Copy link
Owner

I pulled manually. Thank you for your help!

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.

2 participants