@@ -52,6 +52,7 @@ static control_t test_printf_d(const size_t call_count)
52
52
/* ************************************************************************/
53
53
/* ************************************************************************/
54
54
#if !defined(__NEWLIB_NANO)
55
+ // The format specifier %hhd is not supported by Newlib-Nano
55
56
result_minimal = mbed_printf (" hhd: %hhd\r\n " , SCHAR_MIN);
56
57
result_file = mbed_fprintf (stderr, " hhd: %hhd\r\n " , SCHAR_MIN);
57
58
result_baseline = printf (" hhd: %hhd\r\n " , SCHAR_MIN);
@@ -102,6 +103,7 @@ static control_t test_printf_d(const size_t call_count)
102
103
TEST_ASSERT_EQUAL_INT (result_baseline, result_file);
103
104
104
105
#if !defined(__NEWLIB_NANO)
106
+ // The format specifier %lld is not supported by Newlib-Nano
105
107
result_minimal = mbed_printf (" lld: %lld\r\n " , LLONG_MIN);
106
108
result_file = mbed_fprintf (stderr, " lld: %lld\r\n " , LLONG_MIN);
107
109
result_baseline = printf (" lld: %lld\r\n " , LLONG_MIN);
@@ -175,6 +177,7 @@ static control_t test_printf_u(const size_t call_count)
175
177
/* ************************************************************************/
176
178
/* ************************************************************************/
177
179
#if !defined(__NEWLIB_NANO)
180
+ // The format specifier %hhu is not supported by Newlib-Nano
178
181
result_minimal = mbed_printf (" hhu: %hhu\r\n " , 0 );
179
182
result_file = mbed_fprintf (stderr, " hhu: %hhu\r\n " , 0 );
180
183
result_baseline = printf (" hhu: %hhu\r\n " , 0 );
@@ -224,6 +227,7 @@ static control_t test_printf_u(const size_t call_count)
224
227
TEST_ASSERT_EQUAL_INT (result_baseline, result_minimal);
225
228
TEST_ASSERT_EQUAL_INT (result_baseline, result_file);
226
229
#if !defined(__NEWLIB_NANO)
230
+ // The format specifier %llu is not supported by Newlib-Nano
227
231
result_minimal = mbed_printf (" llu: %llu\r\n " , 0ULL );
228
232
result_file = mbed_fprintf (stderr, " llu: %llu\r\n " , 0ULL );
229
233
result_baseline = printf (" llu: %llu\r\n " , 0ULL );
@@ -297,6 +301,7 @@ static control_t test_printf_x(const size_t call_count)
297
301
/* ************************************************************************/
298
302
/* ************************************************************************/
299
303
#if !defined(__NEWLIB_NANO)
304
+ // The format specifier %hhX is not supported by Newlib-Nano
300
305
result_minimal = mbed_printf (" hhX: %hhX\r\n " , 0 );
301
306
result_file = mbed_fprintf (stderr, " hhX: %hhX\r\n " , 0 );
302
307
result_baseline = printf (" hhX: %hhX\r\n " , 0 );
@@ -346,6 +351,7 @@ static control_t test_printf_x(const size_t call_count)
346
351
TEST_ASSERT_EQUAL_INT (result_baseline, result_minimal);
347
352
TEST_ASSERT_EQUAL_INT (result_baseline, result_file);
348
353
#if !defined(__NEWLIB_NANO)
354
+ // The format specifier %llX is not supported by Newlib-Nano
349
355
result_minimal = mbed_printf (" llX: %llX\r\n " , 0ULL );
350
356
result_file = mbed_fprintf (stderr, " llX: %llX\r\n " , 0ULL );
351
357
result_baseline = printf (" llX: %llX\r\n " , 0ULL );
@@ -445,6 +451,7 @@ static control_t test_snprintf_d(const size_t call_count)
445
451
/* ************************************************************************/
446
452
/* ************************************************************************/
447
453
#if !defined(__NEWLIB_NANO)
454
+ // The format specifier %hhd is not supported by Newlib-Nano
448
455
result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " hhd: %hhd\r\n " , SCHAR_MIN);
449
456
result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " hhd: %hhd\r\n " , SCHAR_MIN);
450
457
TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -487,6 +494,7 @@ static control_t test_snprintf_d(const size_t call_count)
487
494
TEST_ASSERT_EQUAL_INT (result_baseline, result_minimal);
488
495
489
496
#if !defined(__NEWLIB_NANO)
497
+ // The format specifier %lld is not supported by Newlib-Nano
490
498
result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " lld: %lld\r\n " , LLONG_MIN);
491
499
result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " lld: %lld\r\n " , LLONG_MIN);
492
500
TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -553,6 +561,7 @@ static control_t test_snprintf_u(const size_t call_count)
553
561
/* ************************************************************************/
554
562
/* ************************************************************************/
555
563
#if !defined(__NEWLIB_NANO)
564
+ // The format specifier %hhu is not supported by Newlib-Nano
556
565
result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " hhu: %hhu\r\n " , 0 );
557
566
result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " hhu: %hhu\r\n " , 0 );
558
567
TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -594,6 +603,7 @@ static control_t test_snprintf_u(const size_t call_count)
594
603
TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
595
604
TEST_ASSERT_EQUAL_INT (result_baseline, result_minimal);
596
605
#if !defined(__NEWLIB_NANO)
606
+ // The format specifier %llu is not supported by Newlib-Nano
597
607
result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " llu: %llu\r\n " , 0ULL );
598
608
result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " llu: %llu\r\n " , 0ULL );
599
609
TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -660,6 +670,7 @@ static control_t test_snprintf_x(const size_t call_count)
660
670
/* ************************************************************************/
661
671
/* ************************************************************************/
662
672
#if !defined(__NEWLIB_NANO)
673
+ // The format specifier %hhX is not supported by Newlib-Nano
663
674
result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " hhX: %hhX\r\n " , 0 );
664
675
result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " hhX: %hhX\r\n " , 0 );
665
676
TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
@@ -700,6 +711,7 @@ static control_t test_snprintf_x(const size_t call_count)
700
711
TEST_ASSERT_EQUAL_STRING (buffer_baseline, buffer_minimal);
701
712
TEST_ASSERT_EQUAL_INT (result_baseline, result_minimal);
702
713
#if !defined(__NEWLIB_NANO)
714
+ // The format specifier %llX is not supported by Newlib-Nano
703
715
result_minimal = mbed_snprintf (buffer_minimal, sizeof (buffer_minimal), " llX: %llX\r\n " , 0ULL );
704
716
result_baseline = snprintf (buffer_baseline, sizeof (buffer_baseline), " llX: %llX\r\n " , 0ULL );
705
717
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)
923
935
}
924
936
925
937
#if !defined(__NEWLIB_NANO)
938
+ // The format specifier %lld is not supported by Newlib-Nano
926
939
static control_t test_snprintf_buffer_overflow_lld (const size_t call_count)
927
940
{
928
941
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)
940
953
}
941
954
942
955
#if !defined(__NEWLIB_NANO)
956
+ // The format specifier %llu is not supported by Newlib-Nano
943
957
static control_t test_snprintf_buffer_overflow_llu (const size_t call_count)
944
958
{
945
959
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)
957
971
}
958
972
959
973
#if !defined(__NEWLIB_NANO)
974
+ // The format specifier %llx is not supported by Newlib-Nano
960
975
static control_t test_snprintf_buffer_overflow_llx (const size_t call_count)
961
976
{
962
977
return test_snprintf_buffer_overflow_generic<unsigned long long , sizeof (" llx: 0x10000000000" )>(" llx: 0x%llx" , 0x10000000000ULL );
@@ -990,6 +1005,7 @@ Case cases[] = {
990
1005
Case (" snprintf buffer overflow %x" , test_snprintf_buffer_overflow_x),
991
1006
Case (" snprintf buffer overflow %lx" , test_snprintf_buffer_overflow_lx),
992
1007
#if !defined(__NEWLIB_NANO)
1008
+ // The format specifiers %lld,%llu,%llx are not supported by Newlib-Nano
993
1009
Case (" snprintf buffer overflow %lld" , test_snprintf_buffer_overflow_lld),
994
1010
Case (" snprintf buffer overflow %llu" , test_snprintf_buffer_overflow_llu),
995
1011
Case (" snprintf buffer overflow %llx" , test_snprintf_buffer_overflow_llx),
0 commit comments