Convert round calls to math.Round#777
Conversation
elliotchance
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @icholy)
tests/math.c, line 406 at r1 (raw file):
is_nan(round(NAN)); is_eq(round(INFINITY), INFINITY); is_eq(round(-INFINITY), -INFINITY);
You cannot use equality tests with infinities, you can us this instead:
is_inf(round(INFINITY), 1);
is_inf(round(-INFINITY), -1);Docs here: https://github.com/elliotchance/c2go/blob/master/tests/tests.h#L205-L224
icholy
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @icholy)
tests/math.c, line 406 at r1 (raw file):
Previously, elliotchance (Elliot Chance) wrote…
You cannot use equality tests with infinities, you can us this instead:
is_inf(round(INFINITY), 1); is_inf(round(-INFINITY), -1);Docs here: https://github.com/elliotchance/c2go/blob/master/tests/tests.h#L205-L224
Derp, that makes perfect sense.
icholy
left a comment
There was a problem hiding this comment.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @elliotchance)
tests/math.c, line 406 at r1 (raw file):
Previously, icholy (Ilia Choly) wrote…
Derp, that makes perfect sense.
Done.
elliotchance
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @icholy)
tests/math.c, line 14 at r1 (raw file):
int main() { plan(359);
You will need to update this to 372. This is an extra safety net to make sure all the tests do actually run.
icholy
left a comment
There was a problem hiding this comment.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @elliotchance)
tests/math.c, line 14 at r1 (raw file):
Previously, elliotchance (Elliot Chance) wrote…
You will need to update this to
372. This is an extra safety net to make sure all the tests do actually run.
Done.
elliotchance
left a comment
There was a problem hiding this comment.
The build is still failing, do the tests pass locally on your machine?
Reviewed 1 of 1 files at r3.
Reviewable status:complete! all files reviewed, all discussions resolved
I'm having issues with the
INFINITYtests.This change is