add empty string test for UInt256 (#15)

This commit is contained in:
Eric 2024-05-13 15:07:00 +10:00 committed by GitHub
parent b1e5e5d39a
commit fbabe954b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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