Skip to content

Commit

Permalink
Regards #156: Add testcase for the expected correct behavior for `pri…
Browse files Browse the repository at this point in the history
…ntf("%# 01.1g",, 9.8)`
  • Loading branch information
Eyal Rozenberg committed Dec 12, 2023
1 parent 835a48b commit 2634a30
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/test_suite_main_testcases.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,7 @@ PRINTF_TEST_CASE(floating_point_specifiers_precision_and_flags)
PRINTING_CHECK("-4e+04", ==, sprintf_, buffer, "%.1g", -40661.5);
PRINTING_CHECK("-4.e+04", ==, sprintf_, buffer, "%#.1g", -40661.5);
PRINTING_CHECK("100.", ==, sprintf_, buffer, "%#.3g", 99.998580932617187500);
PRINTING_CHECK("1.e01", ==, sprintf_, buffer, "%# 01.1g", 9.8);
// Note: The following value is _barely_ normal; make the mantissa 1.1 and it loses its normality.
PRINTING_CHECK("1.2345678901e-308", ==, sprintf_, buffer, "%.10e", 1.2345678901e-308);
// Rounding-focused checks
Expand Down

0 comments on commit 2634a30

Please sign in to comment.