add empty string test for UInt256

This commit is contained in:
Eric 2024-05-13 15:04:01 +10:00
parent b1e5e5d39a
commit 1d8083e1db
No known key found for this signature in database

View File

@ -19,6 +19,10 @@ suite "json serialization - deserialize":
let json = newJString("Second")
check !MyEnum.fromJson(json) == Second
test "deserializes UInt256 from an empty string":
let json = newJString("")
check !UInt256.fromJson(json) == 0.u256
test "deserializes UInt256 with no prefix":
let json = newJString("1")
check !UInt256.fromJson(json) == 1.u256