Migrate to `unittest2` (#125)
* Migrate to `unittest2` why: Global symbol overflow when running NIM 1.2 on Github ci suggests that unit tests run sort of separately. The replacement library `unittest2` provides that. * Build ci dependencies
This commit is contained in:
parent
4cab7b0879
commit
9c3596d9de
|
@ -155,6 +155,7 @@ jobs:
|
||||||
fi
|
fi
|
||||||
nim --version
|
nim --version
|
||||||
nimble --version
|
nimble --version
|
||||||
|
nimble install -y --depsOnly
|
||||||
env TEST_LANG=c nimble test
|
env TEST_LANG=c nimble test
|
||||||
env TEST_LANG=cpp nimble test
|
env TEST_LANG=cpp nimble test
|
||||||
|
|
||||||
|
@ -173,5 +174,6 @@ jobs:
|
||||||
- name: Test using VCC
|
- name: Test using VCC
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
run: |
|
run: |
|
||||||
|
nimble install -y --depsOnly
|
||||||
env TEST_LANG=c nimble testvcc
|
env TEST_LANG=c nimble testvcc
|
||||||
env TEST_LANG=cpp nimble testvcc
|
env TEST_LANG=cpp nimble testvcc
|
||||||
|
|
|
@ -7,7 +7,8 @@ description = "Backports, standard library candidates and small utilities that
|
||||||
license = "Apache License 2.0"
|
license = "Apache License 2.0"
|
||||||
skipDirs = @["tests"]
|
skipDirs = @["tests"]
|
||||||
|
|
||||||
requires "nim >= 1.2.0"
|
requires "nim >= 1.2.0",
|
||||||
|
"unittest2"
|
||||||
|
|
||||||
### Helper functions
|
### Helper functions
|
||||||
proc test(args, path: string) =
|
proc test(args, path: string) =
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import
|
import
|
||||||
random, unittest,
|
random, unittest2,
|
||||||
../../stew/ranges/bitranges, ../../stew/bitseqs
|
../../stew/ranges/bitranges, ../../stew/bitseqs
|
||||||
|
|
||||||
proc randomBytes(n: int): seq[byte] =
|
proc randomBytes(n: int): seq[byte] =
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import
|
import
|
||||||
unittest, math,
|
unittest2, math,
|
||||||
../../stew/ptrops,
|
../../stew/ptrops,
|
||||||
../../stew/ranges/[stackarrays]
|
../../stew/ranges/[stackarrays]
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import
|
import
|
||||||
unittest, sets,
|
unittest2, sets,
|
||||||
../../stew/ranges/[typedranges, ptr_arith]
|
../../stew/ranges/[typedranges, ptr_arith]
|
||||||
|
|
||||||
suite "Typed ranges":
|
suite "Typed ranges":
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
{.used.}
|
{.used.}
|
||||||
|
|
||||||
import
|
import
|
||||||
std/unittest,
|
unittest2,
|
||||||
../stew/arrayops
|
../stew/arrayops
|
||||||
|
|
||||||
suite "arrayops":
|
suite "arrayops":
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import
|
import
|
||||||
std/unittest,
|
unittest2,
|
||||||
../stew/assign2
|
../stew/assign2
|
||||||
|
|
||||||
suite "assign2":
|
suite "assign2":
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import unittest
|
import unittest2
|
||||||
import ../stew/base10
|
import ../stew/base10
|
||||||
|
|
||||||
when defined(nimHasUsed): {.used.}
|
when defined(nimHasUsed): {.used.}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import unittest
|
import unittest2
|
||||||
import ../stew/base32
|
import ../stew/base32
|
||||||
|
|
||||||
when defined(nimHasUsed): {.used.}
|
when defined(nimHasUsed): {.used.}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import unittest
|
import unittest2
|
||||||
import ../stew/base58
|
import ../stew/base58
|
||||||
|
|
||||||
when defined(nimHasUsed): {.used.}
|
when defined(nimHasUsed): {.used.}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import unittest
|
import unittest2
|
||||||
import ../stew/[base64, byteutils]
|
import ../stew/[base64, byteutils]
|
||||||
|
|
||||||
when defined(nimHasUsed): {.used.}
|
when defined(nimHasUsed): {.used.}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import unittest
|
import unittest2
|
||||||
|
|
||||||
import ../stew/bitops2
|
import ../stew/bitops2
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import
|
import
|
||||||
unittest, strformat,
|
unittest2, strformat,
|
||||||
../stew/[bitseqs]
|
../stew/[bitseqs]
|
||||||
|
|
||||||
suite "Bit fields":
|
suite "Bit fields":
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||||
|
|
||||||
import
|
import
|
||||||
std/unittest,
|
unittest2,
|
||||||
../stew/byteutils
|
../stew/byteutils
|
||||||
|
|
||||||
proc compilationTest {.exportc: "compilationTest".} =
|
proc compilationTest {.exportc: "compilationTest".} =
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import unittest
|
import unittest2
|
||||||
import ../stew/ctops
|
import ../stew/ctops
|
||||||
|
|
||||||
suite "Constant-time operations test suite":
|
suite "Constant-time operations test suite":
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import unittest
|
import unittest2
|
||||||
|
|
||||||
import ../stew/endians2
|
import ../stew/endians2
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
# distributed except according to those terms.
|
# distributed except according to those terms.
|
||||||
|
|
||||||
import
|
import
|
||||||
std/unittest,
|
unittest2,
|
||||||
../stew/interval_set
|
../stew/interval_set
|
||||||
|
|
||||||
const
|
const
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import unittest
|
import unittest2
|
||||||
import ../stew/io2
|
import ../stew/io2
|
||||||
|
|
||||||
suite "OS Input/Output procedures test suite":
|
suite "OS Input/Output procedures test suite":
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
# according to those terms.
|
# according to those terms.
|
||||||
|
|
||||||
import
|
import
|
||||||
std/[algorithm, sequtils, strformat, strutils, tables, unittest],
|
std/[algorithm, sequtils, strformat, strutils, tables],
|
||||||
|
unittest2,
|
||||||
../stew/keyed_queue,
|
../stew/keyed_queue,
|
||||||
../stew/keyed_queue/kq_debug
|
../stew/keyed_queue/kq_debug
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import
|
import
|
||||||
unittest, random,
|
unittest2, random,
|
||||||
../stew/[byteutils, leb128, results]
|
../stew/[byteutils, leb128, results]
|
||||||
|
|
||||||
const edgeValues = {
|
const edgeValues = {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import
|
import
|
||||||
unittest,
|
unittest2,
|
||||||
../stew/shims/macros
|
../stew/shims/macros
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import
|
import
|
||||||
unittest, typetraits,
|
unittest2, typetraits,
|
||||||
../stew/objects
|
../stew/objects
|
||||||
|
|
||||||
when defined(nimHasUsed):
|
when defined(nimHasUsed):
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#
|
#
|
||||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||||
|
|
||||||
import unittest
|
import unittest2
|
||||||
|
|
||||||
import ../stew/ptrops
|
import ../stew/ptrops
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||||
|
|
||||||
import
|
import
|
||||||
std/unittest,
|
unittest2,
|
||||||
../stew/sequtils2
|
../stew/sequtils2
|
||||||
|
|
||||||
suite "sequtils2":
|
suite "sequtils2":
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import
|
import
|
||||||
unittest,
|
unittest2,
|
||||||
../stew/shims/sets
|
../stew/shims/sets
|
||||||
|
|
||||||
suite "shims/sets":
|
suite "shims/sets":
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
import
|
import
|
||||||
std/[algorithm, sequtils, strformat, tables],
|
std/[algorithm, sequtils, strformat, tables],
|
||||||
../stew/sorted_set,
|
../stew/sorted_set,
|
||||||
unittest
|
unittest2
|
||||||
|
|
||||||
const
|
const
|
||||||
keyList = [
|
keyList = [
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import
|
import
|
||||||
unittest,
|
unittest2,
|
||||||
../stew/templateutils
|
../stew/templateutils
|
||||||
|
|
||||||
var computations = newSeq[string]()
|
var computations = newSeq[string]()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import
|
import
|
||||||
unittest, random,
|
unittest2, random,
|
||||||
../stew/[varints, byteutils]
|
../stew/[varints, byteutils]
|
||||||
|
|
||||||
const edgeValues = {
|
const edgeValues = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import std/unittest
|
import unittest2
|
||||||
import ../stew/io2
|
import ../stew/io2
|
||||||
|
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
|
|
Loading…
Reference in New Issue