mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-27 12:15:19 +01:00
Unit test.
This commit is contained in:
parent
8e8fb57178
commit
2fb28154a8
@ -174,6 +174,10 @@ int printf_lite_tests(void)
|
|||||||
loggf(F("\n"));
|
loggf(F("\n"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Test1arg(F("|80123456|"), F("|%X|"), (int)0xFFFFFFFF80123456);
|
||||||
|
Test1arg(F("|FFFFFFFF80123456|"), F("|%lX|"), 0xFFFFFFFF80123456);
|
||||||
|
|
||||||
Test1arg(F("Āࠀ𐀀🧊Выход'utf8'из"), F("Āࠀ𐀀🧊Выход'%s'из"), "utf8");
|
Test1arg(F("Āࠀ𐀀🧊Выход'utf8'из"), F("Āࠀ𐀀🧊Выход'%s'из"), "utf8");
|
||||||
|
|
||||||
|
|
||||||
|
@ -255,6 +255,14 @@ int printlib_tests(void)
|
|||||||
Test1arg(F("|00012|"), F("|%05u|"), 12);
|
Test1arg(F("|00012|"), F("|%05u|"), 12);
|
||||||
Test1arg(F("|0000C|"), F("|%05x|"), 12); // %x for PrintLib is %X for printf
|
Test1arg(F("|0000C|"), F("|%05x|"), 12); // %x for PrintLib is %X for printf
|
||||||
Test1arg(F("|0000C|"), F("|%05X|"), 12);
|
Test1arg(F("|0000C|"), F("|%05X|"), 12);
|
||||||
|
|
||||||
|
Test1arg(F("|80123456|"), F("|%03X|"), 0xFFFFFFFF80123456);
|
||||||
|
Test1arg(F("|FFFFFFFF80123456|"), F("|%03lX|"), 0xFFFFFFFF80123456);
|
||||||
|
Test1arg(F("|80123456|"), F("|%05X|"), 0xFFFFFFFF80123456);
|
||||||
|
Test1arg(F("|80123456|"), F("|%07X|"), 0xFFFFFFFF80123456);
|
||||||
|
Test1arg(F("|080123456|"), F("|%09X|"), 0xFFFFFFFF80123456);
|
||||||
|
Test1arg(F("|00000000000080123456|"), F("|%020X|"), 0xFFFFFFFF80123456);
|
||||||
|
Test1arg(F("|0000FFFFFFFF80123456|"), F("|%020X|"), 0xFFFFFFFF80123456);
|
||||||
|
|
||||||
// test limits
|
// test limits
|
||||||
int16_t i;
|
int16_t i;
|
||||||
|
Loading…
Reference in New Issue
Block a user