1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests/fmt_print: improve test coverage

This commit is contained in:
MrKevinWeiss 2021-02-10 13:40:40 +01:00
parent c84c34c005
commit 73cd498dba
2 changed files with 27 additions and 0 deletions

View File

@ -25,6 +25,24 @@
int main(void)
{
print_str("If you can read this:\n");
print_u32_dec(0xFFFFFFFF);
print_str("\n");
print_s32_dec(0x80000000);
print_str("\n");
print_byte_hex(0xFA);
print_str("\n");
print_s32_dec(0x80000000);
print_str("\n");
print_u32_hex(0x12345678);
print_str("\n");
print_u64_hex(0x123456789ABCDEF0);
print_str("\n");
print_u64_dec(0xFFFFFFFFFFFFFFFF);
print_str("\n");
print_s64_dec(0x8000000000000000);
print_str("\n");
print_float(1.2345, 5);
print_str("\n");
print_str("Test successful.\n");
return 0;

View File

@ -6,6 +6,15 @@ from testrunner import run
def testfunc(child):
child.expect_exact('If you can read this:')
child.expect_exact('4294967295')
child.expect_exact('-2147483648')
child.expect_exact('FA')
child.expect_exact('-2147483648')
child.expect_exact('12345678')
child.expect_exact('123456789ABCDEF0')
child.expect_exact('18446744073709551615')
child.expect_exact('-9223372036854775808')
child.expect_exact('1.23450')
child.expect_exact('Test successful.')