add dump hex test

This commit is contained in:
Mamy André-Ratsimbazafy 2019-09-25 16:12:54 +02:00
parent 7e5e398dc5
commit 36f143bcc2
No known key found for this signature in database
GPG Key ID: 7B88AD1FE79492E1
1 changed files with 9 additions and 0 deletions

View File

@ -85,6 +85,15 @@ suite "Testing input and output procedures":
# TODO: negative hex
test "Hex dump":
block:
let a = 0x1234567890ABCDEF.stint(128)
check: a.dumpHex(bigEndian).toUpperAscii == "00000000000000001234567890ABCDEF"
block:
let a = 0x1234567890ABCDEF.stuint(128)
check: a.dumpHex(bigEndian).toUpperAscii == "00000000000000001234567890ABCDEF"
block:
let a = 0x1234'i32.stint(32)
check: a.dumpHex(bigEndian).toUpperAscii == "00001234"