diff --git a/src/tests.asm b/src/tests.asm index b14ce17..547986b 100644 --- a/src/tests.asm +++ b/src/tests.asm @@ -228,8 +228,8 @@ section .rodata putsStr db "Howdy, environment!",EOS ;printf() addTestHeader(_printf, "printf") - addTest(printf_invalid, "printf(''H%ell%0 T\\%t\he%%%re%\n'')") ;'H%ell%0 T\\%t\he%%re%' => 21 (+1 for NL) - printfStr1 db "H%ell%0 T\\%t\he%%%re%\n",EOS + addTest(printf_invalid, "printf(''H%e%9ll%0 T\\%t\he%%%re%\n'')") ;'H%e%9ll%0 T\\%t\he%%re%' => 23 (+1 for NL) + printfStr1 db "H%e%9ll%0 T\\%t\he%%%re%\n",EOS addTest(printf_hexpadd, "printf(''%x | %16x | %016x | %#16x | %#016x\n%X | %016X | %16X | %#016X | %#16X\n'', 80181775710, [... same arg 9 more times])") printfStr2 db "%x | %16x | %016x | %#16x | %#016x\n%X | %016X | %16X | %#016X | %#16X\n",EOS addTest(printf_ppadd, "printf(''%p | %16p | %016p | %#16p | %#016p\n%p | %016p | %16p | %#016p | %#16p\n'', 80181775710, [... same arg 9 more times])") @@ -653,7 +653,7 @@ _start: xor rdx, rdx xor rcx, rcx call printf - assert_eq(22) + assert_eq(24) ; TEST 2 (print hexadecimal numbers in multiple possible ways) printTest(printf_hexpadd)