@@ -52,7 +52,7 @@ static control_t test_printf_d(const size_t call_count)
52
52
/* ************************************************************************/
53
53
/* ************************************************************************/
54
54
#if !defined(__NEWLIB_NANO)
55
- // Printf with %hhd is not supported by Newlib-Nano
55
+ // The format specifier %hhd is not supported by Newlib-Nano
56
56
result_minimal = mbed_printf (" hhd: %hhd\r\n " , SCHAR_MIN);
57
57
result_file = mbed_fprintf (stderr, " hhd: %hhd\r\n " , SCHAR_MIN);
58
58
result_baseline = printf (" hhd: %hhd\r\n " , SCHAR_MIN);
@@ -103,7 +103,7 @@ static control_t test_printf_d(const size_t call_count)
103
103
TEST_ASSERT_EQUAL_INT (result_baseline, result_file);
104
104
105
105
#if !defined(__NEWLIB_NANO)
106
- // Printf with %lld is not supported by Newlib-Nano
106
+ // The format specifier %lld is not supported by Newlib-Nano
107
107
result_minimal = mbed_printf (" lld: %lld\r\n " , LLONG_MIN);
108
108
result_file = mbed_fprintf (stderr, " lld: %lld\r\n " , LLONG_MIN);
109
109
result_baseline = printf (" lld: %lld\r\n " , LLONG_MIN);
@@ -177,7 +177,7 @@ static control_t test_printf_u(const size_t call_count)
177
177
/* ************************************************************************/
178
178
/* ************************************************************************/
179
179
#if !defined(__NEWLIB_NANO)
180
- // Printf with %hhu is not supported by Newlib-Nano
180
+ // The format specifier %hhu is not supported by Newlib-Nano
181
181
result_minimal = mbed_printf (" hhu: %hhu\r\n " , 0 );
182
182
result_file = mbed_fprintf (stderr, " hhu: %hhu\r\n " , 0 );
183
183
result_baseline = printf (" hhu: %hhu\r\n " , 0 );
@@ -227,7 +227,7 @@ static control_t test_printf_u(const size_t call_count)
227
227
TEST_ASSERT_EQUAL_INT (result_baseline, result_minimal);
228
228
TEST_ASSERT_EQUAL_INT (result_baseline, result_file);
229
229
#if !defined(__NEWLIB_NANO)
230
- // Printf with %llu is not supported by Newlib-Nano
230
+ // The format specifier %llu is not supported by Newlib-Nano
231
231
result_minimal = mbed_printf (" llu: %llu\r\n " , 0ULL );
232
232
result_file = mbed_fprintf (stderr, " llu: %llu\r\n " , 0ULL );
233
233
result_baseline = printf (" llu: %llu\r\n " , 0ULL );
@@ -301,7 +301,7 @@ static control_t test_printf_x(const size_t call_count)
301
301
/* ************************************************************************/
302
302
/* ************************************************************************/
303
303
#if !defined(__NEWLIB_NANO)
304
- // Printf with %hhX is not supported by Newlib-Nano
304
+ // The format specifier %hhX is not supported by Newlib-Nano
305
305
result_minimal = mbed_printf (" hhX: %hhX\r\n " , 0 );
306
306
result_file = mbed_fprintf (stderr, " hhX: %hhX\r\n " , 0 );
307
307
result_baseline = printf (" hhX: %hhX\r\n " , 0 );
@@ -351,7 +351,7 @@ static control_t test_printf_x(const size_t call_count)
351
351
TEST_ASSERT_EQUAL_INT (result_baseline, result_minimal);
352
352
TEST_ASSERT_EQUAL_INT (result_baseline, result_file);
353
353
#if !defined(__NEWLIB_NANO)
354
- // Printf with %llX is not supported by Newlib-Nano
354
+ // The format specifier %llX is not supported by Newlib-Nano
355
355
result_minimal = mbed_printf (" llX: %llX\r\n " , 0ULL );
356
356
result_file = mbed_fprintf (stderr, " llX: %llX\r\n " , 0ULL );
357
357
result_baseline = printf (" llX: %llX\r\n " , 0ULL );
@@ -451,7 +451,7 @@ static control_t test_snprintf_d(const size_t call_count)
451
451
/* ************************************************************************/
452
452
/* ************************************************************************/
453
453
#if !defined(__NEWLIB_NANO)
454
- // Printf with %hhd is not supported by Newlib-Nano
454
+ // The format specifier %hhd is not supported by Newlib-Nano
455
455
result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " hhd: %hhd\r\n " , SCHAR_MIN);
456
456
result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " hhd: %hhd\r\n " , SCHAR_MIN);
457
457
TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -494,7 +494,7 @@ static control_t test_snprintf_d(const size_t call_count)
494
494
TEST_ASSERT_EQUAL_INT (result_baseline, result_minimal);
495
495
496
496
#if !defined(__NEWLIB_NANO)
497
- // Printf with %lld is not supported by Newlib-Nano
497
+ // The format specifier %lld is not supported by Newlib-Nano
498
498
result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " lld: %lld\r\n " , LLONG_MIN);
499
499
result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " lld: %lld\r\n " , LLONG_MIN);
500
500
TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -561,7 +561,7 @@ static control_t test_snprintf_u(const size_t call_count)
561
561
/* ************************************************************************/
562
562
/* ************************************************************************/
563
563
#if !defined(__NEWLIB_NANO)
564
- // Printf with %hhu is not supported by Newlib-Nano
564
+ // The format specifier %hhu is not supported by Newlib-Nano
565
565
result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " hhu: %hhu\r\n " , 0 );
566
566
result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " hhu: %hhu\r\n " , 0 );
567
567
TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -603,7 +603,7 @@ static control_t test_snprintf_u(const size_t call_count)
603
603
TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
604
604
TEST_ASSERT_EQUAL_INT (result_baseline, result_minimal);
605
605
#if !defined(__NEWLIB_NANO)
606
- // Printf with %llu is not supported by Newlib-Nano
606
+ // The format specifier %llu is not supported by Newlib-Nano
607
607
result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " llu: %llu\r\n " , 0ULL );
608
608
result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " llu: %llu\r\n " , 0ULL );
609
609
TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -670,7 +670,7 @@ static control_t test_snprintf_x(const size_t call_count)
670
670
/* ************************************************************************/
671
671
/* ************************************************************************/
672
672
#if !defined(__NEWLIB_NANO)
673
- // Printf with %hhX is not supported by Newlib-Nano
673
+ // The format specifier %hhX is not supported by Newlib-Nano
674
674
result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " hhX: %hhX\r\n " , 0 );
675
675
result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " hhX: %hhX\r\n " , 0 );
676
676
TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -711,7 +711,7 @@ static control_t test_snprintf_x(const size_t call_count)
711
711
TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
712
712
TEST_ASSERT_EQUAL_INT (result_baseline, result_minimal);
713
713
#if !defined(__NEWLIB_NANO)
714
- // Printf with %llX is not supported by Newlib-Nano
714
+ // The format specifier %llX is not supported by Newlib-Nano
715
715
result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " llX: %llX\r\n " , 0ULL );
716
716
result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " llX: %llX\r\n " , 0ULL );
717
717
TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -935,7 +935,7 @@ static control_t test_snprintf_buffer_overflow_ld(const size_t call_count)
935
935
}
936
936
937
937
#if !defined(__NEWLIB_NANO)
938
- // Printf with %lld is not supported by Newlib-Nano
938
+ // The format specifier %lld is not supported by Newlib-Nano
939
939
static control_t test_snprintf_buffer_overflow_lld (const size_t call_count)
940
940
{
941
941
return test_snprintf_buffer_overflow_generic<long long , sizeof (" lld: -1099511627776" )>(" lld: %lld" , -1099511627776LL );
@@ -953,7 +953,7 @@ static control_t test_snprintf_buffer_overflow_lu(const size_t call_count)
953
953
}
954
954
955
955
#if !defined(__NEWLIB_NANO)
956
- // Printf with %llu is not supported by Newlib-Nano
956
+ // The format specifier %llu is not supported by Newlib-Nano
957
957
static control_t test_snprintf_buffer_overflow_llu (const size_t call_count)
958
958
{
959
959
return test_snprintf_buffer_overflow_generic<unsigned long long , sizeof (" llu: 1099511627776" )>(" llu: %llu" , 1099511627776ULL );
@@ -971,7 +971,7 @@ static control_t test_snprintf_buffer_overflow_lx(const size_t call_count)
971
971
}
972
972
973
973
#if !defined(__NEWLIB_NANO)
974
- // Printf with %llx is not supported by Newlib-Nano
974
+ // The format specifier %llx is not supported by Newlib-Nano
975
975
static control_t test_snprintf_buffer_overflow_llx (const size_t call_count)
976
976
{
977
977
return test_snprintf_buffer_overflow_generic<unsigned long long , sizeof (" llx: 0x10000000000" )>(" llx: 0x%llx" , 0x10000000000ULL );
@@ -1005,7 +1005,7 @@ Case cases[] = {
1005
1005
Case (" snprintf buffer overflow %x" , test_snprintf_buffer_overflow_x),
1006
1006
Case (" snprintf buffer overflow %lx" , test_snprintf_buffer_overflow_lx),
1007
1007
#if !defined(__NEWLIB_NANO)
1008
- // Printf with %lld,%llu,%llx is not supported by Newlib-Nano
1008
+ // The format specifier %lld,%llu,%llx is not supported by Newlib-Nano
1009
1009
Case (" snprintf buffer overflow %lld" , test_snprintf_buffer_overflow_lld),
1010
1010
Case (" snprintf buffer overflow %llu" , test_snprintf_buffer_overflow_llu),
1011
1011
Case (" snprintf buffer overflow %llx" , test_snprintf_buffer_overflow_llx),
0 commit comments