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:
Kim De Mey 2024-02-09 17:30:24 +01:00 committed by GitHub
parent 2ad07a6010
commit 8ab060b19f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
26 changed files with 17 additions and 8 deletions

View File

@ -1,5 +1,5 @@
# Nimbus
# Copyright (c) 2023 Status Research & Development GmbH
# 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)
@ -10,5 +10,6 @@
import
test_eth_types,
test_eth_types_rlp,
test_common,
test_eip4844

View File

@ -17,7 +17,7 @@ type
header: BlockHeader
proc loadFile(x: int) =
let fileName = "tests" / "rlp" / "eip2718" / "acl_block_" & $x & ".json"
let fileName = "tests" / "common" / "eip2718" / "acl_block_" & $x & ".json"
test fileName:
let n = json.parseFile(fileName)
let data = n["rlp"].getStr()

View File

@ -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.}
import
@ -28,7 +38,7 @@ proc runTest(importFile: string): bool =
importBlock(res.get)
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"):
continue
test filename:

View File

@ -1,6 +1,4 @@
import
./test_api_usage,
./test_common,
./test_json_suite,
./test_object_serialization,
./test_rlp_codec
./test_object_serialization