@@ -52,6 +52,7 @@ static control_t test_printf_d(const size_t call_count)
5252 /* ************************************************************************/
5353 /* ************************************************************************/
5454#if !defined(__NEWLIB_NANO)
55+ // The format specifier %hhd is not supported by Newlib-Nano
5556 result_minimal = mbed_printf (" hhd: %hhd\r\n " , SCHAR_MIN);
5657 result_file = mbed_fprintf (stderr, " hhd: %hhd\r\n " , SCHAR_MIN);
5758 result_baseline = printf (" hhd: %hhd\r\n " , SCHAR_MIN);
@@ -102,6 +103,7 @@ static control_t test_printf_d(const size_t call_count)
102103 TEST_ASSERT_EQUAL_INT (result_baseline, result_file);
103104
104105#if !defined(__NEWLIB_NANO)
106+ // The format specifier %lld is not supported by Newlib-Nano
105107 result_minimal = mbed_printf (" lld: %lld\r\n " , LLONG_MIN);
106108 result_file = mbed_fprintf (stderr, " lld: %lld\r\n " , LLONG_MIN);
107109 result_baseline = printf (" lld: %lld\r\n " , LLONG_MIN);
@@ -175,6 +177,7 @@ static control_t test_printf_u(const size_t call_count)
175177 /* ************************************************************************/
176178 /* ************************************************************************/
177179#if !defined(__NEWLIB_NANO)
180+ // The format specifier %hhu is not supported by Newlib-Nano
178181 result_minimal = mbed_printf (" hhu: %hhu\r\n " , 0 );
179182 result_file = mbed_fprintf (stderr, " hhu: %hhu\r\n " , 0 );
180183 result_baseline = printf (" hhu: %hhu\r\n " , 0 );
@@ -224,6 +227,7 @@ static control_t test_printf_u(const size_t call_count)
224227 TEST_ASSERT_EQUAL_INT (result_baseline, result_minimal);
225228 TEST_ASSERT_EQUAL_INT (result_baseline, result_file);
226229#if !defined(__NEWLIB_NANO)
230+ // The format specifier %llu is not supported by Newlib-Nano
227231 result_minimal = mbed_printf (" llu: %llu\r\n " , 0ULL );
228232 result_file = mbed_fprintf (stderr, " llu: %llu\r\n " , 0ULL );
229233 result_baseline = printf (" llu: %llu\r\n " , 0ULL );
@@ -297,6 +301,7 @@ static control_t test_printf_x(const size_t call_count)
297301 /* ************************************************************************/
298302 /* ************************************************************************/
299303#if !defined(__NEWLIB_NANO)
304+ // The format specifier %hhX is not supported by Newlib-Nano
300305 result_minimal = mbed_printf (" hhX: %hhX\r\n " , 0 );
301306 result_file = mbed_fprintf (stderr, " hhX: %hhX\r\n " , 0 );
302307 result_baseline = printf (" hhX: %hhX\r\n " , 0 );
@@ -346,6 +351,7 @@ static control_t test_printf_x(const size_t call_count)
346351 TEST_ASSERT_EQUAL_INT (result_baseline, result_minimal);
347352 TEST_ASSERT_EQUAL_INT (result_baseline, result_file);
348353#if !defined(__NEWLIB_NANO)
354+ // The format specifier %llX is not supported by Newlib-Nano
349355 result_minimal = mbed_printf (" llX: %llX\r\n " , 0ULL );
350356 result_file = mbed_fprintf (stderr, " llX: %llX\r\n " , 0ULL );
351357 result_baseline = printf (" llX: %llX\r\n " , 0ULL );
@@ -445,6 +451,7 @@ static control_t test_snprintf_d(const size_t call_count)
445451 /* ************************************************************************/
446452 /* ************************************************************************/
447453#if !defined(__NEWLIB_NANO)
454+ // The format specifier %hhd is not supported by Newlib-Nano
448455 result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " hhd: %hhd\r\n " , SCHAR_MIN);
449456 result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " hhd: %hhd\r\n " , SCHAR_MIN);
450457 TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -487,6 +494,7 @@ static control_t test_snprintf_d(const size_t call_count)
487494 TEST_ASSERT_EQUAL_INT (result_baseline, result_minimal);
488495
489496#if !defined(__NEWLIB_NANO)
497+ // The format specifier %lld is not supported by Newlib-Nano
490498 result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " lld: %lld\r\n " , LLONG_MIN);
491499 result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " lld: %lld\r\n " , LLONG_MIN);
492500 TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -553,6 +561,7 @@ static control_t test_snprintf_u(const size_t call_count)
553561 /* ************************************************************************/
554562 /* ************************************************************************/
555563#if !defined(__NEWLIB_NANO)
564+ // The format specifier %hhu is not supported by Newlib-Nano
556565 result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " hhu: %hhu\r\n " , 0 );
557566 result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " hhu: %hhu\r\n " , 0 );
558567 TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -594,6 +603,7 @@ static control_t test_snprintf_u(const size_t call_count)
594603 TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
595604 TEST_ASSERT_EQUAL_INT (result_baseline, result_minimal);
596605#if !defined(__NEWLIB_NANO)
606+ // The format specifier %llu is not supported by Newlib-Nano
597607 result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " llu: %llu\r\n " , 0ULL );
598608 result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " llu: %llu\r\n " , 0ULL );
599609 TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -660,6 +670,7 @@ static control_t test_snprintf_x(const size_t call_count)
660670 /* ************************************************************************/
661671 /* ************************************************************************/
662672#if !defined(__NEWLIB_NANO)
673+ // The format specifier %hhX is not supported by Newlib-Nano
663674 result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " hhX: %hhX\r\n " , 0 );
664675 result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " hhX: %hhX\r\n " , 0 );
665676 TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -700,6 +711,7 @@ static control_t test_snprintf_x(const size_t call_count)
700711 TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
701712 TEST_ASSERT_EQUAL_INT (result_baseline, result_minimal);
702713#if !defined(__NEWLIB_NANO)
714+ // The format specifier %llX is not supported by Newlib-Nano
703715 result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " llX: %llX\r\n " , 0ULL );
704716 result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " llX: %llX\r\n " , 0ULL );
705717 TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -923,6 +935,7 @@ static control_t test_snprintf_buffer_overflow_ld(const size_t call_count)
923935}
924936
925937#if !defined(__NEWLIB_NANO)
938+ // The format specifier %lld is not supported by Newlib-Nano
926939static control_t test_snprintf_buffer_overflow_lld (const size_t call_count)
927940{
928941 return test_snprintf_buffer_overflow_generic<long long , sizeof (" lld: -1099511627776" )>(" lld: %lld" , -1099511627776LL );
@@ -940,6 +953,7 @@ static control_t test_snprintf_buffer_overflow_lu(const size_t call_count)
940953}
941954
942955#if !defined(__NEWLIB_NANO)
956+ // The format specifier %llu is not supported by Newlib-Nano
943957static control_t test_snprintf_buffer_overflow_llu (const size_t call_count)
944958{
945959 return test_snprintf_buffer_overflow_generic<unsigned long long , sizeof (" llu: 1099511627776" )>(" llu: %llu" , 1099511627776ULL );
@@ -957,6 +971,7 @@ static control_t test_snprintf_buffer_overflow_lx(const size_t call_count)
957971}
958972
959973#if !defined(__NEWLIB_NANO)
974+ // The format specifier %llx is not supported by Newlib-Nano
960975static control_t test_snprintf_buffer_overflow_llx (const size_t call_count)
961976{
962977 return test_snprintf_buffer_overflow_generic<unsigned long long , sizeof (" llx: 0x10000000000" )>(" llx: 0x%llx" , 0x10000000000ULL );
@@ -990,6 +1005,7 @@ Case cases[] = {
9901005 Case (" snprintf buffer overflow %x" , test_snprintf_buffer_overflow_x),
9911006 Case (" snprintf buffer overflow %lx" , test_snprintf_buffer_overflow_lx),
9921007#if !defined(__NEWLIB_NANO)
1008+ // The format specifiers %lld,%llu,%llx are not supported by Newlib-Nano
9931009 Case (" snprintf buffer overflow %lld" , test_snprintf_buffer_overflow_lld),
9941010 Case (" snprintf buffer overflow %llu" , test_snprintf_buffer_overflow_llu),
9951011 Case (" snprintf buffer overflow %llx" , test_snprintf_buffer_overflow_llx),
0 commit comments