mirror of https://github.com/status-im/nim-eth.git
Move Ethereum specific RLP encoding tests under tests/common (#673)
This is more according to the structure of the code itself. And also, currently some of these tests live under tests/rlp but some under tests/common. Could use some further re-organisation within the different tests, but this move is a first step.
This commit is contained in:
parent
2ad07a6010
commit
8ab060b19f
|
@ -1,5 +1,5 @@
|
||||||
# Nimbus
|
# nim-eth
|
||||||
# Copyright (c) 2023 Status Research & Development GmbH
|
# Copyright (c) 2023-2024 Status Research & Development GmbH
|
||||||
# Licensed under either of
|
# Licensed under either of
|
||||||
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0)
|
# http://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
@ -10,5 +10,6 @@
|
||||||
|
|
||||||
import
|
import
|
||||||
test_eth_types,
|
test_eth_types,
|
||||||
|
test_eth_types_rlp,
|
||||||
|
test_common,
|
||||||
test_eip4844
|
test_eip4844
|
||||||
|
|
|
@ -17,7 +17,7 @@ type
|
||||||
header: BlockHeader
|
header: BlockHeader
|
||||||
|
|
||||||
proc loadFile(x: int) =
|
proc loadFile(x: int) =
|
||||||
let fileName = "tests" / "rlp" / "eip2718" / "acl_block_" & $x & ".json"
|
let fileName = "tests" / "common" / "eip2718" / "acl_block_" & $x & ".json"
|
||||||
test fileName:
|
test fileName:
|
||||||
let n = json.parseFile(fileName)
|
let n = json.parseFile(fileName)
|
||||||
let data = n["rlp"].getStr()
|
let data = n["rlp"].getStr()
|
|
@ -1,3 +1,13 @@
|
||||||
|
# nim-eth
|
||||||
|
# Copyright (c) 2023-2024 Status Research & Development GmbH
|
||||||
|
# Licensed under either of
|
||||||
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
|
||||||
|
# http://opensource.org/licenses/MIT)
|
||||||
|
# at your option. This file may not be copied, modified, or distributed except
|
||||||
|
# according to those terms.
|
||||||
|
|
||||||
{.used.}
|
{.used.}
|
||||||
|
|
||||||
import
|
import
|
||||||
|
@ -28,7 +38,7 @@ proc runTest(importFile: string): bool =
|
||||||
importBlock(res.get)
|
importBlock(res.get)
|
||||||
|
|
||||||
suite "Decode multiple EthBlock from bytes":
|
suite "Decode multiple EthBlock from bytes":
|
||||||
for filename in walkDirRec("tests/rlp/rlps"):
|
for filename in walkDirRec("tests/common/rlps"):
|
||||||
if not filename.endsWith(".rlp"):
|
if not filename.endsWith(".rlp"):
|
||||||
continue
|
continue
|
||||||
test filename:
|
test filename:
|
|
@ -1,6 +1,4 @@
|
||||||
import
|
import
|
||||||
./test_api_usage,
|
./test_api_usage,
|
||||||
./test_common,
|
|
||||||
./test_json_suite,
|
./test_json_suite,
|
||||||
./test_object_serialization,
|
./test_object_serialization
|
||||||
./test_rlp_codec
|
|
||||||
|
|
Loading…
Reference in New Issue