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

Some test suite tests fail when setting MAX_INTEGRAL_DIGITS_FOR_DECIMAL #112

Closed
eyalroz opened this issue Feb 4, 2022 · 0 comments
Closed
Assignees
Labels
resolved-on-develop A changeset fixing this issue has been commiutted to the development branch testing Only relevant to the testing programs rather than the main code itself

Comments

@eyalroz
Copy link
Owner

eyalroz commented Feb 4, 2022

Our expected values for testcase "floating-point specifiers with 31-32 bit integer values" assume that %f specifiers are interpreted as %e for too many decimal digits; but - this assumption doesn't always hold. This it is an error to simply check that:

  PRINTING_CHECK("2.1474836470e+09", ==, sprintf_, buffer, "%.10f", 2147483647.0); // 2^31 - 1

and we should actually check for something different depending on MAX_INTEGRAL_DIGITS_FOR_DECIMAL.

Related to #111.

@eyalroz eyalroz self-assigned this Feb 4, 2022
@eyalroz eyalroz added the testing Only relevant to the testing programs rather than the main code itself label Feb 4, 2022
eyalroz added a commit that referenced this issue Feb 4, 2022
…rintf.c`; and separated cases of what's expected to be printed based on the value of `PRINTF_MAX_INTEGRAL_DIGITS_FOR_DECIMAL`.
@eyalroz eyalroz added the resolved-on-develop A changeset fixing this issue has been commiutted to the development branch label Feb 4, 2022
eyalroz added a commit that referenced this issue Feb 7, 2022
…rintf.c`; and separated cases of what's expected to be printed based on the value of `PRINTF_MAX_INTEGRAL_DIGITS_FOR_DECIMAL`.
eyalroz added a commit that referenced this issue Feb 10, 2022
…rintf.c`; and separated cases of what's expected to be printed based on the value of `PRINTF_MAX_INTEGRAL_DIGITS_FOR_DECIMAL`.
eyalroz added a commit that referenced this issue Feb 11, 2022
…rintf.c`; and separated cases of what's expected to be printed based on the value of `PRINTF_MAX_INTEGRAL_DIGITS_FOR_DECIMAL`.
eyalroz added a commit that referenced this issue Feb 21, 2022
…rintf.c`; and separated cases of what's expected to be printed based on the value of `PRINTF_MAX_INTEGRAL_DIGITS_FOR_DECIMAL`.
@eyalroz eyalroz closed this as completed Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolved-on-develop A changeset fixing this issue has been commiutted to the development branch testing Only relevant to the testing programs rather than the main code itself
Projects
None yet
Development

No branches or pull requests

1 participant