~ehmry/nim_cbor

598716d7b47905311cdb6b0ed1cec863bb2bb497 — Emery Hemingway a month ago 9dad670 trunk 20240823
Test with balls
3 files changed, 14 insertions(+), 7 deletions(-)

M tests/Tupfile
M tests/test.nim
M tests/test_bignum.nim
M tests/Tupfile => tests/Tupfile +1 -1
@@ 1,2 1,2 @@
include_rules
: foreach t*.nim |> !nim_run |>
: foreach t*.nim |> !balls |>

M tests/test.nim => tests/test.nim +8 -3
@@ 1,6 1,10 @@
import cbor, cbor/jsonhooks
# SPDX-FileCopyrightText: ☭ Emery Hemingway
# SPDX-License-Identifier: Unlicense

import std/[base64, json, jsonutils, os, random, times, unittest]
import
  std/[base64, json, jsonutils, os, random, times],
  pkg/balls,
  cbor, cbor/jsonhooks

proc findVectorsFile: string =
  var parent = getCurrentDir()


@@ 43,7 47,8 @@ suite "roundtrip":
        controlB64 = v["cbor"].getStr
        controlCbor = base64.decode controlB64
        c = parseCbor controlCbor
      test $c:
      let name = $c
      test name:
        let testCbor = encode(c)
        if controlCbor != testCbor:
          let testB64 = base64.encode(testCbor)

M tests/test_bignum.nim => tests/test_bignum.nim +5 -3
@@ 1,9 1,11 @@
# SPDX-FileCopyrightText: ☭ Emery Hemingway
# SPDX-License-Identifier: Unlicense

import pkg/bigints, cbor, cbor/bignum

import std/[streams, strutils, unittest]
import
  std/[streams, strutils],
  pkg/balls,
  pkg/bigints,
  cbor, cbor/bignum

suite "bignum":
  test "18446744073709551616":