Skip to content

Commit 6fac0c2

Browse files
committed
Removing bogus assert as discussed in issue ARMmbed#354.
This tests had two bad test cases, the %e (%E) and %g (%G). As discussed in GitHub issue ARMmbed#154, the correct assert is one that ensures "the exponent always contains at least two digits, and only as many more digits as necessary to represent the exponent." Therefore, I am removing the asserts that contain two leading zeros in the exponent.
1 parent 15b80ad commit 6fac0c2

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

TESTS/mbed_drivers/c_strings/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,12 @@ void test_case_c_string_f_f() {
6060
void test_case_c_string_g_g() {
6161
CLEAN_BUFFER;
6262
sprintf(buffer, "%g %g %g %g %g %g %g %g %g %g", FLOATS);
63-
TEST_ASSERT_EQUAL_STRING("0.002 0.9243 15.9132 791.774 6208.2 25719.5 426816 6.42927e+006 4.2468e+007 2.12006e+008", buffer);
6463
TEST_ASSERT_EQUAL_STRING("0.002 0.9243 15.9132 791.774 6208.2 25719.5 426816 6.42927e+06 4.2468e+07 2.12006e+08", buffer);
6564
}
6665

6766
void test_case_c_string_e_E() {
6867
CLEAN_BUFFER;
6968
sprintf(buffer, "%e %E %e %E %e %E %e %E %e %E", FLOATS);
70-
TEST_ASSERT_EQUAL_STRING("2.000000e-003 9.243000E-001 1.591320e+001 7.917737E+002 6.208200e+003 2.571950E+004 4.268160e+005 6.429271E+006 4.246802e+007 2.120065E+008", buffer);
7169
TEST_ASSERT_EQUAL_STRING("2.000000e-03 9.243000E-01 1.591320e+01 7.917737E+02 6.208200e+03 2.571950E+04 4.268160e+05 6.429271E+06 4.246802e+07 2.120065E+08", buffer);
7270
}
7371

0 commit comments

Comments
 (0)