nim-stint/stint.nimble

39 lines
1.4 KiB
Plaintext
Raw Normal View History

2018-04-25 10:52:00 +00:00
packageName = "stint"
2022-01-31 22:30:45 +00:00
version = "2.0.0"
2018-02-15 12:11:01 +00:00
author = "Status Research & Development GmbH"
2018-04-25 10:52:00 +00:00
description = "Efficient stack-based multiprecision int in Nim"
2018-03-02 10:48:08 +00:00
license = "Apache License 2.0 or MIT"
2018-05-08 13:51:55 +00:00
skipDirs = @["tests", "benchmarks"]
2018-02-15 12:11:01 +00:00
### Dependencies
# TODO test only requirements don't work: https://github.com/nim-lang/nimble/issues/482
requires "nim >= 1.6.12",
2019-07-07 09:50:53 +00:00
"stew"
2023-06-12 14:07:15 +00:00
proc test(args, path: string) =
if not dirExists "build":
mkDir "build"
exec "nim " & getEnv("TEST_LANG", "c") & " " & getEnv("NIMFLAGS") & " " & args &
2022-02-24 19:09:53 +00:00
" --outdir:build -r --hints:off --warnings:off --skipParentCfg" &
2023-06-08 10:53:38 +00:00
" --styleCheck:usages --styleCheck:error " & path
if (NimMajor, NimMinor) > (1, 6):
exec "nim " & getEnv("TEST_LANG", "c") & " " & getEnv("NIMFLAGS") & " " & args &
" --outdir:build -r --mm:refc --hints:off --warnings:off --skipParentCfg" &
2023-06-08 12:03:16 +00:00
" --styleCheck:usages --styleCheck:error " & path
2018-04-24 17:07:22 +00:00
task test_internal, "Run tests for internal procs":
2023-06-12 14:07:15 +00:00
test "", "tests/internal"
task test_public_api, "Run all tests - prod implementation (StUint[64] = uint64":
2023-06-12 14:07:15 +00:00
test "", "tests/all_tests"
task test_uint256_ttmath, "Run random tests Uint256 vs TTMath":
requires "https://github.com/alehander42/nim-quicktest >= 0.18.0", "https://github.com/status-im/nim-ttmath"
switch("define", "release")
test "uint256_ttmath", "cpp"
2022-01-31 22:30:45 +00:00
task test, "Run all tests":
exec "nimble test_internal"
exec "nimble test_public_api"