Add test for empty byte ranges

This commit is contained in:
coffeepots 2018-07-16 17:50:47 +01:00 committed by zah
parent da70fbc898
commit 3b2ce4e464
1 changed files with 5 additions and 0 deletions

View File

@ -167,3 +167,8 @@ test "encode byte arrays":
# The first byte here is the length of the datum (132 - 128 => 4) # The first byte here is the length of the datum (132 - 128 => 4)
$(rlp.listElem(1).rawData) == "R[132, 6, 8, 12, 123]" $(rlp.listElem(1).rawData) == "R[132, 6, 8, 12, 123]"
test "empty byte arrays":
var
rlp = rlpFromBytes rlp.encode("")
b = rlp.toBytes
check $b == "R[]"