Move testing to `release` mode only.

Reduce number of test vectors.
This commit is contained in:
cheatfate 2018-09-28 03:43:58 +03:00
parent 06071e5ad8
commit ea38d7b5b8
2 changed files with 3 additions and 13 deletions

View File

@ -11,17 +11,8 @@ requires "nim > 0.18.0"
requires "https://github.com/cheatfate/nimcrypto"
task test, "Run all tests":
exec "nim c -f -r tests/tarith"
exec "nim c -f -r -d:release tests/tarith"
exec "nim c -f -r tests/tfields"
exec "nim c -f -r -d:release tests/tfields"
exec "nim c -f -r tests/tgroups"
exec "nim c -f -r -d:release tests/tgroups"
exec "nim c -f -r tests/tpairing"
exec "nim c -f -r -d:release tests/tpairing"
exec "nim c -f -r tests/tvectors"
exec "nim c -f -r -d:release tests/tvectors"

View File

@ -2,10 +2,9 @@ import unittest
import nimcrypto/utils
import ../bncurve/[fields, groups]
when not defined(release):
const TestsCount = 10
else:
const TestsCount = 10000
# Total size of test vectors is 10_000, but CI is too slow to test it
# in reasonable time, so we will test only 1000 vectors.
const TestsCount = 1000
const
FRExpected = [