Add test for previous commit.
This commit is contained in:
parent
5a4c06dbdc
commit
03ddfddcae
2 changed files with 11 additions and 2 deletions
|
|
@ -217,4 +217,13 @@ when isMainModule:
|
|||
}
|
||||
""")
|
||||
data = to(jsonNode, Data)
|
||||
doAssert data.person.isNil
|
||||
doAssert data.person.isNil
|
||||
|
||||
block:
|
||||
type
|
||||
FooBar = object
|
||||
field: float
|
||||
|
||||
let x = parseJson("""{ "field": 5}""")
|
||||
let data = to(x, FooBar)
|
||||
doAssert data.field == 5.0
|
||||
Loading…
Add table
Add a link
Reference in a new issue