From e22353b3404731528235d2504bc56c87f9cb7544 Mon Sep 17 00:00:00 2001 From: jangko Date: Fri, 11 Oct 2024 14:44:25 +0700 Subject: [PATCH] Fix tests --- tests/test_json_marshalling.nim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_json_marshalling.nim b/tests/test_json_marshalling.nim index 5ea09ca..be6336b 100644 --- a/tests/test_json_marshalling.nim +++ b/tests/test_json_marshalling.nim @@ -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))