diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-05-11 12:09:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 21:09:17 +0200 |
commit | a770c98e272109968203403009bfb617a5f2d33a (patch) | |
tree | 7cbf12cc404db0855fbf6ac8142771eebf20331a /tests | |
parent | e60672141a971da878dac6781fb907b9c520c219 (diff) | |
download | Nim-a770c98e272109968203403009bfb617a5f2d33a.tar.gz |
jsonutils: support set (#17994)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stdlib/tjsonutils.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/stdlib/tjsonutils.nim b/tests/stdlib/tjsonutils.nim index eaf5d68f9..c17c486b9 100644 --- a/tests/stdlib/tjsonutils.nim +++ b/tests/stdlib/tjsonutils.nim @@ -70,6 +70,12 @@ template fn() = doAssert b2.ord == 1 # explains the `1` testRoundtrip(a): """[1,2,3]""" + block: # set + type Foo = enum f1, f2, f3, f4, f5 + # type Goo = enum g1 = 10, g2 = 15, g3 = 17, g4 # in future PR, elements for holey enum should be treated as enum, not string + let a = ({f1, f3}, {1'u8, 7'u8}, {'0'..'9'}, {123'u16, 456, 789, 1121, 1122, 1542}) + testRoundtrip(a): """[[0,2],[1,7],[48,49,50,51,52,53,54,55,56,57],[123,456,789,1121,1122,1542]]""" + block: # bug #17383 block: let a = (int32.high, uint32.high) |