Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jangko committed Oct 11, 2024
1 parent eecf0e2 commit a3eeab8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_json_marshalling.nim
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ proc rand[T](_: type seq[T]): seq[T] =
for i in 0..<3:
result[i] = rand(T)

proc rand(_: type array[3, seq[byte]]): array[3, seq[byte]] =
var z = newSeq[byte](10)
discard randomBytes(z)
result[0] = z
result[1] = z
result[2] = z

proc rand[T](_: type SingleOrList[T]): SingleOrList[T] =
SingleOrList[T](kind: slkSingle, single: rand(T))

Expand Down

0 comments on commit a3eeab8

Please sign in to comment.