mirror of
https://github.com/logos-storage/nim-serde.git
synced 2026-01-07 16:13:06 +00:00
add empty string test for UInt256 (#15)
This commit is contained in:
parent
b1e5e5d39a
commit
fbabe954b4
@ -19,6 +19,10 @@ suite "json serialization - deserialize":
|
|||||||
let json = newJString("Second")
|
let json = newJString("Second")
|
||||||
check !MyEnum.fromJson(json) == 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":
|
test "deserializes UInt256 with no prefix":
|
||||||
let json = newJString("1")
|
let json = newJString("1")
|
||||||
check !UInt256.fromJson(json) == 1.u256
|
check !UInt256.fromJson(json) == 1.u256
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user