Moved json enum index test to the proper file (#16826)
This commit is contained in:
parent
dde096ffde
commit
ecc9704bf4
2 changed files with 12 additions and 11 deletions
|
|
@ -1,11 +0,0 @@
|
|||
import json
|
||||
type Test = enum
|
||||
one, two, three, four, five
|
||||
let a = [
|
||||
one: 300,
|
||||
two: 20,
|
||||
three: 10,
|
||||
four: 0,
|
||||
five: -10
|
||||
]
|
||||
doAssert (%* a).to(a.typeof) == a
|
||||
|
|
@ -633,6 +633,18 @@ proc testJson() =
|
|||
except KeyError:
|
||||
doAssert getCurrentExceptionMsg().contains ".member.list[2].value"
|
||||
|
||||
block:
|
||||
# Enum indexed array test
|
||||
type Test = enum
|
||||
one, two, three, four, five
|
||||
let a = [
|
||||
one: 300,
|
||||
two: 20,
|
||||
three: 10,
|
||||
four: 0,
|
||||
five: -10
|
||||
]
|
||||
doAssert (%* a).to(a.typeof) == a
|
||||
|
||||
|
||||
testJson()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue