Skip to content

Commit cbb9220

Browse files
committed
Fixes #52: Test suite no longer checks for "10e+2", "10e+5" etc. but rather "1e+3", "1e+6" etc.
1 parent 53a150c commit cbb9220

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/test_suite.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -781,32 +781,32 @@ TEST_CASE("float", "[]" ) {
781781
// switch from decimal to exponential representation
782782
//
783783
CAPTURE_AND_PRINT(test::sprintf_, buffer, "%.0f", (double) ((int64_t)1 * 1000 ) );
784-
if (PRINTF_FLOAT_NOTATION_THRESHOLD < 10e+2) {
785-
CHECK(!strcmp(buffer, "10e+2"));
784+
if (PRINTF_FLOAT_NOTATION_THRESHOLD < 1e+3) {
785+
CHECK(!strcmp(buffer, "1e+3"));
786786
}
787787
else {
788788

789789
CHECK(!strcmp(buffer, "1000"));
790790
}
791791

792792
CAPTURE_AND_PRINT(test::sprintf_, buffer, "%.0f", (double) ((int64_t)1 * 1000 * 1000 ) );
793-
if (PRINTF_FLOAT_NOTATION_THRESHOLD < 10e+5) {
794-
CHECK(!strcmp(buffer, "10e+5"));
793+
if (PRINTF_FLOAT_NOTATION_THRESHOLD < 1e+6) {
794+
CHECK(!strcmp(buffer, "1e+6"));
795795
}
796796
else {
797797
CHECK(!strcmp(buffer, "1000000"));
798798
}
799799

800800
CAPTURE_AND_PRINT(test::sprintf_, buffer, "%.0f", (double) ((int64_t)1 * 1000 * 1000 * 1000 ) );
801-
if (PRINTF_FLOAT_NOTATION_THRESHOLD < 10e+8) {
802-
CHECK(!strcmp(buffer, "10e+8"));
801+
if (PRINTF_FLOAT_NOTATION_THRESHOLD < 1e+9) {
802+
CHECK(!strcmp(buffer, "1e+9"));
803803
}
804804
else {
805805
CHECK(!strcmp(buffer, "1000000000"));
806806
}
807807

808808
CAPTURE_AND_PRINT(test::sprintf_, buffer, "%.0f", (double) ((int64_t)1 * 1000 * 1000 * 1000 * 1000) );
809-
if (PRINTF_FLOAT_NOTATION_THRESHOLD < 10e+11) {
809+
if (PRINTF_FLOAT_NOTATION_THRESHOLD < 1e+12) {
810810
#if PRINTF_SUPPORT_EXPONENTIAL_SPECIFIERS
811811
CHECK(!strcmp(buffer, "1e+12"));
812812
#else
@@ -818,7 +818,7 @@ TEST_CASE("float", "[]" ) {
818818
}
819819

820820
CAPTURE_AND_PRINT(test::sprintf_, buffer, "%.0f", (double) ((int64_t)1 * 1000 * 1000 * 1000 * 1000 * 1000) );
821-
if (PRINTF_FLOAT_NOTATION_THRESHOLD < 10e+14) {
821+
if (PRINTF_FLOAT_NOTATION_THRESHOLD < 1e+15) {
822822
#if PRINTF_SUPPORT_EXPONENTIAL_SPECIFIERS
823823
CHECK(!strcmp(buffer, "1e+15"));
824824
#else

0 commit comments

Comments
 (0)