forked from TCShenanigans/symphony_stdlib
Implement negative number parsing
This commit is contained in:
+15
-14
@@ -33,21 +33,22 @@ jl next_test
|
||||
; Done
|
||||
success: jmp success
|
||||
|
||||
|
||||
include stdlib
|
||||
|
||||
|
||||
@0x1000
|
||||
tests:
|
||||
; addr result inlen instr
|
||||
@0x1000 U32 0 U8 0 "\0"
|
||||
@0x1010 U32 0 U8 1 "0\0"
|
||||
@0x1020 U32 1 U8 1 "1\0"
|
||||
@0x1030 U32 2 U8 1 "2\0"
|
||||
@0x1040 U32 42 U8 2 "42\0"
|
||||
@0x1050 U32 67 U8 2 "67lol\0"
|
||||
@0x1060 U32 0x69a U8 5 "0x69a\0"
|
||||
@0x1070 U32 0o23 U8 3 "0239\0"
|
||||
@0x1080 U32 0b1011 U8 6 "0b1011\0"
|
||||
@0x1090 U32 0b10001 U8 7 "0b100012\0"
|
||||
end_of_tests:
|
||||
; inlen is the number of input bytes the function is expected to consume
|
||||
; addr result inlen instr
|
||||
@0x1000 U32 0 U8 0 "\0"
|
||||
@0x1010 U32 0 U8 1 "0\0"
|
||||
@0x1020 U32 1 U8 1 "1\0"
|
||||
@0x1030 U32 2 U8 1 "2\0"
|
||||
@0x1040 U32 42 U8 2 "42\0"
|
||||
@0x1050 U32 67 U8 2 "67lol\0"
|
||||
@0x1060 U32 0x69a U8 5 "0x69a\0"
|
||||
@0x1070 U32 0o23 U8 3 "0239\0"
|
||||
@0x1080 U32 0b1011 U8 6 "0b1011\0"
|
||||
@0x1090 U32 0b10001 U8 7 "0b100012\0"
|
||||
@0x10a0 U32 0xFFFFFFEB U8 3 "-21\0" ; Yuk
|
||||
@0x10b0
|
||||
end_of_tests:
|
||||
Reference in New Issue
Block a user