From 12d45a7e085c9ef3920318be40fb48c8069f1e41 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Wed, 11 Apr 2018 14:48:34 +0300 Subject: [PATCH] setup nimble test --- .gitignore | 15 +++++++++++++++ eth_rpc.nimble | 13 ++++++++++++- tests/all.nim | 3 +++ tests/testutils.nim | 3 +-- 4 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 tests/all.nim diff --git a/.gitignore b/.gitignore index 67d9b34..0e69085 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,16 @@ +# Ignore all files without extensions (unix executable files) +* +!*.* +!*/ + +# Ignore all binary outputs +*.so +*.dylib +*.a +*.la +*.exe +*.dll + +# Ignore the nimcache folders nimcache/ + diff --git a/eth_rpc.nimble b/eth_rpc.nimble index 9d67776..7455c6e 100644 --- a/eth_rpc.nimble +++ b/eth_rpc.nimble @@ -6,4 +6,15 @@ license = "Apache License 2.0" srcDir = "src" ### Dependencies -requires "nim >= 0.17.3" \ No newline at end of file +requires "nim >= 0.17.3", + "nimcrypto" + +proc configForTests() = + --hints: off + --debuginfo + --path: "." + --run + +task test, "run tests": + configForTests() + setCommand "c", "tests/all.nim" diff --git a/tests/all.nim b/tests/all.nim new file mode 100644 index 0000000..31cf7bd --- /dev/null +++ b/tests/all.nim @@ -0,0 +1,3 @@ +import + testutils, testserverclient + diff --git a/tests/testutils.nim b/tests/testutils.nim index 57f2986..d9a25b4 100644 --- a/tests/testutils.nim +++ b/tests/testutils.nim @@ -1,4 +1,4 @@ -import strutils, ../src/server/private/transportutils, unittest +import strutils, eth-rpc/server/private/transportutils, unittest suite "Encoding": test "Encode quantity": @@ -13,4 +13,3 @@ suite "Encoding": for i, b in bytePairs(0x07_06_05_04_03_02_01_00'u64): check b == i.byte - \ No newline at end of file